summaryrefslogtreecommitdiff
path: root/devel/linuxthreads/files
diff options
context:
space:
mode:
authorTor Egge <tegge@FreeBSD.org>2002-06-08 18:27:19 +0000
committerTor Egge <tegge@FreeBSD.org>2002-06-08 18:27:19 +0000
commit7c73d7524cc42ca777cf49b8a93ee244289db5a7 (patch)
tree20fc047a242e344c7ad1794f4e9c31187bb87d42 /devel/linuxthreads/files
parentdevel/ruby-strscan has been replaced with lang/ruby16-shim-ruby18. (diff)
Build linuxthreads version of libstdc++ and libsupc++ under 5.0-CURRENT.
Don't misuse DESTDIR when building linuxthreads version of libgcc. Fix varargs warning under 5.0-CURRENT. Don't try to register profiled libraries when NOPROFILE has been specified. Don't try to register shared libraries when NOPIC has been specified. Bump port revision. PR: 38876
Notes
Notes: svn path=/head/; revision=60883
Diffstat (limited to 'devel/linuxthreads/files')
-rw-r--r--devel/linuxthreads/files/Makefile.libgcc_r17
-rw-r--r--devel/linuxthreads/files/Makefile.libstdc++18
-rw-r--r--devel/linuxthreads/files/Makefile.libsupc++18
-rw-r--r--devel/linuxthreads/files/README.FreeBSD12
-rw-r--r--devel/linuxthreads/files/patch-aa21
5 files changed, 73 insertions, 13 deletions
diff --git a/devel/linuxthreads/files/Makefile.libgcc_r b/devel/linuxthreads/files/Makefile.libgcc_r
index 7183cdead4b3..1f6f7f3c9f61 100644
--- a/devel/linuxthreads/files/Makefile.libgcc_r
+++ b/devel/linuxthreads/files/Makefile.libgcc_r
@@ -1,19 +1,18 @@
-# $FreeBSD: /tmp/pcvs/ports/devel/linuxthreads/files/Makefile.libgcc_r,v 1.3 2000-11-06 19:43:33 jasone Exp $
+# $FreeBSD: /tmp/pcvs/ports/devel/linuxthreads/files/Makefile.libgcc_r,v 1.4 2002-06-08 18:27:19 tegge Exp $
-DESTDIR=/usr/local/
-LIBDIR= lib/
+PREFIX?= ${DESTDIR}/usr/local
+LIBDIR= ${PREFIX:S,^${DESTDIR},,}/lib
CFLAGS+=-D_PTHREADS -I../
CFLAGS+=-I../sysdeps/i386 -I../sysdeps/pthread -I../sysdeps/unix/sysv/linux
+CXXFLAGS= ${CXXINCLUDES} ${CFLAGS}
-.include "/usr/src/gnu/lib/libgcc/Makefile"
+installincludes:
+
+.include "Makefile.inc"
#
# Override various things that are set in the main Makefile.
#
-GCCDIR:=$(GCCDIR:T:S/^/\/usr\/src\/contrib\/&/)
-
-LIB= lgcc_r
-
-.PATH: ${GCCDIR}/cp ${GCCDIR}
+.undef SUBDIR
diff --git a/devel/linuxthreads/files/Makefile.libstdc++ b/devel/linuxthreads/files/Makefile.libstdc++
new file mode 100644
index 000000000000..80f0276aea05
--- /dev/null
+++ b/devel/linuxthreads/files/Makefile.libstdc++
@@ -0,0 +1,18 @@
+# $FreeBSD: /tmp/pcvs/ports/devel/linuxthreads/files/Makefile.libstdc++,v 1.1 2002-06-08 18:27:19 tegge Exp $
+
+PREFIX?= ${DESTDIR}/usr/local
+LIBDIR= ${PREFIX:S,^${DESTDIR},,}/lib
+
+CFLAGS+=-D_PTHREADS -I../
+CFLAGS+=-I../sysdeps/i386 -I../sysdeps/pthread -I../sysdeps/unix/sysv/linux
+CXXFLAGS= ${CXXINCLUDES} ${CFLAGS}
+
+installincludes:
+
+.include "Makefile.inc"
+
+#
+# Override various things that are set in the main Makefile.
+#
+
+.undef SUBDIR
diff --git a/devel/linuxthreads/files/Makefile.libsupc++ b/devel/linuxthreads/files/Makefile.libsupc++
new file mode 100644
index 000000000000..ac4ed4aec107
--- /dev/null
+++ b/devel/linuxthreads/files/Makefile.libsupc++
@@ -0,0 +1,18 @@
+# $FreeBSD: /tmp/pcvs/ports/devel/linuxthreads/files/Makefile.libsupc++,v 1.1 2002-06-08 18:27:19 tegge Exp $
+
+PREFIX?= ${DESTDIR}/usr/local
+LIBDIR= ${PREFIX:S,^${DESTDIR},,}/lib
+
+CFLAGS+=-D_PTHREADS -I../
+CFLAGS+=-I../sysdeps/i386 -I../sysdeps/pthread -I../sysdeps/unix/sysv/linux
+CXXFLAGS= ${CXXINCLUDES} ${CFLAGS}
+
+installincludes:
+
+.include "Makefile.inc"
+
+#
+# Override various things that are set in the main Makefile.
+#
+
+.undef SUBDIR
diff --git a/devel/linuxthreads/files/README.FreeBSD b/devel/linuxthreads/files/README.FreeBSD
index 13aa5b376e46..8cd203c2dca7 100644
--- a/devel/linuxthreads/files/README.FreeBSD
+++ b/devel/linuxthreads/files/README.FreeBSD
@@ -72,9 +72,21 @@ set at 20 + 16 * MAXUSERS.
4) Be aware of the following libgcc issue:
+ FreeBSD 4.* (gcc 2.*):
+
__register_frame_info() and __get_eh_info() from libgcc.a are linked
into shared libraries that use exceptions, e.g. libstdc++. Those
functions are not compatible with linuxthreads due to pthread_mutex_t
and pthread_once_t having different sizes and static initializers.
Linking the shared linuxthreads library before any such library causes
the liblgcc_r.a version of those functions to be used.
+
+ FreeBSD 5.* (gcc 3.*):
+
+ __register_frame_info() and __frame_state_for() from libgcc.a are
+ linked into shared libraries that use exceptions, e.g. libstdc++.
+ Those functions are not compatible with linuxthreads due to
+ pthread_mutex_t and pthread_once_t having different sizes and static
+ initializers. Linking the shared linuxthreads library before any such
+ library causes the liblgcc_r.a version of those functions to be used.
+ Use liblstdc++ and liblsupc++.
diff --git a/devel/linuxthreads/files/patch-aa b/devel/linuxthreads/files/patch-aa
index eaa883bb2c85..02ef0dbe362c 100644
--- a/devel/linuxthreads/files/patch-aa
+++ b/devel/linuxthreads/files/patch-aa
@@ -13,11 +13,15 @@ diff -ru ../../work/linuxthreads-2.2.3/Examples/Makefile ./Examples/Makefile
diff -ru ../../work/linuxthreads-2.2.3/Makefile ./Makefile
--- ../../work/linuxthreads-2.2.3/Makefile Wed Apr 25 21:50:59 2001
+++ ./Makefile Thu Jun 7 23:13:52 2001
-@@ -1,128 +1,76 @@
+@@ -1,128 +1,84 @@
-# Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
-# This file is part of the GNU C Library.
+LIB=lthread
++.if defined(USING_GCC3)
++SHLIB_MAJOR= 3
++.else
+SHLIB_MAJOR= 2
++.endif
+SHLIB_MINOR= 2
+
+.if !defined(MACHINE_ARCH)
@@ -29,10 +33,10 @@ diff -ru ../../work/linuxthreads-2.2.3/Makefile ./Makefile
+.endif
+
+.if !defined(PREFIX)
-+PREFIX = /usr/local
++PREFIX= ${DESTDIR}/usr/local
+.endif
+
-+LIBDIR = ${PREFIX}/lib
++LIBDIR= ${PREFIX:S,^${DESTDIR},,}/lib
+
+CFLAGS +=-g -O2 -Wall
+#CFLAGS +=-g -O0 -Wall -DDEBUG
@@ -60,7 +64,11 @@ diff -ru ../../work/linuxthreads-2.2.3/Makefile ./Makefile
+ specific.c spinlock.c uthread_file.c wraputhread.c wrapsyscall.c \
+ barrier.c localtime.c
+
++.if defined(USING_GCC3)
++SOBJS += libgcc_r/unwind-sjlj.o libgcc_r/unwind-dw2.o libgcc_r/unwind-dw2-fde.o
++.else
+SOBJS += libgcc_r/frame.o libgcc_r/_eh.o
++.endif
+
+beforeinstall:
+ ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 0755 \
@@ -1145,7 +1153,12 @@ diff -ru ../../work/linuxthreads-2.2.3/wrapsyscall.c ./wrapsyscall.c
/* msync(2). */
-@@ -113,40 +118,50 @@
+@@ -109,44 +114,54 @@
+
+ /* open(2). */
+ CANCELABLE_SYSCALL_VA (int, open, (const char *pathname, int flags, ...),
+- (pathname, flags, va_arg (ap, mode_t)), flags)
++ (pathname, flags, va_arg (ap, int)), flags)
strong_alias (open, __open)