Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 226923 - sys-apps/hwsetup: append-ldflags is used to pass libraries
Summary: sys-apps/hwsetup: append-ldflags is used to pass libraries
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo LiveCD Package Maintainers
Depends on:
Blocks: append-ldflags-libs
  Show dependency tree
Reported: 2008-06-14 18:25 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2008-10-14 09:30 UTC (History)
1 user (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2008-06-14 18:25:38 UTC
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 Chris Gianelloni (RETIRED) gentoo-dev 2008-06-28 09:06:34 UTC
What would you recommend as a potential solution?
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2008-09-02 22:25:40 UTC
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
-               append-ldflags -lz
+               perl -pi -e 's| -lpci| -lz -lpci|g' Makefile
        elif built_with_use --missing false sys-apps/pciutils zlib
                die "You need to build with USE=zlib to match sys-apps/pcituils"
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2008-10-14 09:30:12 UTC