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

Bug 149653

Summary: sys-block/nbd-2.8.6 fails with -Wl,--as-needed
Product: Gentoo Linux Reporter: Donnie Berkholz (RETIRED) <dberkholz>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 129413    

Description Donnie Berkholz (RETIRED) gentoo-dev 2006-09-30 13:52:52 UTC
files/nbd-2.8.2-gznbd.patch should have LDFLAGS after the object.

+   $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)

rather than before

+   $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@
Comment 1 SpanKY gentoo-dev 2006-09-30 13:56:29 UTC
erm, not quite ... problem is that LDFLAGS should not contain libs
Comment 2 Donnie Berkholz (RETIRED) gentoo-dev 2006-09-30 13:58:52 UTC
Fix it up however you want, this worked for me. Make a new LIBS var if you like for -lz, and tag that after.
Comment 3 SpanKY gentoo-dev 2006-09-30 14:02:46 UTC
fixed patch to use LDLIBS and to use implicit make rules (which handles LDFLAGS/LDLIBS ordering)
Comment 4 Donnie Berkholz (RETIRED) gentoo-dev 2006-09-30 14:41:39 UTC
Great, thanks!