diff mbox

support LTO of transactional memory

Message ID 4ECC0F95.3020400@redhat.com
State New
Headers show

Commit Message

Aldy Hernandez Nov. 22, 2011, 9:09 p.m. UTC
>> -fgnu-tm -m32 -o gcc-dg-lto-trans-mem-1-01.exe (timeout = 300)
>> Undefined symbols for architecture i386:^M
>> "__ITM_registerTMCloneTable", referenced from:^M
>> ___doTMRegistrations in crttms.o^M
>> ___doTMRegistrations in crttms.o^M
>> "__ITM_deregisterTMCloneTable", referenced from:^M
>> ___doTMdeRegistrations in crttme.o^M
>> ___doTMdeRegistrations in crttme.o^M
>> ld: symbol(s) not found for architecture i386^M
>> collect2: error: ld returned 1 exit status^M
>> compiler exited with status 1
>> output is:
>> Undefined symbols for architecture i386:^M
>> "__ITM_registerTMCloneTable", referenced from:^M
>> ___doTMRegistrations in crttms.o^M
>> ___doTMRegistrations in crttms.o^M "__ITM_deregisterTMCloneTable",
>> referenced from:^M
>> ___doTMdeRegistrations in crttme.o^M
>> ___doTMdeRegistrations in crttme.o^M
>> ld: symbol(s) not found for architecture i386^M
>> collect2: error: ld returned 1 exit status^M
>>
>> FAIL: gcc.dg/lto/trans-mem-1
>> c_lto_trans-mem-1_0.o-c_lto_trans-mem-1_1.o link, -flto -fgnu-tm
>
> I think we will need to ensure that libitm.dylib is on the link line -
> - maybe we're not picking up the spec properly....

This is a missing dummy declaration for the test, since we're not 
linking with libitm.  On Linux x86-64 there was no call to 
_ITM_registerTMCloneTable generated by the compiler.

Can you try this?
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.

Comments

Iain Sandoe Nov. 22, 2011, 9:21 p.m. UTC | #1
On 22 Nov 2011, at 21:09, Aldy Hernandez wrote:

>
>>> -fgnu-tm -m32 -o gcc-dg-lto-trans-mem-1-01.exe (timeout = 300)
>>> Undefined symbols for architecture i386:^M
>>> "__ITM_registerTMCloneTable", referenced from:^M
>>> ___doTMRegistrations in crttms.o^M
>>> ___doTMRegistrations in crttms.o^M
>>> "__ITM_deregisterTMCloneTable", referenced from:^M
>>> ___doTMdeRegistrations in crttme.o^M
>>> ___doTMdeRegistrations in crttme.o^M
>>> ld: symbol(s) not found for architecture i386^M
>>> collect2: error: ld returned 1 exit status^M
>>> compiler exited with status 1
>>> output is:
>>> Undefined symbols for architecture i386:^M
>>> "__ITM_registerTMCloneTable", referenced from:^M
>>> ___doTMRegistrations in crttms.o^M
>>> ___doTMRegistrations in crttms.o^M "__ITM_deregisterTMCloneTable",
>>> referenced from:^M
>>> ___doTMdeRegistrations in crttme.o^M
>>> ___doTMdeRegistrations in crttme.o^M
>>> ld: symbol(s) not found for architecture i386^M
>>> collect2: error: ld returned 1 exit status^M
>>>
>>> FAIL: gcc.dg/lto/trans-mem-1
>>> c_lto_trans-mem-1_0.o-c_lto_trans-mem-1_1.o link, -flto -fgnu-tm
>>
>> I think we will need to ensure that libitm.dylib is on the link  
>> line -
>> - maybe we're not picking up the spec properly....
>
> This is a missing dummy declaration for the test, since we're not  
> linking with libitm.  On Linux x86-64 there was no call to  
> _ITM_registerTMCloneTable generated by the compiler.

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.

(building at present .. will hopefully try before the end of today -  
GMT :-)

Iain
diff mbox

Patch

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,7 @@  dummy(_ITM_beginTransaction)
 dummy(_ITM_commitTransaction)
 dummy(_ITM_WU4)
 dummy(_ITM_WU8)
+dummy(_ITM_registerTMCloneTable)
 
 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,4 @@  dummy(_ITM_beginTransaction)
 dummy(_ITM_commitTransaction)
 dummy(_ITM_WU4)
 dummy(_ITM_WU8)
+dummy(_ITM_registerTMCloneTable)