Re: [Patch Darwin] fix thinko in TM crts

2011-11-27 Thread Iain Sandoe


On 24 Nov 2011, at 19:51, Mike Stump wrote:

On Nov 23, 2011, at 2:02 AM, Iain Sandoe develo...@sandoe-acoustics.co.uk 
 wrote:
the solution is to require the library to be present (no problem,  
since the crts are only fired up for -fgnu-tm) and to remove the  
dummy funcs from the crts,

OK for trunk?


Ok.


I also applied the attached (comment text only) changes which correct  
two typos in comments and use the correct (runtime library) license  
wording.

Iain

Index: libgcc/config/darwin-crt-tm.c
===
--- libgcc/config/darwin-crt-tm.c   (revision 181764)
+++ libgcc/config/darwin-crt-tm.c   (revision 181765)
@@ -1,21 +1,26 @@
-/* Provide the runtime intrastructure the transactional memory lib.
+/* Provide the runtime infrastructure for the transactional memory lib.
Copyright (C) 2011 Free Software Foundation, Inc.
Contributed by Iain Sandoe ia...@gcc.gnu.org
 
This file is part of GCC.
 
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
 
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
 
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING3.  If not see
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 http://www.gnu.org/licenses/.  */
 
 #include mach-o/dyld.h




Re: [Patch Darwin] fix thinko in TM crts

2011-11-24 Thread Mike Stump
On Nov 23, 2011, at 2:02 AM, Iain Sandoe develo...@sandoe-acoustics.co.uk 
wrote:
 the solution is to require the library to be present (no problem, since the 
 crts are only fired up for -fgnu-tm) and to remove the dummy funcs from the 
 crts,
 OK for trunk?

Ok.


[Patch Darwin] fix thinko in TM crts

2011-11-23 Thread Iain Sandoe
I provided dummy functions for the libitm weak refs in the first  
version of this.
(a) this is unnecessary (except in the corner-case of testing lto)  
because there is never a need to use the crts unless libitm is linked.
(b) it no longer works across all *x86*-darwin* because weak linkage  
behavior differs.


the solution is to require the library to be present (no problem,  
since the crts are only fired up for -fgnu-tm) and to remove the dummy  
funcs from the crts,

OK for trunk?
Iain

libgcc:

* config/darwin-crt-tm.c: Remove dummy _ITM_ functions.


Index: libgcc/config/darwin-crt-tm.c
===
--- libgcc/config/darwin-crt-tm.c   (revision 181653)
+++ libgcc/config/darwin-crt-tm.c   (working copy)
@@ -72,12 +72,4 @@ void __doTMdeRegistrations (void)
 _ITM_deregisterTMCloneTable (tm_clone_table_sect_data);
 
 }
-
-/* Provide dumy funcs for the weak ones - needed on most Darwin versions
-   for now.  */
-
-void _ITM_registerTMCloneTable (void *n ATTRIBUTE_UNUSED, size_t s 
ATTRIBUTE_UNUSED)
-{}
-void _ITM_deregisterTMCloneTable (void *n ATTRIBUTE_UNUSED)
-{}
 #endif