libtool
[Top][All Lists]
Advanced

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

Re: Separate CPPFLAGS for static and shared libs


From: Ralf Wildenhues
Subject: Re: Separate CPPFLAGS for static and shared libs
Date: Tue, 22 Jul 2008 20:03:50 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

* Vikram Ambrose wrote on Tue, Jul 22, 2008 at 03:22:09PM CEST:
> Ralf Wildenhues wrote:
>> * Vikram Ambrose wrote on Mon, Jul 21, 2008 at 11:36:25PM CEST:
>>   
>>> Just ran into a problem, with our old solution, both the .a and the 
>>> .so  need to have -fPIC. Now how do i get separate CPPFLAGS to them 
>>> when  using libtool?
>>
>> You should be looking into convenience archives, or, if they don't help
>> you, explain why you need -fPIC in the static library.

> The compiler give an error when using the static library,
>
> /bin/ld: /sysroot/usr/lib64/libsepol.a(libsepol_la-services.o):  
> relocation R_X86_64_32 against `a local symbol' can not be used when  
> making a shared object; recompile with -fPIC

That explains what happens, but not what you are trying to do, and why
you are trying to do it.  Each of these things could be the underlying
cause for error, or a number of others.  So please explain your setup,
show the Makefile.am snippets leading up to the above, show the command
line that causes this error, plus all of its output.  Then we may be in
a much better position to help you.

Cheers,
Ralf




reply via email to

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