summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMarco S Hyman <marc@cvs.openbsd.org>2002-11-22 20:26:13 +0000
committerMarco S Hyman <marc@cvs.openbsd.org>2002-11-22 20:26:13 +0000
commit8b675ec700902cc8499cc4e50da7ae3146bc61c3 (patch)
tree77ce141c96b998bf8f5c13f0ac2fa1191ad51618 /gnu
parent3457ded4a8e2b53923da2f8d4665b1db6cb1fa01 (diff)
specs for -lnpthread.
Put WANT_LIBPTHREAD=yes in /etc/mk.conf and re-build gcc to use libnpthread instead of libc_r ok espie@
Diffstat (limited to 'gnu')
-rw-r--r--gnu/egcs/gcc/Makefile.bsd-wrapper11
-rw-r--r--gnu/egcs/gcc/config/openbsd.h4
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