Define _REENTRANT as well as _PTHREADS if -pthread is specified on the
command line.
This commit is contained in:
parent
c2d825cbda
commit
5bfc4a9390
@ -162,7 +162,7 @@ const_section () \
|
||||
#undef CPP_SPEC
|
||||
#define CPP_SPEC "\
|
||||
%(cpp_cpu_arch) %(cpp_apcs_pc) %(cpp_float) %(cpp_endian) \
|
||||
%{posix:-D_POSIX_SOURCE} %{pthread:-D_PTHREADS} \
|
||||
%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT -D_PTHREADS} \
|
||||
"
|
||||
|
||||
/* Because TARGET_DEFAULT sets ARM_FLAG_SOFT_FLOAT */
|
||||
|
@ -94,8 +94,8 @@ Boston, MA 02111-1307, USA. */
|
||||
|
||||
#undef CPP_SPEC
|
||||
#define CPP_SPEC \
|
||||
"%{posix:-D_POSIX_SOURCE} %{pthread:-D_PTHREADS} %(cpp_cpu_spec) \
|
||||
%(cpp_fpu_spec)"
|
||||
"%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT -D_PTHREADS} \
|
||||
%(cpp_cpu_spec) %(cpp_fpu_spec)"
|
||||
|
||||
|
||||
#undef ASM_SPEC
|
||||
|
2
gnu/dist/toolchain/gcc/config/mips/netbsd.h
vendored
2
gnu/dist/toolchain/gcc/config/mips/netbsd.h
vendored
@ -128,7 +128,7 @@ Boston, MA 02111-1307, USA. */
|
||||
|
||||
#undef CPP_SPEC
|
||||
#define CPP_SPEC \
|
||||
"%{posix:-D_POSIX_SOURCE} %{pthread:-D_PTHREADS} \
|
||||
"%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT -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} \
|
||||
|
4
gnu/dist/toolchain/gcc/config/netbsd.h
vendored
4
gnu/dist/toolchain/gcc/config/netbsd.h
vendored
@ -40,7 +40,9 @@
|
||||
for the 2.95.3 STL to work. */
|
||||
|
||||
#undef CPP_SPEC
|
||||
#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} %{pthread:-D_PTHREADS}"
|
||||
#define CPP_SPEC \
|
||||
"%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \
|
||||
%{pthread:-D_REENTRANT -D_PTHREADS}"
|
||||
|
||||
/* Provide an ASM_SPEC appropriate for NetBSD. Currently we only deal
|
||||
with the options for generating PIC code. */
|
||||
|
@ -69,5 +69,6 @@
|
||||
#undef CPP_SPEC
|
||||
#define CPP_SPEC "\
|
||||
%{posix:-D_POSIX_SOURCE} \
|
||||
%{pthread:-D_REENTRANT -D_PTHREADS} \
|
||||
%{msoft-float:-D_SOFT_FLOAT} \
|
||||
%{mcall-sysv: -D_CALL_SYSV} %{mcall-aix: -D_CALL_AIX} %{!mcall-sysv: %{!mcall-aix: -D_CALL_SYSV}}"
|
||||
|
@ -20,7 +20,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#undef CPP_SPEC
|
||||
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_PTHREADS} \
|
||||
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT -D_PTHREADS} \
|
||||
%{!mb:-D__LITTLE_ENDIAN__} \
|
||||
%{m1:-D__sh1__} \
|
||||
%{m2:-D__sh2__} \
|
||||
|
@ -66,7 +66,7 @@ Boston, MA 02111-1307, USA. */
|
||||
} while (0)
|
||||
|
||||
#undef CPP_SPEC
|
||||
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_PTHREADS} \
|
||||
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT -D_PTHREADS} \
|
||||
%{ml:-D__LITTLE_ENDIAN__} \
|
||||
%{m1:-D__sh1__} \
|
||||
%{m2:-D__sh2__} \
|
||||
|
@ -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} %{pthread:-D_PTHREADS} \
|
||||
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT -D_PTHREADS} \
|
||||
%(cpp_cpu) %(cpp_arch) %(cpp_endian) %(cpp_subtarget)"
|
||||
|
||||
#undef CPP_PREDEFINES
|
||||
|
Loading…
Reference in New Issue
Block a user