Only happens if e2fsprogs is not already installed. To reproduce: emerge -C e2fsprogs LDFLAGS="-Wl,--as-needed" emerge --oneshot e2fsprogs CC blkid.c LD blkid /usr/lib/gcc/i686-pc-linux-gnu/4.1.0/../../../../i686-pc-linux-gnu/bin/ld: warning: libuuid.so.1, needed by ../lib/libblkid.so, not found (try using -rpath or -rpath-link) ../lib/libblkid.so: undefined reference to `uuid_unparse' ../lib/libblkid.so: undefined reference to `uuid_is_null'
Created attachment 85940 [details, diff] files/e2fsprogs-1.38-as-needed.patch This patch fixed it for me.
Maybe instead of patching this time this can be injected from ebuild, as -rpath-link is GNU ld specific (most likely) so this is going to break stuff on non-GNU linkers, so it's hardly suitable for upstream.
fix it so it can be sent upstream then
Good call, I'm not sure how it can be fixed to be sent upstream, I'd have to check the other linkers what they do.
It's a binutils bug: http://farragut.flameeyes.is-a-geek.org/articles/2006/06/04/summing-up-the-binutils-trouble