Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 377111 - dev-lang/path64 will mis-configure the dynamic loader path when using custom spec files
Summary: dev-lang/path64 will mis-configure the dynamic loader path when using custom ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Kacper Kowalik (Xarthisius) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-30 20:58 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2011-07-31 07:46 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 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-07-30 20:58:50 UTC
When using custom spec files, such as the one I suggest for forced --as-needed support, the collect2 command line changes, causing the line

        local linker=$($(tc-getCC) --help -v 2>&1 >/dev/null | grep     '\-dynamic\-linker' | cut -f7 -d' ')

to be simply totally broken (it's no longer the 7th argument but the 8th). In general you should *not* rely on this at all!

You probably want something like this:

local linker=$($(tc-getCC) --help -v 2>&1 >/dev/null | sed -n -e '/dynamic-linker/s:.* -dynamic-linker \([^ ]\+\) .*:\1:p')

which is at least resilient to changes in the commandline. It still is tremendously fragile.
Comment 1 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2011-07-31 07:46:59 UTC
+  31 Jul 2011; Kacper Kowalik <xarthisius@gentoo.org>
+  path64-1.0.0_pre20110729.ebuild:
+  Make search for linker more resilient. Fixes bug 377111. Thanks to Diego Elio
+  Pettenò <flameeyes@gentoo.org>