Patchwork support LTO of transactional memory

login
register
mail settings
Submitter Aldy Hernandez
Date Nov. 22, 2011, 9:30 p.m.
Message ID <4ECC146E.2080304@redhat.com>
Download mbox | patch
Permalink /patch/127175/
State New
Headers show

Comments

Aldy Hernandez - Nov. 22, 2011, 9:30 p.m.
> 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.
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.
Jack Howarth - Nov. 22, 2011, 9:37 p.m.
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)
Richard Henderson - Nov. 22, 2011, 9:43 p.m.
On 11/22/2011 01:37 PM, Jack Howarth wrote:
> On x86_64-apple-darwin11, this converts the link failures into run-time failures
> as are seen on i386 linux.


These aren't supposed to be runtime tests.  Did a { dg-do link } marker get missed?


r~

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,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)