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

--- Comment #5 from Stas Sergeev <stsp at users dot sourceforge.net> ---
The problem is not in a makefile,
but in autotools itself. Consider
this example performed on a plain
"ncurses" source tree:

LDFLAGS="-Wl,--as-needed -lgcc" ./configure


configure passes because -lgcc
is not needed. It was added as
an example. But now lets grep
config.log for any func checked
with AC_CHECK_FUNCS. For example
`getopt`:

configure:22214: checking for getopt
configure:22251: gcc -o conftest -g -O2 --param max-inline-insns-single=1200
 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DNDEBUG -Wl,--as-needed -lgcc
conftest.c  >&5


As you can see, it puts the
content of LDFLAGS before
conftest.c. Its not even .o,
its a .c file. So if you don't
think linker should be fixed,
then maybe gcc should rearrange
the cmdline when direct compilation
from .c is used?

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

Reply via email to