diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2019-05-07 10:38:45 +0000 |
---|---|---|
committer | Rainer Orth <ro@gcc.gnu.org> | 2019-05-07 10:38:45 +0000 |
commit | bca0a3216deff39ec9e4dcf979fff7f313ca6486 (patch) | |
tree | d79aa195465ae2ce02cb47114bdbe8ec96cd4401 /libphobos/m4 | |
parent | 9edfa4c015a3ae0451a30259ef654c632f9f4ca5 (diff) | |
download | gcc-bca0a3216deff39ec9e4dcf979fff7f313ca6486.zip gcc-bca0a3216deff39ec9e4dcf979fff7f313ca6486.tar.gz gcc-bca0a3216deff39ec9e4dcf979fff7f313ca6486.tar.bz2 |
Check if Solaris ld supports -z relax=transtls
* m4/druntime/os.m4 (DRUNTIME_OS_LINK_SPEC): Only use -z
relax=transtls if linker supports it.
* configure.ac (enable_libphobos, LIBPHOBOS_SUPPORTED): Move down.
(x86_64-*-solaris2.* | i?86-*-solaris2.*): Only
mark supported with either gld or ld -z relax=transtls.
* configure: Regenerate.
From-SVN: r270939
Diffstat (limited to 'libphobos/m4')
-rw-r--r-- | libphobos/m4/druntime/os.m4 | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/libphobos/m4/druntime/os.m4 b/libphobos/m4/druntime/os.m4 index b473ad5..74167aa2 100644 --- a/libphobos/m4/druntime/os.m4 +++ b/libphobos/m4/druntime/os.m4 @@ -209,10 +209,22 @@ AC_DEFUN([DRUNTIME_OS_LINK_SPEC], # relocs. Work around by disabling TLS transitions. Not necessary # on 32-bit x86, but cannot be distinguished reliably in specs. druntime_ld_prog=`$CC -print-prog-name=ld` + druntime_ld_gld=no + druntime_ld_relax_transtls=no if test -n "$druntime_ld_prog" \ && $druntime_ld_prog -v 2>&1 | grep GNU > /dev/null 2>&1; then - : + druntime_ld_gld=yes else + echo 'int main (void) { return 0; }' > conftest.c + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -Wl,-z,relax=transtls" + if $CC $CFLAGS $LDFLAGS -o conftest conftest.c > /dev/null 2>&1; then + druntime_ld_relax_transtls=yes + fi + LDFLAGS="$save_LDFLAGS" + rm -f conftest.c conftest + fi + if test "$druntime_ld_relax_transtls" = "yes"; then OS_LINK_SPEC='-z relax=transtls' fi ;; |