On Tue, Nov 22, 2011 at 03:30:22PM -0600, Aldy Hernandez wrote:
>
>> It's a consequence of a combination of the way that "weak" works on
>> Darwin, and the fact that I tried to make a "one size fits all" crt.
>>
>>>
>>> Can you try this?
>>> <curr.txt>
>>
>> we will need a dummy for _ITM_deregisterTMCloneTable as well.
>
> Then try this; similarly for any other symbols Darwin may be generating.
>
> Feel free to commit as obvious, or just let me know if it works and I  
> can commit.

On x86_64-apple-darwin11, this converts the link failures into run-time failures
as are seen on i386 linux.

FAIL: gcc.dg/lto/trans-mem-1 c_lto_trans-mem-1_0.o-c_lto_trans-mem-1_1.o 
execute -flto -fgnu-tm
FAIL: gcc.dg/lto/trans-mem-2 c_lto_trans-mem-2_0.o-c_lto_trans-mem-2_1.o 
execute -flto -fgnu-tm

at -m32

FAIL: gcc.dg/lto/trans-mem-1 c_lto_trans-mem-1_0.o-c_lto_trans-mem-1_1.o 
execute -flto -fgnu-tm

at -m64.

> testsuite/
>       * gcc.dg/lto/trans-mem-2_0.c: Add _ITM_*registerTMCloneTable dummy.
>       * gcc.dg/lto/trans-mem-1_1.c: Add _ITM_*registerTMCloneTable dummy.
> 
> Index: testsuite/gcc.dg/lto/trans-mem-2_0.c
> ===================================================================
> --- testsuite/gcc.dg/lto/trans-mem-2_0.c      (revision 181629)
> +++ testsuite/gcc.dg/lto/trans-mem-2_0.c      (working copy)
> @@ -9,6 +9,8 @@ dummy(_ITM_beginTransaction)
>  dummy(_ITM_commitTransaction)
>  dummy(_ITM_WU4)
>  dummy(_ITM_WU8)
> +dummy(_ITM_registerTMCloneTable)
> +dummy(_ITM_deregisterTMCloneTable)
>  
>  main()
>  {
> Index: testsuite/gcc.dg/lto/trans-mem-1_1.c
> ===================================================================
> --- testsuite/gcc.dg/lto/trans-mem-1_1.c      (revision 181629)
> +++ testsuite/gcc.dg/lto/trans-mem-1_1.c      (working copy)
> @@ -5,3 +5,5 @@ dummy(_ITM_beginTransaction)
>  dummy(_ITM_commitTransaction)
>  dummy(_ITM_WU4)
>  dummy(_ITM_WU8)
> +dummy(_ITM_registerTMCloneTable)
> +dummy(_ITM_deregisterTMCloneTable)

Reply via email to