diff options
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/egcs/gcc/Makefile.bsd-wrapper | 11 | ||||
-rw-r--r-- | gnu/egcs/gcc/config/openbsd.h | 4 |
2 files changed, 12 insertions, 3 deletions
diff --git a/gnu/egcs/gcc/Makefile.bsd-wrapper b/gnu/egcs/gcc/Makefile.bsd-wrapper index 9243cc50e1b..047763e261d 100644 --- a/gnu/egcs/gcc/Makefile.bsd-wrapper +++ b/gnu/egcs/gcc/Makefile.bsd-wrapper @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.bsd-wrapper,v 1.8 2002/01/21 16:37:19 hugh Exp $ +# $OpenBSD: Makefile.bsd-wrapper,v 1.9 2002/11/22 20:26:12 marc Exp $ MAN= cccp.1 gcc.1 MLINKS+= gcc.1 cc.1 @@ -13,10 +13,10 @@ MLINKS+= g++.1 c++.1 MLINKS+= g77.1 f77.1 .endif -VAXHOST_CFLAGS= -DIN_GCC -DOPENBSD_NATIVE -DHAVE_CONFIG_H -O0 +VAXHOST_CFLAGS= -DIN_GCC -DOPENBSD_NATIVE -DHAVE_CONFIG_H ${PTHREAD_CFLAGS} -O0 GXX_INCDIR= /usr/include/g++ -GNUCFLAGS= CFLAGS="${CFLAGS} ${COPTS} -DOPENBSD_NATIVE" +GNUCFLAGS= CFLAGS="${CFLAGS} ${COPTS} -DOPENBSD_NATIVE ${PTHREAD_CFLAGS}" CLEANFILES= .gdbinit */.gdbinit *.info* \ c-parse.c c-parse.h c-parse.y cexp.c cp/parse.c cp/parse.h \ f/*.info* objc-parse.c objc-parse.y target_path \ @@ -142,3 +142,8 @@ tags: .ifndef NOMAN .include <bsd.man.mk> .endif +.if defined(WANT_LIBPTHREAD) +PTHREAD_CFLAGS=-DOPENBSD_LIBPTHREAD +.else +PTHREAD_CFLAGS= +.endif diff --git a/gnu/egcs/gcc/config/openbsd.h b/gnu/egcs/gcc/config/openbsd.h index 46b2b162efc..e1e61cc9edb 100644 --- a/gnu/egcs/gcc/config/openbsd.h +++ b/gnu/egcs/gcc/config/openbsd.h @@ -83,7 +83,11 @@ Boston, MA 02111-1307, USA. */ /* LIB_SPEC appropriate for OpenBSD. Select the appropriate libc, depending on profiling and threads. Basically, -lc(_r)?(_p)?, select _r for threads, and _p for p or pg. */ +#ifdef OPENBSD_LIBPTHREAD +#define OBSD_LIB_SPEC "%{pthread:-lnpthread%{p:_p}%{!p:%{pg:_p}}} %{!shared:-lc%{p:_p}%{!p:%{pg:_p}}}" +#else #define OBSD_LIB_SPEC "%{!shared:-lc%{pthread:_r}%{p:_p}%{!p:%{pg:_p}}}" +#endif #ifndef OBSD_HAS_CORRECT_SPECS |