This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, roland/gold-vs-libc, created. glibc-2.14-100-g8d2d862
- From: roland at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 9 Jul 2011 21:51:38 -0000
- Subject: GNU C Library master sources branch, roland/gold-vs-libc, created. glibc-2.14-100-g8d2d862
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, roland/gold-vs-libc has been created
at 8d2d86277884e847ba02a798b42e12c99773bfc3 (commit)
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8d2d86277884e847ba02a798b42e12c99773bfc3
commit 8d2d86277884e847ba02a798b42e12c99773bfc3
Author: Roland McGrath <roland@hack.frob.com>
Date: Fri Jun 10 11:04:42 2011 -0700
Make ld --version output matching grok gold's output.
diff --git a/ChangeLog b/ChangeLog
index 7a365a0..517f46c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2011-07-02 Roland McGrath <roland@hack.frob.com>
+ * configure.in: Make ld --version output matching grok gold's output.
+ * configure: Regenerated.
+
* configure.in (use-default-link): Default to yes if a test -shared
link meets our qualifications.
* configure: Regenerated.
diff --git a/configure b/configure
index 55494ba..06ebecf 100755
--- a/configure
+++ b/configure
@@ -4843,7 +4843,7 @@ else
# Found it, now check the version.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $LD" >&5
$as_echo_n "checking version of $LD... " >&6; }
- ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'`
+ ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU [Bbinutilsd][^.]* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'`
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
2.1[3-9]*|2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*)
diff --git a/configure.in b/configure.in
index de666ca..64af4d9 100644
--- a/configure.in
+++ b/configure.in
@@ -1010,7 +1010,7 @@ AC_CHECK_PROG_VER(AS, $AS, --version,
[GNU assembler.* \([0-9]*\.[0-9.]*\)],
[2.1[3-9]*|2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*], AS=: critic_missing="$critic_missing as")
AC_CHECK_PROG_VER(LD, $LD, --version,
- [GNU ld.* \([0-9][0-9]*\.[0-9.]*\)],
+ [GNU [Bbinutilsd][^.]* \([0-9][0-9]*\.[0-9.]*\)],
[2.1[3-9]*|2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*], LD=: critic_missing="$critic_missing ld")
# We need the physical current working directory. We cannot use the
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d4c7192f447845e8fba03933a88dff850e9a8d9a
commit d4c7192f447845e8fba03933a88dff850e9a8d9a
Author: Roland McGrath <roland@hack.frob.com>
Date: Sat Jun 11 05:14:37 2011 -0700
Default to --with-default-link=yes if configure check finds good -shared layout.
diff --git a/ChangeLog b/ChangeLog
index be04658..7a365a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2011-07-02 Roland McGrath <roland@hack.frob.com>
+ * configure.in (use-default-link): Default to yes if a test -shared
+ link meets our qualifications.
+ * configure: Regenerated.
+
* config.make.in (output-format): New variable.
* configure.in: Check for ld --print-output-format support.
* configure: Regenerated.
diff --git a/configure b/configure
index bbefa34..55494ba 100755
--- a/configure
+++ b/configure
@@ -1469,7 +1469,7 @@ Optional Packages:
--without-cvs if CVS should not be used
--with-headers=PATH location of system headers to use (for example
/usr/src/linux/include) [default=compiler default]
- --with-default-link do not use explicit linker scripts [default=no]
+ --with-default-link do not use explicit linker scripts
--with-tls enable support for TLS
--without-__thread do not use TLS features even when supporting them
--with-cpu=CPU select code for CPU variant
@@ -3593,7 +3593,7 @@ fi
if test "${with_default_link+set}" = set; then :
withval=$with_default_link; use_default_link=$withval
else
- use_default_link=no
+ use_default_link=default
fi
@@ -6695,6 +6695,69 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_hashstyle" >&5
$as_echo "$libc_cv_hashstyle" >&6; }
+
+ # The linker's default -shared behavior is good enough if it
+ # does these things that our custom linker scripts ensure that
+ # all allocated NOTE sections come first.
+ if test "$use_default_link" = default; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sufficient default -shared layout" >&5
+$as_echo_n "checking for sufficient default -shared layout... " >&6; }
+if ${libc_cv_use_default_link+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ libc_cv_use_default_link=no
+ cat > conftest.s <<\EOF
+ .section .note.a,"a",%note
+ .balign 4
+ .long 4,4,9
+ .string "GNU"
+ .string "foo"
+ .section .note.b,"a",%note
+ .balign 4
+ .long 4,4,9
+ .string "GNU"
+ .string "bar"
+EOF
+ if { ac_try=' ${CC-cc} $ASFLAGS -shared -o conftest.so conftest.s 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; }; } &&
+ ac_try=`$READELF -S conftest.so | sed -n \
+ '${x;p;}
+ s/^ *\[ *[1-9][0-9]*\] *\([^ ][^ ]*\) *\([^ ][^ ]*\) .*$/\2 \1/
+ t a
+ b
+ : a
+ H'`
+ then
+ libc_seen_a=no libc_seen_b=no
+ set -- $ac_try
+ while test $# -ge 2 -a "$1" = NOTE; do
+ case "$2" in
+ .note.a) libc_seen_a=yes ;;
+ .note.b) libc_seen_b=yes ;;
+ esac
+ shift 2
+ done
+ case "$libc_seen_a$libc_seen_b" in
+ yesyes)
+ libc_cv_use_default_link=yes
+ ;;
+ *)
+ echo >&5 "\
+$libc_seen_a$libc_seen_b from:
+$ac_try"
+ ;;
+ esac
+ fi
+ rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_use_default_link" >&5
+$as_echo "$libc_cv_use_default_link" >&6; }
+ use_default_link=$libc_cv_use_default_link
+ fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker output format" >&5
diff --git a/configure.in b/configure.in
index 18f6ad8..de666ca 100644
--- a/configure.in
+++ b/configure.in
@@ -117,10 +117,9 @@ AC_ARG_WITH([headers],
AC_SUBST(use_default_link)
AC_ARG_WITH([default-link],
AC_HELP_STRING([--with-default-link],
- [do not use explicit linker scripts
- @<:@default=no@:>@]),
+ [do not use explicit linker scripts]),
[use_default_link=$withval],
- [use_default_link=no])
+ [use_default_link=default])
AC_ARG_ENABLE([sanity-checks],
AC_HELP_STRING([--disable-sanity-checks],
@@ -1794,6 +1793,59 @@ EOF
fi
rm -f conftest*])
AC_SUBST(libc_cv_hashstyle)
+
+ # The linker's default -shared behavior is good enough if it
+ # does these things that our custom linker scripts ensure that
+ # all allocated NOTE sections come first.
+ if test "$use_default_link" = default; then
+ AC_CACHE_CHECK([for sufficient default -shared layout],
+ libc_cv_use_default_link, [dnl
+ libc_cv_use_default_link=no
+ cat > conftest.s <<\EOF
+ .section .note.a,"a",%note
+ .balign 4
+ .long 4,4,9
+ .string "GNU"
+ .string "foo"
+ .section .note.b,"a",%note
+ .balign 4
+ .long 4,4,9
+ .string "GNU"
+ .string "bar"
+EOF
+ if AC_TRY_COMMAND([dnl
+ ${CC-cc} $ASFLAGS -shared -o conftest.so conftest.s 1>&AS_MESSAGE_LOG_FD]) &&
+ ac_try=`$READELF -S conftest.so | sed -n \
+ ['${x;p;}
+ s/^ *\[ *[1-9][0-9]*\] *\([^ ][^ ]*\) *\([^ ][^ ]*\) .*$/\2 \1/
+ t a
+ b
+ : a
+ H']`
+ then
+ libc_seen_a=no libc_seen_b=no
+ set -- $ac_try
+ while test $# -ge 2 -a "$1" = NOTE; do
+ case "$2" in
+ .note.a) libc_seen_a=yes ;;
+ .note.b) libc_seen_b=yes ;;
+ esac
+ shift 2
+ done
+ case "$libc_seen_a$libc_seen_b" in
+ yesyes)
+ libc_cv_use_default_link=yes
+ ;;
+ *)
+ echo >&AS_MESSAGE_LOG_FD "\
+$libc_seen_a$libc_seen_b from:
+$ac_try"
+ ;;
+ esac
+ fi
+ rm -f conftest*])
+ use_default_link=$libc_cv_use_default_link
+ fi
fi
AC_CACHE_CHECK(linker output format, libc_cv_output_format, [dnl
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=afe19c36a187f8f5d02712659602d83a464039f8
commit afe19c36a187f8f5d02712659602d83a464039f8
Author: Roland McGrath <roland@hack.frob.com>
Date: Sat Jun 11 00:45:12 2011 -0700
Use linker --print-output-format option if available.
diff --git a/ChangeLog b/ChangeLog
index b2d282f..be04658 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-07-02 Roland McGrath <roland@hack.frob.com>
+
+ * config.make.in (output-format): New variable.
+ * configure.in: Check for ld --print-output-format support.
+ * configure: Regenerated.
+ * Makerules ($(common-objpfx)format.lds)
+ [$(output-format) != unknown]: Just use $(output-format),
+ instead of the linker-script munging.
+
2011-07-09 Roland McGrath <roland@hack.frob.com>
* configure.in (.ctors/.dtors header and trailer check):
diff --git a/Makerules b/Makerules
index d70a196..a8b575c 100644
--- a/Makerules
+++ b/Makerules
@@ -990,11 +990,15 @@ install: $(inst_slibdir)/libc.so$(libc.so-version)
$(common-objpfx)format.lds: $(..)scripts/output-format.sed \
$(common-objpfx)config.make \
$(common-objpfx)config.h $(..)Makerules
+ifneq (unknown,$(output-format))
+ echo > $@.new 'OUTPUT_FORMAT($(output-format))'
+else
$(LINK.o) -shared $(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS.so) \
-x c /dev/null -o $@.so -Wl,--verbose -v 2>&1 \
| sed -n -f $< > $@.new
test -s $@.new
rm -f $@.so
+endif
mv -f $@.new $@
common-generated += format.lds
diff --git a/config.make.in b/config.make.in
index b73b21e..407ebc1 100644
--- a/config.make.in
+++ b/config.make.in
@@ -70,6 +70,7 @@ fno-unit-at-a-time = @fno_unit_at_a_time@
bind-now = @bindnow@
have-hash-style = @libc_cv_hashstyle@
use-default-link = @use_default_link@
+output-format = @libc_cv_output_format@
static-libgcc = @libc_cv_gcc_static_libgcc@
diff --git a/configure b/configure
index ffeb890..bbefa34 100755
--- a/configure
+++ b/configure
@@ -647,6 +647,7 @@ libc_cv_have_initfini
gnu89_inline
libc_cv_ssp
fno_unit_at_a_time
+libc_cv_output_format
libc_cv_hashstyle
libc_cv_fpie
libc_cv_z_execstack
@@ -6696,6 +6697,24 @@ $as_echo "$libc_cv_hashstyle" >&6; }
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker output format" >&5
+$as_echo_n "checking linker output format... " >&6; }
+if ${libc_cv_output_format+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if libc_cv_output_format=`
+${CC-cc} -nostartfiles -nostdlib -Wl,--print-output-format 2>&5`
+then
+ :
+else
+ libc_cv_output_format=
+fi
+test -n "$libc_cv_output_format" || libc_cv_output_format=unknown
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_output_format" >&5
+$as_echo "$libc_cv_output_format" >&6; }
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fno-toplevel-reorder -fno-section-anchors" >&5
$as_echo_n "checking for -fno-toplevel-reorder -fno-section-anchors... " >&6; }
if ${libc_cv_fno_toplevel_reorder+:} false; then :
diff --git a/configure.in b/configure.in
index e18b343..18f6ad8 100644
--- a/configure.in
+++ b/configure.in
@@ -1796,6 +1796,17 @@ EOF
AC_SUBST(libc_cv_hashstyle)
fi
+AC_CACHE_CHECK(linker output format, libc_cv_output_format, [dnl
+if libc_cv_output_format=`
+${CC-cc} -nostartfiles -nostdlib -Wl,--print-output-format 2>&AS_MESSAGE_LOG_FD`
+then
+ :
+else
+ libc_cv_output_format=
+fi
+test -n "$libc_cv_output_format" || libc_cv_output_format=unknown])
+AC_SUBST(libc_cv_output_format)
+
AC_CACHE_CHECK(for -fno-toplevel-reorder -fno-section-anchors, libc_cv_fno_toplevel_reorder, [dnl
cat > conftest.c <<EOF
int foo;
-----------------------------------------------------------------------
hooks/post-receive
--
GNU C Library master sources