diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2013-11-26 13:31:25 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2013-11-26 05:31:25 -0800 |
commit | 40f213e6f5bf36a5678a1ff5a75773d02df67f53 (patch) | |
tree | 39b9cfc7867e282de9048571b137b32b0c4f4c06 /gcc/exec-tool.in | |
parent | 84c44566f3f16c29b65a007944e0d3ea81b48c34 (diff) | |
download | gcc-40f213e6f5bf36a5678a1ff5a75773d02df67f53.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.
From-SVN: r205392
Diffstat (limited to 'gcc/exec-tool.in')
-rw-r--r-- | gcc/exec-tool.in | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/gcc/exec-tool.in b/gcc/exec-tool.in index 6722ce52030..76d0ef65ab1 100644 --- a/gcc/exec-tool.in +++ b/gcc/exec-tool.in @@ -21,6 +21,8 @@ ORIGINAL_AS_FOR_TARGET="@ORIGINAL_AS_FOR_TARGET@" ORIGINAL_LD_FOR_TARGET="@ORIGINAL_LD_FOR_TARGET@" +ORIGINAL_LD_BFD_FOR_TARGET="@ORIGINAL_LD_BFD_FOR_TARGET@" +ORIGINAL_LD_GOLD_FOR_TARGET="@ORIGINAL_LD_GOLD_FOR_TARGET@" ORIGINAL_PLUGIN_LD_FOR_TARGET="@ORIGINAL_PLUGIN_LD_FOR_TARGET@" ORIGINAL_NM_FOR_TARGET="@ORIGINAL_NM_FOR_TARGET@" exeext=@host_exeext@ @@ -36,15 +38,32 @@ case "$invoked" in dir=gas ;; collect-ld) - # when using a linker plugin, gcc will always pass '-plugin' as the - # first or second option to the linker. - if test x"$1" = "x-plugin" || test x"$2" = "x-plugin"; then - original=$ORIGINAL_PLUGIN_LD_FOR_TARGET + # Check -fuse-ld=bfd and -fuse-ld=gold + case " $* " in + *\ -fuse-ld=bfd\ *) + original=$ORIGINAL_LD_BFD_FOR_TARGET + ;; + *\ -fuse-ld=gold\ *) + original=$ORIGINAL_LD_GOLD_FOR_TARGET + ;; + *) + # when using a linker plugin, gcc will always pass '-plugin' as the + # first or second option to the linker. + if test x"$1" = "x-plugin" || test x"$2" = "x-plugin"; then + original=$ORIGINAL_PLUGIN_LD_FOR_TARGET + else + original=$ORIGINAL_LD_FOR_TARGET + fi + ;; + esac + prog=ld-new$exeext + if test "$original" = ../gold/ld-new$exeext; then + dir=gold + # No need to handle relink since gold doesn't use libtool. + fast_install=yes else - original=$ORIGINAL_LD_FOR_TARGET + dir=ld fi - prog=ld-new$exeext - dir=ld id=ld ;; nm) |