]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Tue, 4 Feb 2003 08:41:05 +0000 (08:41 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 4 Feb 2003 08:41:05 +0000 (08:41 +0000)
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.

ChangeLog
config.h.in
linuxthreads/ChangeLog
linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S
sysdeps/sparc/sparc32/elf/configure
sysdeps/sparc/sparc32/elf/configure.in

index 0588814beccc4b4f65eca8da5adf0247c073d030..3bccd1af8c0a67cea6ba2f632778dd484d376509 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
 
        * sysdeps/i386/i686/memmove.S: New file.
index 0b0a828151b4df8c054405695bc2e94ebe31f0cd..d00d33483bfc8f7a447e910187537271c7cd208e 100644 (file)
    certain registers (CR0, MQ, CTR, LR) in asm statements.  */
 #undef BROKEN_PPC_ASM_CR0
 
+/* Defined on SPARC if ld doesn't handle R_SPARC_WDISP22 against .hidden
+   symbol.  sysdeps/sparc/sparc32/elf/configure.  */
+#undef BROKEN_SPARC_WDISP22
+
 /* Define if the linker supports the -z combreloc option.  */
 #undef HAVE_Z_COMBRELOC
 
index 913e5d73dc750cf9ad20a796ce330679dd6dc09f..2678a6d018f7893f93a7f9f49df0ea721a1dec76 100644 (file)
@@ -1,3 +1,8 @@
+2003-02-03  Jakub Jelinek  <jakub@redhat.com>
+
+       * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): If
+       BROKEN_SPARC_WDISP22, handle SHARED the same way as non-SHARED.
+
 2003-02-04  Andreas Jaeger  <aj@suse.de>
 
        * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Do not use
index 456fe743629cd11ae95a60be8ba9a9ed9d3bf7c3..5e98554744fca0c63e2d8a97d6754c6df4a108cd 100644 (file)
@@ -23,7 +23,7 @@
 ENTRY(__vfork)
        ld      [%g7 + MULTIPLE_THREADS_OFFSET], %o0
        cmp     %o0, 0
-#ifdef SHARED
+#if defined SHARED && !defined BROKEN_SPARC_WDISP22
        bne     HIDDEN_JUMPTARGET(__fork)
 #else
        bne     1f
@@ -35,7 +35,7 @@ ENTRY(__vfork)
        sub     %o1, 1, %o1
        retl
         and    %o0, %o1, %o0
-#ifndef SHARED
+#if !defined SHARED || defined BROKEN_SPARC_WDISP22
 1:     mov     %o7, %g1
        call    HIDDEN_JUMPTARGET(__fork)
         mov    %g1, %o7
index db0714615aa3265cf7a5ad91466e71954c724882..d4f9517959ae324489db621cc05dd196ee5bd3ce 100644 (file)
@@ -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
index 0c0b5121e5f57d3370b68498678b1d55441a69e4..550bf4f8389d1e581e407631555c3db543175658 100644 (file)
@@ -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