From patchwork Sat Feb 11 18:11:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 140796 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 BBF98B6F9F for ; Sun, 12 Feb 2012 05:12:34 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1329588756; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:From:To:Subject:Date:User-Agent:Cc:References: In-Reply-To:MIME-Version:Message-Id:Content-Type:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=mlqaWw0UU0l7K3a9TzLUOFw81sI=; b=myjHwWjv0E/fGGrC03cVc0K8g28m7X3g0+aA4Lngut29s4jTixp4E0D8D6+ISe tMR3dnStcPjT1ZZ4XQiXdRRJukPhYPl7f5N1viFG/zu2Vtn3zb5MlNGDak3IVNcd jijjX+4qnvp/t7h0Ag4BF+v3y3hs7psnauE+2bHfC+6Bc= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:From:To:Subject:Date:User-Agent:Cc:References:In-Reply-To:MIME-Version:Message-Id:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=pS9q3q+JcmoRay9q/Snh3UEZfHxjHZscO03a+jLvMz7l2UxYm7Bn92a09aTtpr TZow1nuRX5cCwb0HjcQaPzTVEdgHZWP0on1UpImhbjvnQ5wibpzPt1V7ULRum2iG OlNAUWSSNSAx57rtjSqFSMFdzpz+oYuGdXDu91Xyy2htc=; Received: (qmail 341 invoked by alias); 11 Feb 2012 18:12:28 -0000 Received: (qmail 330 invoked by uid 22791); 11 Feb 2012 18:12:26 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 11 Feb 2012 18:12:13 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 8CAD529002E; Sat, 11 Feb 2012 19:12:12 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yyZb9D-LRXjO; Sat, 11 Feb 2012 19:12:12 +0100 (CET) Received: from [192.168.1.2] (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 4C6DC29002C; Sat, 11 Feb 2012 19:12:12 +0100 (CET) From: Eric Botcazou To: Jack Howarth Subject: Re: [libitm] Link with -litm and -pthread Date: Sat, 11 Feb 2012 19:11:11 +0100 User-Agent: KMail/1.9.9 Cc: gcc-patches@gcc.gnu.org References: <201202111514.40618.ebotcazou@adacore.com> <201202111854.06083.ebotcazou@adacore.com> <20120211180129.GA11655@bromo.med.uc.edu> In-Reply-To: <20120211180129.GA11655@bromo.med.uc.edu> MIME-Version: 1.0 Message-Id: <201202111911.11582.ebotcazou@adacore.com> 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 > Applied to gcc trunk (r184130) along with the proposed fix for > Bug libitm/52042... OK, I missed the hardcoded(!) spec in config/darwin.h for libgomp, so I guess we need the same thing for libitm. Revised patch attached. * config/darwin.h (LINK_COMMAND_SPEC_A): Deal with -fgnu-tm. (GTM_SELF_SPECS): Define. Index: gcc/gcc.c =================================================================== --- gcc/gcc.c (revision 183864) +++ gcc/gcc.c (working copy) @@ -675,6 +675,7 @@ proper position among the other output f %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}}\ %{static:} %{L*} %(mfwrap) %(link_libgcc) %o\ %{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\ + %{fgnu-tm:%:include(libitm.spec)%(link_itm)}\ %(mflib) " STACK_SPLIT_SPEC "\ %{fprofile-arcs|fprofile-generate*|coverage:-lgcov}\ %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\ @@ -839,9 +840,14 @@ static const char *const multilib_defaul #define GOMP_SELF_SPECS "%{fopenmp|ftree-parallelize-loops=*: -pthread}" #endif +/* Likewise for -fgnu-tm. */ +#ifndef GTM_SELF_SPECS +#define GTM_SELF_SPECS "%{fgnu-tm: -pthread}" +#endif + static const char *const driver_self_specs[] = { "%{fdump-final-insns:-fdump-final-insns=.} %