Hi Bruno,

* Bruno Haible wrote on Sun, Mar 07, 2010 at 10:16:39PM CET:
> With the C++ tests, I'm seeing this link error on Solaris, with Sun C and Sun 
> C++:
> 
>   CC -O    -L/home/haible/prefix-x86/lib -Wl,-z,ignore  -o test-langinfo-c++ 
> test-langinfo-c++.o ../gllib/libgnu.a -lm -lm -lm -lm -lm -lm -lm -lm -lm -lm 
> -lm 
>   CC: Warning: Option -Wl,-z,ignore passed to ld, if ld is invoked, ignored 
> otherwise
>   ld: fatal: option -z has illegal argument `,ignore'
>   ld: fatal: Flags processing errors
>   *** Error code 1
> 
> The reason is that the flag -Wl,-z,ignore is accepted by the C compiler (cc), 
> but
> leads to an error with the C++ compiler (CC).

Sun CC needs '-Qoption ld ' as prefix to linker flags (mind the trailing
space) rather than '-Wl,'.  See libtool.m4 settings of lt_prog_compiler_wl.
The former won't work for Sun cc, however.

Cheers,
Ralf


Reply via email to