diff options
author | obrien <obrien@FreeBSD.org> | 2001-01-06 06:16:31 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2001-01-06 06:16:31 +0000 |
commit | 9ecd859376ab3bec2331158e58d250fb62910430 (patch) | |
tree | 966ba0f8d5c8bae60e363d5ac757b997bd3a33d7 /gnu | |
parent | 7de31c3e1c7d8c876eb8490a93e2583b1554600a (diff) | |
download | FreeBSD-src-9ecd859376ab3bec2331158e58d250fb62910430.zip FreeBSD-src-9ecd859376ab3bec2331158e58d250fb62910430.tar.gz |
Use a unified libgcc rather than a seperate one for threaded and
non-threaded programs. This provides threaded programs with the
needed exception frame symbols.
parts submitted by: Max Khon <fjoe@iclub.nsu.ru>
PR: 23252
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/lib/Makefile | 2 | ||||
-rw-r--r-- | gnu/lib/libgcc/Makefile | 7 | ||||
-rw-r--r-- | gnu/usr.bin/cc/cc_tools/freebsd-native.h | 10 |
3 files changed, 9 insertions, 10 deletions
diff --git a/gnu/lib/Makefile b/gnu/lib/Makefile index 7be57b1..41f3236 100644 --- a/gnu/lib/Makefile +++ b/gnu/lib/Makefile @@ -2,9 +2,11 @@ SUBDIR= csu libdialog libgcc libgmp libmp libregex libreadline +.if ${OBJFORMAT} == aout .if !defined(NOLIBC_R) SUBDIR+= libgcc_r .endif +.endif .if !defined(NO_CXX) SUBDIR+= libstdc++ diff --git a/gnu/lib/libgcc/Makefile b/gnu/lib/libgcc/Makefile index a9842a0..a16558a 100644 --- a/gnu/lib/libgcc/Makefile +++ b/gnu/lib/libgcc/Makefile @@ -4,12 +4,15 @@ GCCDIR= ${.CURDIR}/../../../contrib/gcc.295 .PATH: ${GCCDIR}/cp ${GCCDIR} +# allow to be overridden for the a.out case .if !defined(LIB) || ${LIB} != "gcc_r" LIB= gcc .endif +.if ${OBJFORMAT} == aout # Install libgcc_pic.a, since ld.so uses it. INSTALL_PIC_ARCHIVE= yes +.endif # # XXX This is a hack, but it seems to work. libgcc1.a is supposed to be @@ -59,6 +62,10 @@ SRCS= frame.c tinfo.cc tinfo2.cc new.cc exception.cc CFLAGS+= -I${GCCDIR}/config -I${GCCDIR} -I. CFLAGS+= -fexceptions CFLAGS+= -DIN_GCC +.if ${OBJFORMAT} != aout +#CFLAGS+= -D_PTHREADS -fPIC -DGTHREAD_USE_WEAK +CFLAGS+= -D_PTHREADS -DGTHREAD_USE_WEAK +.endif CXXFLAGS+= -I${GCCDIR}/cp/inc CXXFLAGS+= -nostdinc++ diff --git a/gnu/usr.bin/cc/cc_tools/freebsd-native.h b/gnu/usr.bin/cc/cc_tools/freebsd-native.h index 6fd158c..fd04a68 100644 --- a/gnu/usr.bin/cc/cc_tools/freebsd-native.h +++ b/gnu/usr.bin/cc/cc_tools/freebsd-native.h @@ -46,13 +46,3 @@ /* FreeBSD is 4.4BSD derived */ #define bsd4_4 - -/* Tell gcc to locate libgcc.a for us according to the -m rules. */ -#undef LIBGCC_SPEC -#define LIBGCC_SPEC \ - "%{!shared: \ - %{!pthread:libgcc.a%s} \ - %{pthread:libgcc_r.a%s}} \ - %{shared: \ - %{!pthread:libgcc_pic.a%s} \ - %{pthread:libgcc_r_pic.a%s}}" |