aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/sparc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-02-04 08:41:05 +0000
committerUlrich Drepper <drepper@redhat.com>2003-02-04 08:41:05 +0000
commit6900ded22f42f38175a7810f7c68dbfeef8b8f3a (patch)
treee049d8ddc9709af70a4f14a625114fb0650e0181 /sysdeps/sparc
parent663684b285b90ae2dc5d86528341b7d6c005a71b (diff)
downloadglibc-6900ded22f42f38175a7810f7c68dbfeef8b8f3a.tar
glibc-6900ded22f42f38175a7810f7c68dbfeef8b8f3a.tar.gz
glibc-6900ded22f42f38175a7810f7c68dbfeef8b8f3a.tar.bz2
glibc-6900ded22f42f38175a7810f7c68dbfeef8b8f3a.zip
Update.
2003-02-03 Jakub Jelinek <jakub@redhat.com> * sysdeps/sparc/sparc32/elf/configure.in (BROKEN_SPARC_WDISP22): New check. * config.h.in (BROKEN_SPARC_WDISP22): Add.
Diffstat (limited to 'sysdeps/sparc')
-rw-r--r--sysdeps/sparc/sparc32/elf/configure32
-rw-r--r--sysdeps/sparc/sparc32/elf/configure.in17
2 files changed, 49 insertions, 0 deletions
diff --git a/sysdeps/sparc/sparc32/elf/configure b/sysdeps/sparc/sparc32/elf/configure
index db0714615a..d4f9517959 100644
--- a/sysdeps/sparc/sparc32/elf/configure
+++ b/sysdeps/sparc/sparc32/elf/configure
@@ -55,3 +55,35 @@ _ACEOF
fi
fi
+
+# Check for broken WDISP22 in the linker.
+echo "$as_me:$LINENO: checking for sparc32 ld WDISP22 handling" >&5
+echo $ECHO_N "checking for sparc32 ld WDISP22 handling... $ECHO_C" >&6
+if test "${libc_cv_sparc32_wdisp22+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ echo 'bne foo; nop' > conftest1.s
+echo '.globl foo; .hidden foo; foo: nop' > conftest2.s
+libc_cv_sparc32_wdisp22=unknown
+if { ac_try='${CC-cc} -nostdlib -shared $CFLAGS conftest1.s conftest2.s -o conftest.so 1>&5'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; 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*
+fi
+echo "$as_me:$LINENO: result: $libc_cv_sparc32_wdisp22" >&5
+echo "${ECHO_T}$libc_cv_sparc32_wdisp22" >&6
+if test $libc_cv_sparc32_wdisp22 != ok; then
+ cat >>confdefs.h <<\_ACEOF
+#define BROKEN_SPARC_WDISP22 1
+_ACEOF
+
+fi
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