diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2019-12-13 22:22:11 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2019-12-13 22:37:12 +0000 |
commit | 063d79790a2c0ee4542552f76334f511aaced319 (patch) | |
tree | f95249696409aa10f96d621e3b148d6098723f2c /eclass/tests | |
parent | dev-python/pipfile: keyworded 0.0.2 for sparc, bug #702190 (diff) | |
download | gentoo-063d79790a2c0ee4542552f76334f511aaced319.tar.gz gentoo-063d79790a2c0ee4542552f76334f511aaced319.tar.bz2 gentoo-063d79790a2c0ee4542552f76334f511aaced319.zip |
eclass/tests/toolchain-funcs.sh: fix gold tests, bug #700812
As written tests assumed that $CC always called ld.bfd as a linker.
The assumption fails when default linker is not ld.bfd,
(for example sys-devel/binutils[default-gold]).
The change uses LDFLAGS=-fuse-ld=bfd explicitly.
Fixes the following tests:
* Testing tc-ld-is-gold (bfd selected) ... [ !! ]
* Testing tc-ld-disable-gold (bfd selected) ... [ !! ]
Reported-by: Michał Górny
Closes: https://bugs.gentoo.org/700812
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'eclass/tests')
-rwxr-xr-x | eclass/tests/toolchain-funcs.sh | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/eclass/tests/toolchain-funcs.sh b/eclass/tests/toolchain-funcs.sh index 4cd4213c2de5..1cf124520c3c 100755 --- a/eclass/tests/toolchain-funcs.sh +++ b/eclass/tests/toolchain-funcs.sh @@ -54,21 +54,21 @@ tend ${ret} # # TEST: tc-ld-is-gold # -tbegin "tc-ld-is-gold (bfd selected)" -LD=ld.bfd tc-ld-is-gold && ret=1 || ret=0 +tbegin "tc-ld-is-gold (ld=bfd cc=bfd)" +LD=ld.bfd LDFLAGS=-fuse-ld=bfd tc-ld-is-gold && ret=1 || ret=0 tend ${ret} -tbegin "tc-ld-is-gold (gold selected)" +tbegin "tc-ld-is-gold (ld=gold cc=default)" LD=ld.gold tc-ld-is-gold ret=$? tend ${ret} -tbegin "tc-ld-is-gold (bfd selected via flags)" +tbegin "tc-ld-is-gold (ld=gold cc=bfd)" LD=ld.gold LDFLAGS=-fuse-ld=bfd tc-ld-is-gold ret=$? tend ${ret} -tbegin "tc-ld-is-gold (gold selected via flags)" +tbegin "tc-ld-is-gold (ld=bfd cc=gold)" LD=ld.bfd LDFLAGS=-fuse-ld=gold tc-ld-is-gold ret=$? tend ${ret} @@ -78,14 +78,14 @@ tend ${ret} # tbegin "tc-ld-disable-gold (bfd selected)" ( -export LD=ld.bfd LDFLAGS= +export LD=ld.bfd LDFLAGS=-fuse-ld=bfd ewarn() { :; } tc-ld-disable-gold -[[ ${LD} == "ld.bfd" && -z ${LDFLAGS} ]] +[[ ${LD} == "ld.bfd" && ${LDFLAGS} == "-fuse-ld=bfd" ]] ) tend $? -tbegin "tc-ld-disable-gold (gold selected)" +tbegin "tc-ld-disable-gold (ld=gold)" ( export LD=ld.gold LDFLAGS= ewarn() { :; } @@ -94,7 +94,7 @@ tc-ld-disable-gold ) tend $? -tbegin "tc-ld-disable-gold (gold selected via flags)" +tbegin "tc-ld-disable-gold (cc=gold)" ( export LD= LDFLAGS="-fuse-ld=gold" ewarn() { :; } |