Patchwork Define _REENTRANT with -pthread on aarch64-linux

login
register
mail settings
Submitter Andreas Schwab
Date July 10, 2013, 3:06 p.m.
Message ID <mvmmwpuqwsh.fsf@hawking.suse.de>
Download mbox | patch
Permalink /patch/258103/
State New
Headers show

Comments

Andreas Schwab - July 10, 2013, 3:06 p.m.
This is expected by some software (SWI Prolog checks for it).

Andreas.

	* config/aarch64/aarch64-linux.h (CPP_SPEC): Define.
Marcus Shawcroft - July 10, 2013, 4:11 p.m.
On 10 July 2013 16:06, Andreas Schwab <schwab@suse.de> wrote:
> This is expected by some software (SWI Prolog checks for it).
>
> Andreas.

OK, Thank you.

... this time copying in gcc-patches from an account that won't get bounced...

/Marcus

Patch

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}				\