This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: User directed Function Multiversioning via Function Overloading (issue5752064)


On Sat, May 26, 2012 at 7:23 PM, Sriraman Tallam <tmsriram@google.com> wrote:
>>
>> ïhat 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]