diff options
Diffstat (limited to 'libphobos/m4')
-rw-r--r-- | libphobos/m4/druntime/os.m4 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libphobos/m4/druntime/os.m4 b/libphobos/m4/druntime/os.m4 index 92a2ba5..295926c 100644 --- a/libphobos/m4/druntime/os.m4 +++ b/libphobos/m4/druntime/os.m4 @@ -183,3 +183,25 @@ AC_DEFUN([DRUNTIME_OS_MINFO_BRACKETING], AM_CONDITIONAL([DRUNTIME_OS_MINFO_BRACKETING], [test "$DCFG_MINFO_BRACKETING" = "true"]) AC_LANG_POP([C]) ]) + +# DRUNTIME_OS_LINK_SPEC +# --------------------- +# Add target-specific link options to link_spec. +AC_DEFUN([DRUNTIME_OS_LINK_SPEC], +[ + case $target in + i?86-*-solaris2.* | x86_64-*-solaris2.*) + # 64-bit Solaris/x86 ld breaks calls to __tls_get_addr with non-TLS + # 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` + if test -n "$druntime_ld_prog" \ + && $druntime_ld_prog -v 2>&1 | grep GNU > /dev/null 2>&1; then + : + else + OS_LINK_SPEC='-z relax=transtls' + fi + ;; + esac + AC_SUBST(OS_LINK_SPEC) +]) |