summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-04-13 05:38:17 +0000
committerMike Frysinger <vapier@gentoo.org>2015-04-13 05:38:17 +0000
commit7f86763e18699b79d0584f89646ee1cda391a87b (patch)
treedb0b39d5500d7f4c5b2dd2d3d2ed0d779f6f4ba7 /eclass/toolchain-funcs.eclass
parentUse SSHD_CONFIG everywhere #546008 by Alexander Sulfrian. (diff)
downloadhistorical-7f86763e18699b79d0584f89646ee1cda391a87b.tar.gz
historical-7f86763e18699b79d0584f89646ee1cda391a87b.tar.bz2
historical-7f86763e18699b79d0584f89646ee1cda391a87b.zip
tc-ld-disable-gold: handle LD having flags appended to it #545218
Diffstat (limited to 'eclass/toolchain-funcs.eclass')
-rw-r--r--eclass/toolchain-funcs.eclass7
1 files changed, 5 insertions, 2 deletions
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index 4100a00d6f9b..387412c601e9 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.136 2015/03/31 04:27:29 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.137 2015/04/13 05:38:17 vapier Exp $
# @ECLASS: toolchain-funcs.eclass
# @MAINTAINER:
@@ -352,7 +352,10 @@ tc-ld-disable-gold() {
ewarn "Forcing usage of the BFD linker instead of GOLD"
# Set up LD to point directly to bfd if it's available.
- local bfd_ld="$(tc-getLD "$@").bfd"
+ # We need to extract the first word in case there are flags appended
+ # to its value (like multilib). #545218
+ local ld=$(tc-getLD "$@")
+ local bfd_ld="${ld%% *}.bfd"
local path_ld=$(which "${bfd_ld}" 2>/dev/null)
[[ -e ${path_ld} ]] && export LD=${bfd_ld}