This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch hjl/global updated. glibc-2.16-ports-merge-746-g11cb1d1


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, hjl/global has been updated
       via  11cb1d1fa219e5d1ddd9e7ebaada86ad5bcac4f2 (commit)
      from  f21818005839ca578e3bb0a30939e4b7d4d188b5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=11cb1d1fa219e5d1ddd9e7ebaada86ad5bcac4f2

commit 11cb1d1fa219e5d1ddd9e7ebaada86ad5bcac4f2
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Nov 21 10:14:38 2012 -0800

    Use LIBC_LINKER_FEATURE to check -z global support

diff --git a/aclocal.m4 b/aclocal.m4
index b173e9e..346855e 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -213,3 +213,30 @@ AC_DEFUN([ACX_BUGURL],[
   AC_SUBST(REPORT_BUGS_TO)
   AC_SUBST(REPORT_BUGS_TEXI)
 ])
+
+dnl Check linker option support.
+dnl LIBC_LINKER_FEATURE([ld_option], [cc_option], [action-if-true], [action-if-false])
+AC_DEFUN([LIBC_LINKER_FEATURE],
+[AC_MSG_CHECKING([for linker that supports $1])
+libc_linker_feature=no
+if test x"$gnu_ld" = x"yes"; then
+  libc_linker_check=`$LD -v --help 2>/dev/null | grep "\$1"`
+  if test -n "$libc_linker_check"; then
+    cat > conftest.c <<EOF
+int _start (void) { return 42; }
+EOF
+    if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $2 -nostdlib
+				-fPIC -shared -o conftest.so conftest.c
+				1>&AS_MESSAGE_LOG_FD])
+    then
+      libc_linker_feature=yes
+    fi
+    rm -f conftest*
+  fi
+fi
+if test $libc_linker_feature = yes; then
+  $3
+else
+  $4
+fi
+AC_MSG_RESULT($libc_linker_feature)])
diff --git a/configure b/configure
index e612f6e..f53c512 100755
--- a/configure
+++ b/configure
@@ -613,12 +613,12 @@ fno_unit_at_a_time
 libc_cv_output_format
 libc_cv_hashstyle
 libc_cv_fpie
-libc_cv_z_global
 libc_cv_z_execstack
 libc_cv_z_combreloc
 ASFLAGS_config
 libc_cv_Bgroup
 libc_cv_cc_with_libunwind
+libc_cv_z_global
 VERSIONING
 BISON
 INSTALL_INFO
@@ -6158,6 +6158,38 @@ if test $libc_cv_initfini_array != yes; then
   as_fn_error $? "Need linker with .init_array/.fini_array support." "$LINENO" 5
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker that supports -z global" >&5
+$as_echo_n "checking for linker that supports -z global... " >&6; }
+libc_linker_feature=no
+if test x"$gnu_ld" = x"yes"; then
+  libc_linker_check=`$LD -v --help 2>/dev/null | grep "\-z global"`
+  if test -n "$libc_linker_check"; then
+    cat > conftest.c <<EOF
+int _start (void) { return 42; }
+EOF
+    if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -Wl,-z,global -nostdlib
+				-fPIC -shared -o conftest.so conftest.c
+				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_linker_feature=yes
+    fi
+    rm -f conftest*
+  fi
+fi
+if test $libc_linker_feature = yes; then
+  libc_cv_z_global=yes
+else
+  libc_cv_z_global=no
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_linker_feature" >&5
+$as_echo "$libc_linker_feature" >&6; }
+
+
 { $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 :
@@ -6540,34 +6572,6 @@ fi
 $as_echo "$libc_cv_z_execstack" >&6; }
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -z global" >&5
-$as_echo_n "checking for -z global... " >&6; }
-if ${libc_cv_z_global+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat > conftest.c <<EOF
-int _start (void) { return 42; }
-EOF
-if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-			    -fPIC -shared -o conftest.so conftest.c
-			    -Wl,-z,global -nostdlib
-			    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_z_global=yes
-else
-  libc_cv_z_global=no
-fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_z_global" >&5
-$as_echo "$libc_cv_z_global" >&6; }
-
-
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fpie" >&5
 $as_echo_n "checking for -fpie... " >&6; }
 if ${libc_cv_fpie+:} false; then :
diff --git a/configure.in b/configure.in
index c45fc2b..d345e00 100644
--- a/configure.in
+++ b/configure.in
@@ -1362,6 +1362,10 @@ if test $libc_cv_initfini_array != yes; then
   AC_MSG_ERROR([Need linker with .init_array/.fini_array support.])
 fi
 
+LIBC_LINKER_FEATURE([-z global], [-Wl,-z,global],
+		    [libc_cv_z_global=yes], [libc_cv_z_global=no])
+AC_SUBST(libc_cv_z_global)
+
 AC_CACHE_CHECK(whether to use .ctors/.dtors header and trailer,
 	       libc_cv_ctors_header, [dnl
   libc_cv_ctors_header=yes
@@ -1610,23 +1614,6 @@ fi
 rm -f conftest*])
 AC_SUBST(libc_cv_z_execstack)
 
-AC_CACHE_CHECK(for -z global,
-	       libc_cv_z_global, [dnl
-cat > conftest.c <<EOF
-int _start (void) { return 42; }
-EOF
-if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-			    -fPIC -shared -o conftest.so conftest.c
-			    -Wl,-z,global -nostdlib
-			    1>&AS_MESSAGE_LOG_FD])
-then
-  libc_cv_z_global=yes
-else
-  libc_cv_z_global=no
-fi
-rm -f conftest*])
-AC_SUBST(libc_cv_z_global)
-
 AC_CACHE_CHECK(for -fpie, libc_cv_fpie, [dnl
 LIBC_TRY_CC_OPTION([-fpie], [libc_cv_fpie=yes], [libc_cv_fpie=no])
 ])

-----------------------------------------------------------------------

Summary of changes:
 aclocal.m4   |   27 +++++++++++++++++++++++++
 configure    |   62 ++++++++++++++++++++++++++++++---------------------------
 configure.in |   21 +++---------------
 3 files changed, 64 insertions(+), 46 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]