[1/1] gcc-cross-initial: Use good old bfd linker by default

Submitted by Khem Raj on Aug. 14, 2014, 5:05 a.m. | Patch ID: 78129


Message ID 276a924664f8404d4e360e6af0ecb29d4d7403ab.1407992030.git.raj.khem@gmail.com
State Accepted
Commit 77cab553ee6caa940e21cca46ff134f84e65c171
Headers show

Commit Message

Khem Raj Aug. 14, 2014, 5:05 a.m.
We already indicate our intentions to use ld.bfd by
specifying it in configure using --with-ld which works
ok unless here where we manually create symlinks to
binutils-cross components, when we use ld-is-gold feature
default ld points to gold and this symlinking has to be
aware of the fact that we configured binutils and gcc-cross to use
gold as default ld but gcc-cross-initial uses BFD ld

This would be visible when using gold and rebuilding

Signed-off-by: Khem Raj <raj.khem@gmail.com>
 meta/recipes-devtools/gcc/gcc-cross-initial.inc |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-devtools/gcc/gcc-cross-initial.inc b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
index 5a6da8b..23a6d4b 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-initial.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
@@ -57,7 +57,9 @@  do_install () {
 	# found. These need to be relative paths so they work in different locations.
 	install -d $dest
-	for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do
+	useld=${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '.bfd', '', d)}
+	ln -sf ${BINRELPATH}/${TARGET_PREFIX}ld${useld} ${dest}ld
+	for t in ar as nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do
 		ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t
 	# fixed limits.h infact includes the so called real limits.h