Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 209710

Summary: app-text/recode-3.6-r2 does not respect LDFLAGS
Product: Gentoo Linux Reporter: Diego Elio Pettenò (RETIRED) <flameeyes>
Component: New packagesAssignee: Gentoo Shell Tools project <shell-tools>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 331933    

Description Diego Elio Pettenò (RETIRED) gentoo-dev 2008-02-11 20:39:53 UTC
These files have a .hash section even when my LDFLAGS tell the linker not to generate it:

app-text/recode-3.6-r2 (/usr/lib64/librecode.so.0.0.0)
Comment 1 Peter Volkov (RETIRED) gentoo-dev 2008-02-20 09:30:25 UTC
Diego, could you provide some additional information here? What LDFLAGS do you pass and how do you check? AFAIS recode links this library wit LDFLAGS here...
Comment 2 Kevin Pyle 2009-01-03 23:05:24 UTC
I cannot speak to what flags Diego used, but I can confirm that app-text/recode-3.6-r2 does not honor LDFLAGS for that file.  I tested by including -Wl,-z,now in my LDFLAGS, but the library still has LAZY loading, rather than NOW loading, according to scanelf.

After spending quite a bit of time poking at it, this appears to be some sort of autotools bug in that version.  The generated Makefile does the right thing, but the resulting library is wrong.  I can run libtool by hand with the same LDFLAGS values, and observe the same incorrect output.

I moved forward to app-text/recode-3.6_p15, which already updates the autotools for other reasons.  As a side effect of that update, the problematic libtool is replaced with one that preserves LDFLAGS correctly.  In app-text/recode-3.6_p15, librecode.so has NOW loading, which is what my LDFLAGS should cause.  A comparison of the two libtool invocations by the different versions shows no meaningful differences.  Moving forward to the new version seems like the simplest course of action.
Comment 3 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-04-10 04:27:00 UTC
removed. thx for the analysis