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
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.
A possible solution, though I didn't test it yet (what requires libkudzu?).
RCS file: /var/cvsroot/gentoo-x86/sys-libs/libkudzu/libkudzu-18.104.22.168.ebuild,v
retrieving revision 1.10
diff -u -B -r1.10 libkudzu-22.214.171.124.ebuild
--- libkudzu-126.96.36.199.ebuild 29 Feb 2008 01:34:03 -0000 1.10
+++ libkudzu-188.8.131.52.ebuild 2 Sep 2008 22:10:37 -0000
@@ -33,7 +33,7 @@
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"
I think hwsetup uses it. Also, use sed for that kind of thing instead of perl:
sed -i 's| -lpci| -lz -lpci|g' Makefile
(In reply to comment #2)
> I think hwsetup uses it. Also, use sed for that kind of thing instead of perl:
> sed -i 's| -lpci| -lz -lpci|g' Makefile
There is another use of perl instead of said in the very same ebuild, so I assumed that was intended to assure independence from sed.
I posted a similar patch to the related hwsetup bug #226923.
I've committed my patch anyway. If Diego ever files a QA bug report for using perl instead of sed, we'll know what to do. :)