From patchwork Wed Nov 23 10:02:30 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Sandoe X-Patchwork-Id: 127245 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 40A7A1007D2 for ; Wed, 23 Nov 2011 21:02:54 +1100 (EST) Received: (qmail 28287 invoked by alias); 23 Nov 2011 10:02:50 -0000 Received: (qmail 28274 invoked by uid 22791); 23 Nov 2011 10:02:48 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from c2beaomr08.btconnect.com (HELO mail.btconnect.com) (213.123.26.186) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 23 Nov 2011 10:02:33 +0000 Received: from host81-138-1-83.in-addr.btopenworld.com (EHLO thor.office) ([81.138.1.83]) by c2beaomr08.btconnect.com with ESMTP id FFF30413; Wed, 23 Nov 2011 10:02:31 +0000 (GMT) Message-Id: <267AB4F4-A74A-469B-8AD4-3F5AE3CE7CDC@sandoe-acoustics.co.uk> From: Iain Sandoe To: GCC Patches Mime-Version: 1.0 (Apple Message framework v936) Subject: [Patch Darwin] fix thinko in TM crts Date: Wed, 23 Nov 2011 10:02:30 +0000 Cc: Mike Stump X-Mirapoint-IP-Reputation: reputation=Fair-1, source=Queried, refid=tid=0001.0A0B0302.4ECCC4B7.0009, actions=tag X-Junkmail-Premium-Raw: score=7/50, refid=2.7.2:2011.11.23.84215:17:7.763, ip=81.138.1.83, rules=__HAS_MSGID, __SANE_MSGID, __MSGID_APPLEMAIL, __TO_MALFORMED_2, __CT, __CTYPE_HAS_BOUNDARY, __CTYPE_MULTIPART, CTYPE_MULTIPART_NO_QUOTE, __CTYPE_MULTIPART_MIXED, __MIME_VERSION, __MIME_VERSION_APPLEMAIL, __SUBJ_ALPHA_END, __HAS_X_MAILER, __X_MAILER_APPLEMAIL, TXT_ATTACHED, BODY_SIZE_1700_1799, BODYTEXTP_SIZE_3000_LESS, __MIME_TEXT_ONLY, RDNS_GENERIC_POOLED, BODY_SIZE_5000_LESS, RDNS_SUSP_GENERIC, __USER_AGENT_APPLEMAIL, RDNS_SUSP, BODY_SIZE_2000_LESS, BODY_SIZE_7000_LESS, NO_URI_FOUND, MIME_TEXT_ONLY_MP_MIXED X-Junkmail-Signature-Raw: score=unknown, refid=str=0001.0A0B0205.4ECCC4B7.01EF, ss=1, re=0.000, fgs=0, ip=0.0.0.0, so=2011-07-25 19:15:43, dmn=2011-05-27 18:58:46, mode=multiengine X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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