diff options
author | 2009-07-25 02:04:01 +0000 | |
---|---|---|
committer | 2009-07-25 02:04:01 +0000 | |
commit | 1a1b5b77d0a7f771a4915ab3fe2bcd5db839d4fa (patch) | |
tree | 54a70f0f3dee459224e97f257a0305340d435515 | |
parent | properly sanitize the default value in ask_num(...) (diff) | |
download | wireguard-openbsd-1a1b5b77d0a7f771a4915ab3fe2bcd5db839d4fa.tar.xz wireguard-openbsd-1a1b5b77d0a7f771a4915ab3fe2bcd5db839d4fa.zip |
- 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@
-rw-r--r-- | gnu/lib/libstdc++/shlib_version | 2 | ||||
-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 |
4 files changed, 6 insertions, 9 deletions
diff --git a/gnu/lib/libstdc++/shlib_version b/gnu/lib/libstdc++/shlib_version index b0307472561..bebcead20d0 100644 --- a/gnu/lib/libstdc++/shlib_version +++ b/gnu/lib/libstdc++/shlib_version @@ -1,2 +1,2 @@ -major=47 +major=48 minor=0 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, |