Summary: | toolchain-funcs.eclass: tc-ld-is-gold doesn't strictly respect LD | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Michał Górny <mgorny> |
Component: | Eclasses | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Michał Górny
![]() ![]() ![]() ![]() tc-ld-is-gold() checks if any of $LD of $CC are using gold linker. It's arguably a problematic user configuration (or problematic test in this case) when one does not match another. In test we'll need to convince CC to use bfd as well. One of ways to replicate it it to do an equivalent of tc-ld-disable-gold(). For example setting LDFLAGS to -fuse-ld=bfd should have the desired effect for at least gcc and clang. Or calling tc-ld-disable-gold() directly. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=063d79790a2c0ee4542552f76334f511aaced319 commit 063d79790a2c0ee4542552f76334f511aaced319 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2019-12-13 22:22:11 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2019-12-13 22:37:12 +0000 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> eclass/tests/toolchain-funcs.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) |