diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2012-10-09 18:53:36 +0800 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2012-10-09 19:05:49 +0800 |
commit | 00e287bea815b3c2a55447d91b3911a4bb014072 (patch) | |
tree | ec89be4fd741f584de3ef4a1b9fcb37b6f977337 /gcc-4.7/gcc/configure | |
parent | 3800bda255b20023e993ed786674f70c909d60b5 (diff) | |
download | toolchain_gcc-00e287bea815b3c2a55447d91b3911a4bb014072.tar.gz toolchain_gcc-00e287bea815b3c2a55447d91b3911a4bb014072.tar.bz2 toolchain_gcc-00e287bea815b3c2a55447d91b3911a4bb014072.zip |
[4.7] Add -fuse-ld=
Google ref 54218-p2
2011-06-27 Doug Kwan <dougkwan@google.com>
Google ref 41164-p2
Backport upstream patch under review.
2011-01-19 NNick Clifton <nickc@redhat.com>
Matthias Klose <doko@debian.org>
* configure.ac (gcc_cv_gold_srcdir): New cached variable -
contains the location of the gold sources.
(ORIGINAL_GOLD_FOR_TARGET): New substituted variable - contains
the name of the locally built gold executable.
* configure: Regenerate.
* collect2.c (main): Detect the -use-gold and -use-ld switches
and select the appropriate linker, if found.
If a linker cannot be found and collect2 is executing in
verbose mode then report the search paths examined.
* exec-tool.in: Detect the -use-gold and -use-ld switches and
select the appropriate linker, if found.
Add support for -v switch.
Report problems locating linker executable.
* gcc.c (LINK_COMMAND_SPEC): Translate -fuse-ld=gold into
-use-gold and -fuse-ld=bfd into -use-ld.
* common.opt: Add fuse-ld=gold and fuse-ld=bfd.
* opts.c (comman_handle_option): Ignore -fuse-ld=gold and
-fuse-ld=bfd.
* doc/invoke.texi: Document the new options.
Change-Id: I659dd3f53b8ee23667fec0d7d77efc90155cdf43
Diffstat (limited to 'gcc-4.7/gcc/configure')
-rwxr-xr-x | gcc-4.7/gcc/configure | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc-4.7/gcc/configure b/gcc-4.7/gcc/configure index 52cc6b6f0..593e816a6 100755 --- a/gcc-4.7/gcc/configure +++ b/gcc-4.7/gcc/configure @@ -681,6 +681,7 @@ gcc_cv_readelf gcc_cv_objdump ORIGINAL_NM_FOR_TARGET gcc_cv_nm +ORIGINAL_GOLD_FOR_TARGET ORIGINAL_LD_FOR_TARGET ORIGINAL_PLUGIN_LD_FOR_TARGET gcc_cv_ld @@ -21560,6 +21561,21 @@ fi fi fi +gcc_cv_ld_gold_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gold + +if test "${gcc_cv_gold+set}" = set; then : + +else + +if test -f $gcc_cv_ld_gold_srcdir/configure.ac \ + && test -f ../gold/Makefile \ + && test x$build = x$host; then + gcc_cv_gold=../gold/ld-new$build_exeext +else + gcc_cv_gold='' +fi +fi + ORIGINAL_PLUGIN_LD_FOR_TARGET=$gcc_cv_ld PLUGIN_LD=`basename $gcc_cv_ld` @@ -21599,6 +21615,9 @@ case "$ORIGINAL_LD_FOR_TARGET" in ;; esac +ORIGINAL_GOLD_FOR_TARGET=$gcc_cv_gold + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking what linker to use" >&5 $as_echo_n "checking what linker to use... " >&6; } if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext \ |