On Wed, Dec 10, 2008 at 06:23:18PM +0000, IainS wrote:
>
> On 10 Dec 2008, at 18:10, Mike Stump wrote:
>
>> On Dec 10, 2008, at 9:43 AM, Jack Howarth wrote:
>>>> If I now understand correctly, the symbols present in updated  
>>>> versions of
>>>> libgcc that are not in the "stock" system libgcc on darwin - need  
>>>> to be
>>>> mentioned in the stub libraries (ligcc_s.10.{4,5,...} ).  The  
>>>> emutls ones
>>>> were not present causing linkage failures that were silently  
>>>> UNSUPPORTING
>>>> a lot of tests.
>>
>> No, those files are meant to describe what was shipped in the past on 
>> darwin as part of darwin.  So, changing them isn't quite the right way 
>> to do this.  Best to put them in the libgcc.a file and let them link in 
>> statically.  Is there some reason why this doesn't work?  I can answer 
>> questions and offer advice, feel free to cc me.
>
> thanks MIke,
>
> the basic issue is that TLS (as used extensively within gomp) is  
> implemented, at present, as an emulation (emutls).
>
> This is present in libgcc_s.1.dylib and libgcc_eh.a
>
> However, as Jack says, it seems currently very difficult to persuade gcc 
> to extract symbols from this un-versioned lib (without mentioning it 
> specifically on the CL)
>
> Whilst this is a possible work-around for getting the test suite to  
> work, it concerns me that it's quite obscure and prone to being missed 
> out, forgotten, and/or fragile.
>
> There is an added inconvenience in that darwin8's ld command behaves  
> differently from darwin9's
>
> the only work-around I've found that gives equal results on d8 and d9 is 
> to specify -lgcc_eh
>
> these approaches seem like temporary hacks .. and I wonder what a good 
> long-term solution would be?
>
> cheers,
> Iain

Iain,
   I know we have...

    if [istarget *-*-darwin*] {
        lappend ALWAYS_CFLAGS "additional_flags=-shared-libgcc"
    }

in libgomp/testsuite/lib/libgomp.exp. So you have to make sure
that gets overridden if you wan to use --static-libgcc.
This change was discussed here...

http://gcc.gnu.org/ml/gcc-patches/2007-03/msg01497.html

                              Jack

Reply via email to