Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 253412 - net-fs/autofs-5.0.3-r6 does not respect LDFLAGS
Summary: net-fs/autofs-5.0.3-r6 does not respect LDFLAGS
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Stefaan De Roeck (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on: 247969
Blocks: ldflags
  Show dependency tree
 
Reported: 2009-01-02 04:37 UTC by Kevin Pyle
Modified: 2010-08-09 21:00 UTC (History)
1 user (show)

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


Attachments
Patch to s/\<LDFLAGS/AUTOFS_LDFLAGS/ in assignments, and update the one use of LDFLAGS (autofs-5.0.3-honor-ldflags.patch,1.12 KB, patch)
2009-01-02 04:48 UTC, Kevin Pyle
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.