bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lib-ignore: link error with Sun C++ compiler


From: Ralf Wildenhues
Subject: Re: lib-ignore: link error with Sun C++ compiler
Date: Mon, 8 Mar 2010 06:43:00 +0100
User-agent: Mutt/1.5.20 (2009-10-28)

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

[Prev in Thread] Current Thread [Next in Thread]