diff options
Diffstat (limited to 'sysdeps/sparc/sparc32/elf/configure.in')
-rw-r--r-- | sysdeps/sparc/sparc32/elf/configure.in | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sysdeps/sparc/sparc32/elf/configure.in b/sysdeps/sparc/sparc32/elf/configure.in index 0c0b5121e5..550bf4f838 100644 --- a/sysdeps/sparc/sparc32/elf/configure.in +++ b/sysdeps/sparc/sparc32/elf/configure.in @@ -41,3 +41,20 @@ if test $libc_cv_sparc32_tls = yes; then AC_DEFINE(HAVE_TLS_SUPPORT) fi fi + +# Check for broken WDISP22 in the linker. +AC_CACHE_CHECK(for sparc32 ld WDISP22 handling, libc_cv_sparc32_wdisp22, [dnl +echo 'bne foo; nop' > conftest1.s +echo '.globl foo; .hidden foo; foo: nop' > conftest2.s +libc_cv_sparc32_wdisp22=unknown +if AC_TRY_COMMAND(${CC-cc} -nostdlib -shared $CFLAGS conftest1.s conftest2.s -o conftest.so 1>&AS_MESSAGE_LOG_FD); then + if readelf -r conftest.so | grep -q R_SPARC_WDISP22; then + libc_cv_sparc32_wdisp22=broken + else + libc_cv_sparc32_wdisp22=ok + fi +fi +rm -f conftest*]) +if test $libc_cv_sparc32_wdisp22 != ok; then + AC_DEFINE(BROKEN_SPARC_WDISP22) +fi |