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/gold created. glibc-2.25-551-ga06e7bf


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  a06e7bf9afac12731ccdc049f760bbfdfb4080ff (commit)

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a06e7bf9afac12731ccdc049f760bbfdfb4080ff

commit a06e7bf9afac12731ccdc049f760bbfdfb4080ff
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 97a2dad..f68f6bb 100755
--- a/configure
+++ b/configure
@@ -783,6 +783,7 @@ enable_nss_crypt
 enable_obsolete_rpc
 enable_obsolete_nsl
 enable_systemtap
+enable_gold
 enable_build_nscd
 enable_nscd
 enable_pt_chown
@@ -1456,6 +1457,7 @@ Optional Features:
   --enable-obsolete-nsl   build and install the obsolete libnsl library and
                           depending NSS modules
   --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
@@ -3690,6 +3692,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
@@ -4662,7 +4672,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
@@ -4710,10 +4729,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;;
 
@@ -4722,9 +4741,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 16e97d3..f2bd800 100644
--- a/configure.ac
+++ b/configure.ac
@@ -408,6 +408,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])],
@@ -1076,10 +1082,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


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