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

Bug 253412

Summary: net-fs/autofs-5.0.3-r6 does not respect LDFLAGS
Product: Gentoo Linux Reporter: Kevin Pyle <gentoo.8eaf7cd8e5128d8191fe>
Component: [OLD] UnspecifiedAssignee: Stefaan De Roeck (RETIRED) <stefaan>
Status: RESOLVED FIXED    
Severity: normal CC: net-fs
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 247969    
Bug Blocks: 331933    
Attachments: Patch to s/\<LDFLAGS/AUTOFS_LDFLAGS/ in assignments, and update the one use of LDFLAGS

Description Kevin Pyle 2009-01-02 04:37:35 UTC
The upstream Makefile for net-fs/autofs-5.0.3-r6 unconditionally sets LDFLAGS, overriding user settings.  It also puts some values in LDFLAGS that should be in LIBS.  I have a patch that corrects both issues.
Comment 1 Kevin Pyle 2009-01-02 04:48:42 UTC
Created attachment 177057 [details, diff]
Patch to s/\<LDFLAGS/AUTOFS_LDFLAGS/ in assignments, and update the one use of LDFLAGS

This patch changes occurrences of LDFLAGS to AUTOFS_LDFLAGS in variable assignments.  In the one place where LDFLAGS was used in a make rule, I added a reference to AUTOFS_LDFLAGS and moved plain LDFLAGS after DAEMON_LDFLAGS, to give user LDFLAGS precedence.

Warning: this patch also drops the line "LDFLAGS += -lpthread", since that is a library inclusion, not an ld flag.  As such, my patch for bug #247969 needs to be merged first.  Merging this patch without that one will result in daemon/automount not even attempting to link libpthread, which will cause the build to fail.  The patch in attachment #177056 [details, diff] adds a -lpthread to the daemon/Makefile LIBS variable, after which the use of -lpthread in LDFLAGS can be dropped safely.
Comment 2 Stefaan De Roeck (RETIRED) gentoo-dev 2009-01-04 12:38:32 UTC
Patch applied in net-fs/autofs-5.0.4.  Thanks.