Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 566942 - sys-libs/db calls tc-ld-is-gold after adding invalid linker flags
Summary: sys-libs/db calls tc-ld-is-gold after adding invalid linker flags
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-26 21:28 UTC by Andrei Slavoiu
Modified: 2015-11-28 20:26 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Slavoiu 2015-11-26 21:28:46 UTC
Bug 470634 still reproduces here because '-Wl,-default-symver' is appended to LDFLAGS before calling tc-ld-disable-gold. As a result ${out} will not match *"GNU gold"* because it actually contains:
collect2 version 4.9.3 /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../x86_64-pc-linux-gnu/bin/ld.gold -plugin /usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.3/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.9.3/lto-wrapper -plugin-opt=-fresolution=/var/tmp/portage/sys-libs/db-6.0.35/temp/ccGbTSLC.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o /var/tmp/portage/sys-libs/db-6.0.35/temp/test-tc-gold /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../lib32/crt1.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../lib32/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/32/crtbegin.o -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/32 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../lib32 -L/lib/../lib32 -L/usr/lib/../lib32 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3 -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../x86_64-pc-linux-gnu/lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../.. -O1 --default-symver --version /var/tmp/portage/sys-libs/db-6.0.35/temp/cc2SRQqP.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/32/crtend.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../lib32/crtn.o /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../x86_64-pc-linux-gnu/bin/ld.gold: --default-symver: unknown option /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../x86_64-pc-linux-gnu/bin/ld.gold: use the --help option for usage information collect2: error: ld returned 1 exit status

Reproducible: Always
Comment 1 Andrei Slavoiu 2015-11-26 21:34:24 UTC
Made it build by changing the condition to:
if [[ ${out} == *"GNU gold"* ]] || [[ ${out} == *"ld.gold"* ]] ; then
Comment 2 SpanKY gentoo-dev 2015-11-28 20:11:42 UTC
tc-ld-disable-gold is written as intended -- we use user flags first (in case they change ABI or linker paths) before requesting the version info

the fact that db adds the invalid flag before trying to change the linker is a bug in the db ebuild
Comment 3 SpanKY gentoo-dev 2015-11-28 20:26:18 UTC
this was changed here i think and it looks like by accident:
https://sources.gentoo.org/sys-libs/db/db-6.0.30-r1.ebuild

fixed here:
http://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db548619f2d5a39f8bb523c60e99d20cf84ef513