Jory A. Pratt writes:

/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: 
unrecognized option '-Wl'
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: 
use the --help option for usage information
collect2: ld returned 1 exit status
make[2]: *** [libauthmysql.la] Error 1

This is same across all platforms were user sets LDFLAGS themself.

LDFLAGS="-Wl,-O1 -Wl,--sort-common" compile mysql with these LDFLAGS and courier-auth will not compile

mysql_config --lib renders the info as -Wl,-O1 -Wl,--sort-common -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -L/usr/lib -lssl -lcrypto
This is same on x86 ppc and of course amd64.

The option "-Wl" is supposed to be processed by the gcc/g++ front end, which removes it before passing the rest to ld.

For some reason -Wl gets passed on to ld, which of course does not understand this option.

Check the rest of your custom settings. Your link command should be gcc/g++, you should not be invoking ld directly.


Attachment: pgpisxyixGk9C.pgp
Description: PGP signature

Reply via email to