https://sourceware.org/bugzilla/show_bug.cgi?id=32950

--- Comment #4 from Sam James <sam at gentoo dot org> ---
(In reply to Stas Sergeev from comment #2)
> But I can't even change the link
> order: configure puts LDFLAGS before
> conftest.c, so all configure tests
> start to fail when --as-needed is
> added to LDFLAGS.
> 

No, it's OK to do this. But you have to put the object and then its provider.

So, `-Wl,--as-needed a.o -lfoo` is OK.

> What would you suggest as a fix then?

Fix Makefiles to pass things in the correct order. Most projects were fixed a
long time ago as many distributions use -Wl,--as-needed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to