I'm reporting this bug because the package in summary fails to build when forcing --as-needed on through spec files (check out http://blog.flameeyes.eu/2008/11/14/problems-and-mitigation-strategies-for-as-needed for details). Please note that this bug _might_ apply to -Wl,--as-needed in LDFLAGS as well; in both cases it should be fixed. Also, if this is due to the package in question not respecting user-defined LDFLAGS, you should get to fix that too. Check the attached build log. Thanks, Diego
Created attachment 199198 [details] Build log
Created attachment 199977 [details] Build log of my box When i add LDFLAGS="-Wl,--as-needed" it still builds fine here (see build.log)
When LDFLAGS="-Wl,--as-needed" is set in make.conf or ENV it clearly shows up in the build output too. I don't really know what i'm expected to do. Am i really supposed to test my packages using customized gcc spec files?
Change the linker argument order to LDFLAGS, objects, libraries. Old: x86_64-pc-linux-gnu-gcc -std=c99 -O2 -march=athlon64 -pipe -Wl,--as-needed xdotool.o xdo.o -lX11 -lXtst -o xdotool New: x86_64-pc-linux-gnu-gcc -std=c99 -O2 -march=athlon64 -pipe -Wl,--as-needed xdotool.o xdo.o -lX11 -lXtst -o xdotool Got some help from ssuominen on this. If this doesn't fix your issue, i need your help to fix it.
Erm wrong Old: x86_64-pc-linux-gnu-gcc -std=c99 -O2 -march=athlon64 -pipe -lX11 -lXtst -Wl,--as-needed xdotool.o xdo.o -o xdotool New: x86_64-pc-linux-gnu-gcc -std=c99 -O2 -march=athlon64 -pipe -Wl,--as-needed xdotool.o xdo.o -lX11 -lXtst -o xdotool