diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2016-03-22 10:25:20 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2016-03-22 10:25:20 +0100 |
commit | fe508576ef1f815b22177d7597796886b91ea0c8 (patch) | |
tree | 885adbb929453bbbee04db48bdbbafec4e29205e /config/picflag.m4 | |
parent | 445036bb9882485133750a14a5b3da30efeae2df (diff) | |
download | cygnal-fe508576ef1f815b22177d7597796886b91ea0c8.tar.gz cygnal-fe508576ef1f815b22177d7597796886b91ea0c8.tar.bz2 cygnal-fe508576ef1f815b22177d7597796886b91ea0c8.zip |
Sync toplevel with upstream GCC.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'config/picflag.m4')
-rw-r--r-- | config/picflag.m4 | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/config/picflag.m4 b/config/picflag.m4 index 2ee5cd078..2f5b9721e 100644 --- a/config/picflag.m4 +++ b/config/picflag.m4 @@ -7,9 +7,15 @@ AC_DEFUN([_GCC_PICFLAG], [ case "${$2}" in # PIC is the default on some targets or must not be used. *-*-darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - $1=-fno-common + # For darwin, common symbols are not allowed in MH_DYLIB files + case "${CFLAGS}" in + # If we are using a compiler supporting mdynamic-no-pic + # and the option has been tested as safe to add, then cancel + # it here, since the code generated is incompatible with shared + # libs. + *-mdynamic-no-pic*) $1='-fno-common -mno-dynamic-no-pic' ;; + *) $1=-fno-common ;; + esac ;; alpha*-dec-osf5*) # PIC is the default. @@ -50,9 +56,6 @@ case "${$2}" in i[[34567]]86-*-* | x86_64-*-*) $1=-fpic ;; - m68k-*-*) - $1=-fpic - ;; # FIXME: Override -fPIC default in libgcc only? sh-*-linux* | sh[[2346lbe]]*-*-linux*) $1=-fpic |