alpha: Adjust the libc_cv_alpha_hidden_gprel test for gcc 4.5.
authorRichard Henderson <rth@twiddle.net>
Fri, 26 Mar 2010 17:27:37 +0000 (10:27 -0700)
committerRichard Henderson <rth@twiddle.net>
Fri, 26 Mar 2010 20:17:52 +0000 (13:17 -0700)
GCC 4.5 was able to tell that BAR was read-only and zero, and
elided the load.  Which caused the pattern match to fail.

Signed-off-by: Richard Henderson <rth@twiddle.net>
ChangeLog.alpha
sysdeps/alpha/elf/configure
sysdeps/alpha/elf/configure.in

index 4e2eb5b..948cdc6 100644 (file)
@@ -1,5 +1,11 @@
 2010-03-26  Richard Henderson  <rth@redhat.com>
 
+       * sysdep/alpha/elf/configure.in (libc_cv_alpha_hidden_gprel)
+       Adjust the test for gcc 4.5.
+       * sysdep/alpha/elf/configure: Rebuild.
+
+2010-03-26  Richard Henderson  <rth@redhat.com>
+
        * sysdeps/alpha/bits/atomic.h (__arch_exchange_8_int,
        __arch_exchange_16_int, __arch_exchange_32_int,
        __arch_exchange_64_int, __arch_exchange_and_add_32_int,
index ea99e35..1d594dc 100644 (file)
@@ -4,10 +4,10 @@
 if test "$usetls" != no; then
 # Check for support of thread-local storage handling in assembler and
 # linker.
-echo "$as_me:$LINENO: checking for Alpha TLS support" >&5
-echo $ECHO_N "checking for Alpha TLS support... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for Alpha TLS support" >&5
+$as_echo_n "checking for Alpha TLS support... " >&6; }
 if test "${libc_cv_alpha_tls+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   cat > conftest.s <<\EOF
        .section ".tdata", "awT", @progbits
@@ -47,7 +47,7 @@ if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   libc_cv_alpha_tls=yes
 else
@@ -55,8 +55,8 @@ else
 fi
 rm -f conftest*
 fi
-echo "$as_me:$LINENO: result: $libc_cv_alpha_tls" >&5
-echo "${ECHO_T}$libc_cv_alpha_tls" >&6
+{ $as_echo "$as_me:$LINENO: result: $libc_cv_alpha_tls" >&5
+$as_echo "$libc_cv_alpha_tls" >&6; }
 if test $libc_cv_alpha_tls = yes; then
   cat >>confdefs.h <<\_ACEOF
 #define HAVE_TLS_SUPPORT 1
@@ -65,19 +65,15 @@ _ACEOF
 fi
 fi
 
-echo "$as_me:$LINENO: checking for GP relative module local relocs" >&5
-echo $ECHO_N "checking for GP relative module local relocs... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for GP relative module local relocs" >&5
+$as_echo_n "checking for GP relative module local relocs... " >&6; }
 if test "${libc_cv_alpha_hidden_gprel+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   cat > conftest.c <<\EOF
-static int bar;
+static volatile int bar;
 int baz __attribute__((visibility("hidden")));
-
-int foo (void)
-{
-  return bar + baz;
-}
+int f(void) { return bar + baz; }
 EOF
 
 libc_cv_alpha_hidden_gprel=no
@@ -85,7 +81,7 @@ if { ac_try='${CC-cc} -S $CFLAGS -O2 -fpic conftest.c 1>&5'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   if grep -q 'bar.*!gprel' conftest.s \
      && grep -q 'baz.*!gprel' conftest.s \
@@ -96,8 +92,8 @@ if { ac_try='${CC-cc} -S $CFLAGS -O2 -fpic conftest.c 1>&5'
 fi
 rm -f conftest*
 fi
-echo "$as_me:$LINENO: result: $libc_cv_alpha_hidden_gprel" >&5
-echo "${ECHO_T}$libc_cv_alpha_hidden_gprel" >&6
+{ $as_echo "$as_me:$LINENO: result: $libc_cv_alpha_hidden_gprel" >&5
+$as_echo "$libc_cv_alpha_hidden_gprel" >&6; }
 if test $libc_cv_alpha_hidden_gprel = yes; then
   cat >>confdefs.h <<\_ACEOF
 #define PI_STATIC_AND_HIDDEN 1
index 7986814..3a47934 100644 (file)
@@ -53,13 +53,9 @@ fi
 
 AC_CACHE_CHECK(for GP relative module local relocs, libc_cv_alpha_hidden_gprel, [dnl
 cat > conftest.c <<\EOF
-static int bar;
+static volatile int bar;
 int baz __attribute__((visibility("hidden")));
-
-int foo (void)
-{
-  return bar + baz;
-}
+int f(void) { return bar + baz; }
 EOF
 dnl