Static libraries forced to be PIC

Carmelo Amoroso carmelo73 at gmail.com
Sun Oct 15 13:39:47 UTC 2006


Mike Frysinger wrote:
> On Saturday 14 October 2006 07:13, Carmelo Amoroso wrote:
>> Mike Frysinger wrote:
>>> On Wednesday 11 October 2006 06:57, Carmelo Amoroso wrote:
>>>> I'm wondering why if we have support for shared library on
>>>> (HAVE_SHARED=y) that obviously needs DOPIC=y, we needs to build
>>>> the static libraries as PIC code too.
>>> you misunderstand the behavior of DOPIC ...
>>>
>>> DOPIC=y -> force everything to be built as PIC
>>> DOPIC=n -> only build shared stuff as PIC
>> Well, but the only case in which you can choose DOPIC=n,
>> is by disabling support for shared libraries, so only
>> static libraries will be built.
> 
> uhh, no ... DOPIC is always an option regardless of shared library status
> 
I'm sorry, but I had to be more precise...so you're right except for the 
SuperH (sh4 core) for which, as I wrote,
sh4 => FORCE_SHAREABLE_TEXT_SEGMENT => DOPIC (if HAVE_SHARED is on).
(refer to extra/Configs/Config.sh)

So, is this different behavior for SH4 needed, or is it just a bug?

>> So, if you want to have both shared libs(PIC) and static not PIC libs is
>> not possible
> 
> incorrect ... disable DOPIC and you have this behavior
except for SuperH(SH4)
 > -mike


Carmelo




More information about the uClibc mailing list