On Sat, May 26, 2012 at 7:23 PM, Sriraman Tallam <tmsri...@google.com> wrote:
>>
>> That is because libgcc_s.so is preferred by g++. We can do one
>> of 3 things:
>>
>> 1. Abuse libgcc_eh.a by moving __cpu_model and __cpu_indicator_init
>> from libgcc.a to libgcc_eh.a.
>> 2. Rename libgcc_eh.a to libgcc_static.a and move __cpu_model and
>> __cpu_indicator_init from libgcc.a to libgcc_static.a.
>> 3. Add  libgcc_static.a and move __cpu_model and __cpu_indicator_ini
>>  from libgcc.a to libgcc_static.a.  We treat libgcc_static.a similar to
>> libgcc_eh.a.
>
> Any reason why gcc should not be made to prefer libgcc_s.so too like g++?
>
> Thanks for clearing this up. I will take a stab at it.
>

This is a long story.  The short answer is people didn't want
to add libgcc_s.so to DT_NEEDED for C programs.  But
it is no longer an issue since we now pass

 -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed
-lgcc_s --no-as-needed

to linker.


-- 
H.J.

Reply via email to