Bug 149653 - sys-block/nbd-2.8.6 fails with -Wl,--as-needed
Bug#: 149653 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: base-system@gentoo.org Reported By: dberkholz@gentoo.org
Component: Applications
URL: 
Summary: sys-block/nbd-2.8.6 fails with -Wl,--as-needed
Keywords:  
Status Whiteboard: 
Opened: 2006-09-30 13:52 0000
Description:   Opened: 2006-09-30 13:52 0000
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 From SpanKY 2006-09-30 13:56:29 0000 -------
erm, not quite ... problem is that LDFLAGS should not contain libs

------- Comment #2 From Donnie Berkholz 2006-09-30 13:58:52 0000 -------
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 From SpanKY 2006-09-30 14:02:46 0000 -------
fixed patch to use LDLIBS and to use implicit make rules (which handles
LDFLAGS/LDLIBS ordering)

------- Comment #4 From Donnie Berkholz 2006-09-30 14:41:39 0000 -------
Great, thanks!