This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch hjl/gold created. glibc-2.21-212-g0d4ca73
- From: hjl at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 22 Mar 2015 03:59:09 -0000
- Subject: GNU C Library master sources branch hjl/gold created. glibc-2.21-212-g0d4ca73
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/gold has been created
at 0d4ca730e0b058df744dd0d2ab73ebae8a38000d (commit)
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0d4ca730e0b058df744dd0d2ab73ebae8a38000d
commit 0d4ca730e0b058df744dd0d2ab73ebae8a38000d
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Sat Mar 21 20:54:35 2015 -0700
Add --enable-gold to allow gold for glibc build
Add --enable-gold so that gold can be used to configure and build glibc
with:
CC="gcc -fuse-ld=gold" CXX="g++ -fuse-ld=gold" CFLAGS="-O2 -g" .../glibc/configure --prefix=/usr --target=x86_64-linux --build=x86_64-linux --host=x86_64-linux --enable-hardcoded-path-in-tests --enable-gold
diff --git a/configure b/configure
index 71cc6bb..692168b 100755
--- a/configure
+++ b/configure
@@ -773,6 +773,7 @@ enable_multi_arch
enable_nss_crypt
enable_obsolete_rpc
enable_systemtap
+enable_gold
enable_build_nscd
enable_nscd
enable_pt_chown
@@ -1437,6 +1438,7 @@ Optional Features:
--enable-obsolete-rpc build and install the obsolete RPC code for
link-time usage
--enable-systemtap enable systemtap static probe points [default=no]
+ --enable-gold use gold to build glibc [default=no]
--disable-build-nscd disable building and installing the nscd daemon
--disable-nscd library functions will not contact the nscd daemon
--enable-pt_chown Enable building and installing pt_chown
@@ -3801,6 +3803,14 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
+# Check whether --enable-gold was given.
+if test "${enable_gold+set}" = set; then :
+ enableval=$enable_gold; enable_gold=$enableval
+else
+ enable_gold=no
+fi
+
+
# Check whether --enable-build-nscd was given.
if test "${enable_build_nscd+set}" = set; then :
enableval=$enable_build_nscd; build_nscd=$enableval
@@ -4647,7 +4657,16 @@ if test $ac_verc_fail = yes; then
AS=: critic_missing="$critic_missing as"
fi
-for ac_prog in $LD
+
+# Accept gold 1.11 or higher
+if test -n "`$LD --version | sed -n 's/^GNU \(gold\).*$/\1/p'`"; then
+ case $LD in
+ *ld.gold) LD_BFD="`echo $LD | sed -e 's/.gold$/.bfd/'`";;
+ *ld) LD_BFD=${LD}.bfd;;
+ *) as_fn_error $? "unsupported gold linker: $LD" "$LINENO" 5;;
+ esac
+ ld_is_gold=yes
+ for ac_prog in $LD
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
@@ -4695,10 +4714,10 @@ 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 gold.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'`
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
- 2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*)
+ 1.1[1-9]*|1.[2-9][0-9]*|1.1[0-9][0-9]*|[2-9].*|[1-9][0-9]*)
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
@@ -4707,9 +4726,13 @@ $as_echo_n "checking version of $LD... " >&6; }
$as_echo "$ac_prog_version" >&6; }
fi
if test $ac_verc_fail = yes; then
- LD=: critic_missing="$critic_missing ld"
+ LD=:
fi
+else
+ ld_is_gold=no
+ LD_BFD=$LD
+fi
# These programs are version sensitive.
diff --git a/configure.ac b/configure.ac
index 678c739..d33654c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -345,6 +345,12 @@ void foo (int i, void *p)
fi
fi
+AC_ARG_ENABLE(gold,
+ [AS_HELP_STRING([--enable-gold],
+ [use gold to build glibc @<:@default=no@:>@])],
+ [enable_gold=$enableval],
+ [enable_gold=no])
+
AC_ARG_ENABLE([build-nscd],
[AS_HELP_STRING([--disable-build-nscd],
[disable building and installing the nscd daemon])],
@@ -933,10 +939,23 @@ AC_CHECK_PROG_VER(AS, $AS, --version,
[GNU assembler.* \([0-9]*\.[0-9.]*\)],
[2.1[0-9][0-9]*|2.2[2-9]*|2.[3-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.]*\)],
- [2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*],
- LD=: critic_missing="$critic_missing ld")
+
+# Accept gold 1.11 or higher
+if test -n "`$LD --version | sed -n 's/^GNU \(gold\).*$/\1/p'`"; then
+ case $LD in
+ *ld.gold) LD_BFD="`echo $LD | sed -e 's/.gold$/.bfd/'`";;
+ *ld) LD_BFD=${LD}.bfd;;
+ *) AC_MSG_ERROR([unsupported gold linker: $LD]);;
+ esac
+ ld_is_gold=yes
+ AC_CHECK_PROG_VER(LD, $LD, --version,
+ [GNU gold.* \([0-9][0-9]*\.[0-9.]*\)],
+ [1.1[1-9]*|1.[2-9][0-9]*|1.1[0-9][0-9]*|[2-9].*|[1-9][0-9]*],
+ LD=:)
+else
+ ld_is_gold=no
+ LD_BFD=$LD
+fi
# These programs are version sensitive.
AC_CHECK_TOOL_PREFIX
-----------------------------------------------------------------------
hooks/post-receive
--
GNU C Library master sources