From patchwork Wed Apr 25 20:08:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rong Xu X-Patchwork-Id: 155091 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 10302B6FE2 for ; Thu, 26 Apr 2012 06:08:37 +1000 (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=1335989318; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Received:Received:To:Subject:Message-Id:Date: From:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=pQX6uCF 8iVQPh+ezqyUemyfrktE=; b=UdPTZptcllzorKI7P3xx5ip0pVikVowVj4+qSaO KnTH9Vx82yX5/+zarzYAgqxAognl7FiHaFK0XOjNPp77qv258rBXcHDQAGZe5t3s +52+IWPA1aZ8YdYDekRQg7JOiB9z28Erv+CoDwYoBc85MMtWAgKCNXYKLQve51yB JX3M= 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:X-Google-DKIM-Signature:Received:Received:Received:Received:Received:To:Subject:Message-Id:Date:From:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=AfrOoWBj9b7O1W0+ohVnfb3irNhmAKEAyCsbLKGvqwXdigCo+iJ9hiUu3OgeRQ gpaqls1fKjVf33x/hjeepiWEjgHzqWQ0UNuSybeXBc2C/qDqRrGOalqUrRNAsjsz BKotOFWyn8yBqlaCPK1HX35UDuUkX53tQU6Z1swVNpkoE=; Received: (qmail 15537 invoked by alias); 25 Apr 2012 20:08:29 -0000 Received: (qmail 15417 invoked by uid 22791); 25 Apr 2012 20:08:25 -0000 X-SWARE-Spam-Status: No, hits=-4.4 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-lb0-f201.google.com (HELO mail-lb0-f201.google.com) (209.85.217.201) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 25 Apr 2012 20:08:13 +0000 Received: by lboj7 with SMTP id j7so22003lbo.2 for ; Wed, 25 Apr 2012 13:08:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=to:subject:message-id:date:from:x-gm-message-state; bh=2MTJ8FmrGMb+0qEUwScZs7uuy0b4FBLbj/7xx0NMnfY=; b=X+0CstHVIjYth1reZVH33rt4vHFK7I35b85XC7pJO1SMszPddpAmIDBABZ3rMlGIhv axsRVEBUxkmi9Bf8lMKqNPrx8NetzWw1YknDRZPfsHORzcJ19bdfTG0CYaOGnvIgpE1i gVdQHSLbLKYYltPM8twXwknaBmSdA3GPMRTNPRVFNpmThYscg4ZOx6ZnJuNRmTYnbWHO thptgbdxkUgYXJKJzHGlGUjdn/Yx1e+3t79vLhUsaSN1z9XWA/LCvzrby98INM29LQAP efNV31uuu1SUceatPdMha1B6tmNt4kiZyEcmOw4R/qIMEry8YV0QqJFoVL8cBiPZudqr WeDw== Received: by 10.213.21.203 with SMTP id k11mr445557ebb.24.1335384491021; Wed, 25 Apr 2012 13:08:11 -0700 (PDT) Received: by 10.213.21.203 with SMTP id k11mr445546ebb.24.1335384490885; Wed, 25 Apr 2012 13:08:10 -0700 (PDT) Received: from hpza10.eem.corp.google.com ([74.125.121.33]) by gmr-mx.google.com with ESMTPS id t8si631041eef.1.2012.04.25.13.08.10 (version=TLSv1/SSLv3 cipher=AES128-SHA); Wed, 25 Apr 2012 13:08:10 -0700 (PDT) Received: from rong.mtv.corp.google.com (rong.mtv.corp.google.com [172.18.110.233]) by hpza10.eem.corp.google.com (Postfix) with ESMTP id AC7E6200180; Wed, 25 Apr 2012 13:08:10 -0700 (PDT) Received: by rong.mtv.corp.google.com (Postfix, from userid 104659) id DF038C1998; Wed, 25 Apr 2012 13:08:09 -0700 (PDT) To: reply@codereview.appspotmail.com, davidxl@google.com, gcc-patches@gcc.gnu.org Subject: [google-4_6] fix broken -S in streaming LIPO (issue6115052) Message-Id: <20120425200809.DF038C1998@rong.mtv.corp.google.com> Date: Wed, 25 Apr 2012 13:08:09 -0700 (PDT) From: xur@google.com (Rong Xu) X-Gm-Message-State: ALoCoQlCf28RsPq5yFgdcPCfYHz1kmMgrgaNXg0rp+z1ZJt5N0erAqeUoKywxNtsfwokBb5Sc59b0PxyDMpQnN6bsq9J2iamlG/Cjg3t03/fBsOdjq90AsEWHm7sXFoGaoo218WGM/6FogOa6zeNMDrFPWgoILVnlALVrUKNb8u+XQkYje78tuE= 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 Hi, This patch is for google-4_6 branch only. It fixes the broken -S in streaming LIPO mode. Tested with bootstrap. Thanks, 2012-04-25 Rong Xu * gcc/gcc.c (ripa_lto_spec): Support -S. (cc1_options): Ditto. --- This patch is available for review at http://codereview.appspot.com/6115052 Index: gcc/gcc.c =================================================================== --- gcc/gcc.c (revision 186783) +++ gcc/gcc.c (working copy) @@ -746,7 +746,8 @@ /* specs to call lto1 for streaming lipo. */ static const char *ripa_lto_spec = -"lto1 -flto -flto-partition=none %(cc1_options)"; +"lto1 -flto -flto-partition=none %(cc1_options) " +"%{S:%W{o*}%{!o*:-o %b.s}}"; /* options to call asm in streaming lipo. */ static const char *ripa_asm_options = @@ -820,7 +821,7 @@ %{-target-help:--target-help}\ %{-version:--version}\ %{-help=*:--help=%*}\ - %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}}\ + %{!fsyntax-only:%{S:%{!fripa=streaming|!fprofile-use*:%W{o*}%{!o*:-o %b.s}}}}\ %{fsyntax-only:-o %j} %{-param*}\ %{fmudflap|fmudflapth:-fno-builtin -fno-merge-constants}\ %{coverage:-fprofile-arcs -ftest-coverage -fno-early-inlining}";