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: [Patch libitm] [V2] config-based assessment of weakref capability


On Fri, Jan 06, 2012 at 10:58:51AM -0500, Patrick Marlier wrote:
> On 01/06/2012 10:38 AM, Mike Stump wrote:
>> On Jan 6, 2012, at 12:29 AM, Iain Sandoe wrote:
>>>> I think something is wrong in the configure. Indeed, on apple-darwin10.8.0, weak ref works but it is configure as "no".
>>>> I guess it should not try to run it but only compile it (or the symbol should exists).
>>>
>>> Which tool-chain are you using ? (XCode version) - the problem is tool-chain related.
>>> thanks
>>
>> 3.2.6 on x86_64-apple-darwin10.8.0 works for me with either -m32 or -m64.  If you have an older Xcode 3.2.x, try updating.
>
> 4.0 (build 4A304a) on x86_64-apple-darwin10.8.0. I will try to update it.
>
> Thanks.

Using Xcode 4.2 on Snow Leopard, I see the same runtime failure for the configure test of 
"checking whether weak refs work like ELF"...

configure:17251: ./conftest
dyld: Symbol not found: _fNotToBeFound
  Referenced from: /sw/src/fink.build/gcc47-4.7.0-1/darwin_objdir/x86_64-apple-darwin10.8.0/libitm/./conftest
  Expected in: flat namespace
 in /sw/src/fink.build/gcc47-4.7.0-1/darwin_objdir/x86_64-apple-darwin10.8.0/libitm/./conftest
/sw/src/fink.build/gcc47-4.7.0-1/gcc-4.7-20111216/libitm/configure: line 1742: 24547 Trace/BPT trap          ./conftest$ac_exeext
configure:17251: $? = 133
configure: program exited with status 133

However if I execute the compile line with -v --save-temps and repeat the linkage with...

/Developer-3.2.6/usr/bin/ld -dynamic -arch x86_64 -macosx_version_min 10.6.8 -weak_reference_mismatches non-weak -o conftest -lcrt1.10.6.o -L/sw/src/fink.build/gcc47-4.7.0-1/darwin_objdir/./gcc -undefined dynamic_lookup conftest.o -no_compact_unwind -lSystem -lgcc_ext.10.5 -lgcc -lSystem -v

the resulting binary for conftest runs fine. So we appear to have broken weakref support in the linker
for Xcode 4 and later.
        Jack


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