]> sourceware.org Git - glibc.git/commitdiff
Distinguish configure check for .ctors/.dtors header/trailers.
authorRoland McGrath <roland@hack.frob.com>
Tue, 28 Jun 2011 03:39:05 +0000 (20:39 -0700)
committerRoland McGrath <roland@hack.frob.com>
Tue, 28 Jun 2011 03:39:05 +0000 (20:39 -0700)
ChangeLog
configure
configure.in

index 94dac81fabbbf89785fc52517d56b07174d1e5ec..76779f3993d645c608331fbbb3f1f4923833b256 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2011-06-27  Roland McGrath  <roland@hack.frob.com>
 
+       * configure.in (NO_CTORS_DTORS_SECTIONS): Give this check its own
+       AC_CACHE_CHECK invocation.
+       * configure: Regenerated.
+
        * elf/soinit.c (__CTOR_LIST__, __DTOR_LIST__): Add used attribute.
 
 2011-06-27  Ulrich Drepper  <drepper@gmail.com>
index 1db57ae38c98a7c8ab048f771d861095ba07834e..7814072a816002899ac9a42f165b3185a1197b26 100755 (executable)
--- a/configure
+++ b/configure
@@ -6111,12 +6111,28 @@ fi
 $as_echo "$libc_cv_initfini_array" >&6; }
   if test $libc_cv_initfini_array != yes; then
     as_fn_error $? "Need linker with .init_array/.fini_array support." "$LINENO" 5
-  elif { ac_try='${CC-cc} -Wl,--verbose 2>&1|grep SORT_BY_INIT_PRIORITY 1>&5'
+  fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use .ctors/.dtors header and trailer" >&5
+$as_echo_n "checking whether to use .ctors/.dtors header and trailer... " >&6; }
+if ${libc_cv_ctors_header+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+    if { ac_try='${CC-cc} -Wl,--verbose 2>&1|grep SORT_BY_INIT_PRIORITY 1>&5'
   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then
+    libc_cv_ctors_header=no
+  else
+    libc_cv_ctors_header=yes
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ctors_header" >&5
+$as_echo "$libc_cv_ctors_header" >&6; }
+
+  if test $libc_cv_ctors_header = no; then
     $as_echo "#define NO_CTORS_DTORS_SECTIONS 1" >>confdefs.h
 
   fi
index d3f521031648be46b6e65bf651cf26a57e89f803..fc2a1933212cc9ce91844f50f050e8f4b50699bb 100644 (file)
@@ -1479,7 +1479,17 @@ EOF
   rm -f conftest*])
   if test $libc_cv_initfini_array != yes; then
     AC_MSG_ERROR([Need linker with .init_array/.fini_array support.])
-  elif AC_TRY_COMMAND([${CC-cc} -Wl,--verbose 2>&1|grep SORT_BY_INIT_PRIORITY 1>&AS_MESSAGE_LOG_FD]); then
+  fi
+
+  AC_CACHE_CHECK(whether to use .ctors/.dtors header and trailer,
+                libc_cv_ctors_header, [dnl
+  if AC_TRY_COMMAND([${CC-cc} -Wl,--verbose 2>&1|grep SORT_BY_INIT_PRIORITY 1>&AS_MESSAGE_LOG_FD]); then
+    libc_cv_ctors_header=no
+  else
+    libc_cv_ctors_header=yes
+  fi])
+
+  if test $libc_cv_ctors_header = no; then
     AC_DEFINE(NO_CTORS_DTORS_SECTIONS)
   fi
 
This page took 0.056534 seconds and 5 git commands to generate.