Bug 226923 - sys-apps/hwsetup: append-ldflags is used to pass libraries
Bug#: 226923 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: livecd@gentoo.org Reported By: flameeyes@gentoo.org
Component: Ebuilds
URL: 
Summary: sys-apps/hwsetup: append-ldflags is used to pass libraries
Keywords:  
Status Whiteboard: 
Opened: 2008-06-14 18:25 0000
Description:   Opened: 2008-06-14 18:25 0000
I've made append-ldflags throw a warning when libraries are passed through it
to link them in.

The reason is that LDFLAGS should _not_ be used for libraries, as it has to be
positioned before the list of objects to link together, while libraries should
go after.

This mistake in commandline is what causes as-needed to either fail or not
apply at all (if LDFLAGS are put at the end).

Please fix your package not to pass libraries through LDFLAGS.

------- Comment #1 From Chris Gianelloni (RETIRED) 2008-06-28 09:06:34 0000 -------
What would you recommend as a potential solution?

------- Comment #2 From Jeroen Roovers 2008-09-02 22:25:40 0000 -------
Index: hwsetup-1.2-r1.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-apps/hwsetup/hwsetup-1.2-r1.ebuild,v
retrieving revision 1.1
diff -u -B -r1.1 hwsetup-1.2-r1.ebuild
--- hwsetup-1.2-r1.ebuild       9 Apr 2008 00:44:56 -0000       1.1
+++ hwsetup-1.2-r1.ebuild       2 Sep 2008 22:23:50 -0000
@@ -35,7 +35,7 @@
        filter-ldflags -Wl,--as-needed --as-needed
        if use zlib
        then
-               append-ldflags -lz
+               perl -pi -e 's| -lpci| -lz -lpci|g' Makefile
        elif built_with_use --missing false sys-apps/pciutils zlib
        then
                die "You need to build with USE=zlib to match
sys-apps/pcituils"

------- Comment #3 From Robin Johnson 2008-10-14 09:30:12 0000 -------
Fixed.