Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/gnu/dist/toolchain/gcc * Use gthr-posix.h if --enable-threads.
details: https://anonhg.NetBSD.org/src/rev/7b02409b5dec
branches: trunk
changeset: 542266:7b02409b5dec
user: thorpej <thorpej%NetBSD.org@localhost>
date: Fri Jan 24 22:40:02 2003 +0000
description:
* Use gthr-posix.h if --enable-threads.
* If -pthread is specified, add -lpthread and -D_PTHREADS.
More thread support to come; this is just a start (sigh, it's
handled so much nicer in 3.3...).
diffstat:
gnu/dist/toolchain/gcc/config/arm/netbsd-elf.h | 2 +-
gnu/dist/toolchain/gcc/config/m68k/netbsd-elf.h | 3 ++-
gnu/dist/toolchain/gcc/config/mips/netbsd.h | 2 +-
gnu/dist/toolchain/gcc/config/netbsd.h | 8 +++++---
gnu/dist/toolchain/gcc/config/sh/netbsd-elf-little.h | 2 +-
gnu/dist/toolchain/gcc/config/sh/netbsd-elf.h | 2 +-
gnu/dist/toolchain/gcc/config/sparc/netbsd-elf-common.h | 2 +-
gnu/dist/toolchain/gcc/configure | 5 +++++
gnu/dist/toolchain/gcc/configure.in | 5 +++++
9 files changed, 22 insertions(+), 9 deletions(-)
diffs (130 lines):
diff -r e440153b55d4 -r 7b02409b5dec gnu/dist/toolchain/gcc/config/arm/netbsd-elf.h
--- a/gnu/dist/toolchain/gcc/config/arm/netbsd-elf.h Fri Jan 24 22:35:43 2003 +0000
+++ b/gnu/dist/toolchain/gcc/config/arm/netbsd-elf.h Fri Jan 24 22:40:02 2003 +0000
@@ -162,7 +162,7 @@
#undef CPP_SPEC
#define CPP_SPEC "\
%(cpp_cpu_arch) %(cpp_apcs_pc) %(cpp_float) %(cpp_endian) \
-%{posix:-D_POSIX_SOURCE} \
+%{posix:-D_POSIX_SOURCE} %{pthread:-D_PTHREADS} \
"
/* Because TARGET_DEFAULT sets ARM_FLAG_SOFT_FLOAT */
diff -r e440153b55d4 -r 7b02409b5dec gnu/dist/toolchain/gcc/config/m68k/netbsd-elf.h
--- a/gnu/dist/toolchain/gcc/config/m68k/netbsd-elf.h Fri Jan 24 22:35:43 2003 +0000
+++ b/gnu/dist/toolchain/gcc/config/m68k/netbsd-elf.h Fri Jan 24 22:40:02 2003 +0000
@@ -94,7 +94,8 @@
#undef CPP_SPEC
#define CPP_SPEC \
- "%{posix:-D_POSIX_SOURCE} %(cpp_cpu_spec) %(cpp_fpu_spec)"
+ "%{posix:-D_POSIX_SOURCE} %{pthread:-D_PTHREADS} %(cpp_cpu_spec) \
+ %(cpp_fpu_spec)"
#undef ASM_SPEC
diff -r e440153b55d4 -r 7b02409b5dec gnu/dist/toolchain/gcc/config/mips/netbsd.h
--- a/gnu/dist/toolchain/gcc/config/mips/netbsd.h Fri Jan 24 22:35:43 2003 +0000
+++ b/gnu/dist/toolchain/gcc/config/mips/netbsd.h Fri Jan 24 22:40:02 2003 +0000
@@ -128,7 +128,7 @@
#undef CPP_SPEC
#define CPP_SPEC \
- "%{posix:-D_POSIX_SOURCE} \
+ "%{posix:-D_POSIX_SOURCE} %{pthread:-D_PTHREADS} \
%{!mno-abicalls:-D__ABICALLS__} \
%{mlong64:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long\\ int} \
%{!mlong64:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int} \
diff -r e440153b55d4 -r 7b02409b5dec gnu/dist/toolchain/gcc/config/netbsd.h
--- a/gnu/dist/toolchain/gcc/config/netbsd.h Fri Jan 24 22:35:43 2003 +0000
+++ b/gnu/dist/toolchain/gcc/config/netbsd.h Fri Jan 24 22:40:02 2003 +0000
@@ -36,10 +36,11 @@
/* Provide a CPP_SPEC appropriate for NetBSD. Current we just deal with
- the GCC option `-posix'. */
+ the GCC option `-posix'. We also deal with -pthread, which is required
+ for the 2.95.3 STL to work. */
#undef CPP_SPEC
-#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE}"
+#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{pthread:-D_PTHREADS}"
/* Provide an ASM_SPEC appropriate for NetBSD. Currently we only deal
with the options for generating PIC code. */
@@ -54,7 +55,8 @@
#undef LIB_SPEC
#define LIB_SPEC \
- "%{posix:%{!p:%{!pg:-lposix}}%{p:-lposix_p}%{pg:-lposix_p}} \
+ "%{pthread:%{!p:%{!pg:-lpthread}}%{p:-lpthread_p}%{pg:-lpthread_p}} \
+ %{posix:%{!p:%{!pg:-lposix}}%{p:-lposix_p}%{pg:-lposix_p}} \
%{!shared:%{!symbolic:%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}}}"
/* Provide a LIBGCC_SPEC appropriate for NetBSD. We also want to exclude
diff -r e440153b55d4 -r 7b02409b5dec gnu/dist/toolchain/gcc/config/sh/netbsd-elf-little.h
--- a/gnu/dist/toolchain/gcc/config/sh/netbsd-elf-little.h Fri Jan 24 22:35:43 2003 +0000
+++ b/gnu/dist/toolchain/gcc/config/sh/netbsd-elf-little.h Fri Jan 24 22:40:02 2003 +0000
@@ -20,7 +20,7 @@
Boston, MA 02111-1307, USA. */
#undef CPP_SPEC
-#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} \
+#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_PTHREADS} \
%{!mb:-D__LITTLE_ENDIAN__} \
%{m1:-D__sh1__} \
%{m2:-D__sh2__} \
diff -r e440153b55d4 -r 7b02409b5dec gnu/dist/toolchain/gcc/config/sh/netbsd-elf.h
--- a/gnu/dist/toolchain/gcc/config/sh/netbsd-elf.h Fri Jan 24 22:35:43 2003 +0000
+++ b/gnu/dist/toolchain/gcc/config/sh/netbsd-elf.h Fri Jan 24 22:40:02 2003 +0000
@@ -63,7 +63,7 @@
} while (0)
#undef CPP_SPEC
-#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} \
+#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_PTHREADS} \
%{ml:-D__LITTLE_ENDIAN__} \
%{m1:-D__sh1__} \
%{m2:-D__sh2__} \
diff -r e440153b55d4 -r 7b02409b5dec gnu/dist/toolchain/gcc/config/sparc/netbsd-elf-common.h
--- a/gnu/dist/toolchain/gcc/config/sparc/netbsd-elf-common.h Fri Jan 24 22:35:43 2003 +0000
+++ b/gnu/dist/toolchain/gcc/config/sparc/netbsd-elf-common.h Fri Jan 24 22:40:02 2003 +0000
@@ -6,7 +6,7 @@
/* Fix up CPP_SPEC. This merges the code from <netbsd.h> and <sparc/sparc.h> */
#undef CPP_SPEC
-#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} \
+#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_PTHREADS} \
%(cpp_cpu) %(cpp_arch) %(cpp_endian) %(cpp_subtarget)"
#undef CPP_PREDEFINES
diff -r e440153b55d4 -r 7b02409b5dec gnu/dist/toolchain/gcc/configure
--- a/gnu/dist/toolchain/gcc/configure Fri Jan 24 22:35:43 2003 +0000
+++ b/gnu/dist/toolchain/gcc/configure Fri Jan 24 22:40:02 2003 +0000
@@ -2968,6 +2968,11 @@
tmake_file="t-libc-ok t-netbsd"
xm_file="${xm_file} xm-netbsd.h"
xmake_file=none
+ case x${enable_threads} in
+ xyes | xposix)
+ thread_file='posix'
+ ;;
+ esac
;;
*-*-openbsd*)
tm_file=${cpu_type}/openbsd.h
diff -r e440153b55d4 -r 7b02409b5dec gnu/dist/toolchain/gcc/configure.in
--- a/gnu/dist/toolchain/gcc/configure.in Fri Jan 24 22:35:43 2003 +0000
+++ b/gnu/dist/toolchain/gcc/configure.in Fri Jan 24 22:40:02 2003 +0000
@@ -536,6 +536,11 @@
tmake_file="t-libc-ok t-netbsd"
xm_file="${xm_file} xm-netbsd.h"
xmake_file=none
+ case x${enable_threads} in
+ xyes | xposix)
+ thread_file='posix'
+ ;;
+ esac
;;
*-*-openbsd*)
tm_file=${cpu_type}/openbsd.h
Home |
Main Index |
Thread Index |
Old Index