summaryrefslogtreecommitdiff
path: root/gcc/configure
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-26 13:31:25 +0000
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-26 13:31:25 +0000
commit9b4ea463fc15ddb0fedd91c3365966fd1131065d (patch)
tree39b9cfc7867e282de9048571b137b32b0c4f4c06 /gcc/configure
parent41ead32b33eb7df3ed1f7340f1f3808b7a65de28 (diff)
downloadgcc-9b4ea463fc15ddb0fedd91c3365966fd1131065d.tar.gz
Add -fuse-ld=bfd/-fuse-ld=gold support to exec-tool.in
PR bootstrap/55552 * configure.ac (install_gold_as_default): New. Set to yes for --disable-ld or --enable-gold=default. (gcc_cv_ld_gold_srcdir): New. (gcc_cv_ld): Also check in-tree gold if install_gold_as_default is yes. (ORIGINAL_LD_BFD_FOR_TARGET): New AC_SUBST. (ORIGINAL_LD_GOLD_FOR_TARGET): Likewise. * configure: Regenerated. * exec-tool.in (ORIGINAL_LD_BFD_FOR_TARGET): New variable. (ORIGINAL_LD_GOLD_FOR_TARGET): Likewise. (original) [collect-ld && -fuse-ld=bfd]: Set to $ORIGINAL_LD_BFD_FOR_TARGET. (original) [collect-ld && -fuse-ld=gold]: Set to $ORIGINAL_LD_GOLD_FOR_TARGET. (dir) [collect-ld && ../gold/ld-new]: Set to gold. (fast_install) [collect-ld && ../gold/ld-new]: Set to yes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205392 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure')
-rwxr-xr-xgcc/configure57
1 files changed, 55 insertions, 2 deletions
diff --git a/gcc/configure b/gcc/configure
index c9bbd653e52..fdf0cd0819b 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -682,6 +682,8 @@ gcc_cv_readelf
gcc_cv_objdump
ORIGINAL_NM_FOR_TARGET
gcc_cv_nm
+ORIGINAL_LD_GOLD_FOR_TARGET
+ORIGINAL_LD_BFD_FOR_TARGET
ORIGINAL_LD_FOR_TARGET
ORIGINAL_PLUGIN_LD_FOR_TARGET
gcc_cv_ld
@@ -911,6 +913,8 @@ enable_static
with_pic
enable_fast_install
enable_libtool_lock
+enable_ld
+enable_gold
with_plugin_ld
enable_gnu_indirect_function
enable_initfini_array
@@ -1624,6 +1628,8 @@ Optional Features:
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
+ --enable-ld[=ARG] build ld [ARG={default,yes,no}]
+ --enable-gold[=ARG] build gold [ARG={default,yes,no}]
--enable-gnu-indirect-function
enable the use of the @gnu_indirect_function to
glibc systems
@@ -17913,7 +17919,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 17916 "configure"
+#line 17922 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -18019,7 +18025,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 18022 "configure"
+#line 18028 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -21397,6 +21403,39 @@ $as_echo "$gcc_cv_as" >&6; }
in_tree_gas=no
fi
+default_ld=
+# Check whether --enable-ld was given.
+if test "${enable_ld+set}" = set; then :
+ enableval=$enable_ld; case "${enableval}" in
+ no)
+ default_ld=ld.gold
+ ;;
+ esac
+fi
+
+
+# Check whether --enable-gold was given.
+if test "${enable_gold+set}" = set; then :
+ enableval=$enable_gold; case "${enableval}" in
+ default)
+ install_gold_as_default=yes
+ ;;
+ yes)
+ if test x${default_ld} != x; then
+ install_gold_as_default=yes
+ fi
+ ;;
+ no)
+ ;;
+ *)
+ as_fn_error "invalid --enable-gold argument" "$LINENO" 5
+ ;;
+ esac
+else
+ install_gold_as_default=no
+fi
+
+
# Identify the linker which will work hand-in-glove with the newly
# built GCC, so that we can examine its features. This is the linker
# which will be driven by the driver program.
@@ -21407,6 +21446,7 @@ fi
gcc_cv_gld_major_version=
gcc_cv_gld_minor_version=
gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
+gcc_cv_ld_gold_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gold
gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
if test "${gcc_cv_ld+set}" = set; then :
@@ -21415,6 +21455,11 @@ else
if test -x "$DEFAULT_LINKER"; then
gcc_cv_ld="$DEFAULT_LINKER"
+elif test $install_gold_as_default = yes \
+ && test -f $gcc_cv_ld_gold_srcdir/configure.ac \
+ && test -f ../gold/Makefile \
+ && test x$build = x$host; then
+ gcc_cv_ld=../gold/ld-new$build_exeext
elif test -f $gcc_cv_ld_gld_srcdir/configure.in \
&& test -f ../ld/Makefile \
&& test x$build = x$host; then
@@ -21544,12 +21589,20 @@ $as_echo "newly built ld" >&6; }
esac
gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
+ ORIGINAL_LD_BFD_FOR_TARGET=../ld/ld-new$build_exeext
+ ORIGINAL_LD_GOLD_FOR_TARGET=../gold/ld-new$build_exeext
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld" >&5
$as_echo "$gcc_cv_ld" >&6; }
in_tree_ld=no
+ gcc_cvs_ld_program=`dirname $gcc_cv_ld`/`basename $gcc_cv_ld $host_exeext`
+ ORIGINAL_LD_BFD_FOR_TARGET=${gcc_cvs_ld_program}.bfd$host_exeext
+ ORIGINAL_LD_GOLD_FOR_TARGET=${gcc_cvs_ld_program}.gold$host_exeext
fi
+
+
+
# Figure out what nm we will be using.
gcc_cv_binutils_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/binutils
if test "${gcc_cv_nm+set}" = set; then :