This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Define _REENTRANT with -pthread on aarch64-linux
- From: Andreas Schwab <schwab at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: marcus dot shawcroft at arm dot com
- Date: Wed, 10 Jul 2013 17:06:38 +0200
- Subject: [PATCH] Define _REENTRANT with -pthread on aarch64-linux
This is expected by some software (SWI Prolog checks for it).
Andreas.
* config/aarch64/aarch64-linux.h (CPP_SPEC): Define.
diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
index e914ed2..83efad4 100644
--- a/gcc/config/aarch64/aarch64-linux.h
+++ b/gcc/config/aarch64/aarch64-linux.h
@@ -23,6 +23,8 @@
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64.so.1"
+#define CPP_SPEC "%{pthread:-D_REENTRANT}"
+
#define LINUX_TARGET_LINK_SPEC "%{h*} \
%{static:-Bstatic} \
%{shared:-shared} \
--
1.8.3.2
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."