diff options
author | Kurt Miller <kurt@cvs.openbsd.org> | 2009-07-25 02:04:03 +0000 |
---|---|---|
committer | Kurt Miller <kurt@cvs.openbsd.org> | 2009-07-25 02:04:03 +0000 |
commit | 3b8af96aec6a20c0602d21d0e487e0f08240de2b (patch) | |
tree | d0822750e7d6d699a2aa35e0f15715d571c02517 /gnu/usr.bin | |
parent | 27ef2e128e225c798a000b7d050fe3733f9aa03c (diff) |
- enable thread model posix for gcc 3 which makes dwarf2 exception
handling thread safe and enables thread safety for libstdc++
- include -D_REENTRANT when -pthread cpp arg is present (needed so
boost can detect -pthread on the command line).
- bump libstdc++ major
See faq/current.html for instructions on how to correctly build
userland for this change.
okay kettenis@
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r-- | gnu/usr.bin/gcc/Makefile.bsd-wrapper | 3 | ||||
-rw-r--r-- | gnu/usr.bin/gcc/gcc/config/m68k/openbsd.h | 2 | ||||
-rw-r--r-- | gnu/usr.bin/gcc/gcc/config/openbsd.h | 8 |
3 files changed, 5 insertions, 8 deletions
diff --git a/gnu/usr.bin/gcc/Makefile.bsd-wrapper b/gnu/usr.bin/gcc/Makefile.bsd-wrapper index 01d0bd837e8..31ef6b84708 100644 --- a/gnu/usr.bin/gcc/Makefile.bsd-wrapper +++ b/gnu/usr.bin/gcc/Makefile.bsd-wrapper @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.bsd-wrapper,v 1.57 2007/10/25 17:42:22 espie Exp $ +# $OpenBSD: Makefile.bsd-wrapper,v 1.58 2009/07/25 02:04:02 kurt Exp $ MAN= gcc.1 cpp.1 gcov.1 protoize.1 MLINKS+= protoize.1 unprotoize.1 @@ -107,6 +107,7 @@ config.status: gcc/Makefile.in gcc/configure gcc/c-parse.in ${LANGUAGES} --enable-cpp --disable-nls \ --with-gxx-include-dir=${GXX_INCDIR} \ --enable-__cxa_atexit \ + --enable-threads=posix \ ${CONFIGTARGET} ${GCCARCH} && touch config.status .ifdef NOMAN diff --git a/gnu/usr.bin/gcc/gcc/config/m68k/openbsd.h b/gnu/usr.bin/gcc/gcc/config/m68k/openbsd.h index 4107ddf3376..ef71e056816 100644 --- a/gnu/usr.bin/gcc/gcc/config/m68k/openbsd.h +++ b/gnu/usr.bin/gcc/gcc/config/m68k/openbsd.h @@ -31,7 +31,7 @@ Boston, MA 02111-1307, USA. */ /* Define __HAVE_68881__ in preprocessor, unless -msoft-float is specified. This will control the use of inline 68881 insns in certain macros. */ #undef CPP_SPEC -#define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__ -D__HAVE_FPU__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}" +#define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__ -D__HAVE_FPU__} %{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS -D_REENTRANT}" /* Run-time target specifications. */ #define CPP_PREDEFINES "-D__unix__ -D__m68k__ -D__mc68000__ -D__mc68020__ -D__OpenBSD__ -Asystem=unix -Asystem=OpenBSD -Acpu=m68k -Amachine=m68k" diff --git a/gnu/usr.bin/gcc/gcc/config/openbsd.h b/gnu/usr.bin/gcc/gcc/config/openbsd.h index f3ef4f92f5e..f52b0e6bea4 100644 --- a/gnu/usr.bin/gcc/gcc/config/openbsd.h +++ b/gnu/usr.bin/gcc/gcc/config/openbsd.h @@ -124,9 +124,9 @@ Boston, MA 02111-1307, USA. */ This two-stage defines makes it easy to pick that for targets that have subspecs. */ #ifdef CPP_CPU_SPEC -#define OBSD_CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}" +#define OBSD_CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS -D_REENTRANT}" #else -#define OBSD_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS}" +#define OBSD_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_POSIX_THREADS -D_REENTRANT}" #endif #ifndef OBSD_HAS_CORRECT_SPECS @@ -323,10 +323,6 @@ do { \ /* Storage layout. */ -/* Otherwise, since we support weak, gthr.h erroneously tries to use - #pragma weak. */ -#define GTHREAD_USE_WEAK 0 - /* bug work around: we don't want to support #pragma weak, but the current code layout needs HANDLE_PRAGMA_WEAK asserted for __attribute((weak)) to work. On the other hand, we don't define HANDLE_PRAGMA_WEAK directly, |