From patchwork Tue Sep 26 09:35:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Richard Earnshaw \(lists\)" X-Patchwork-Id: 114246 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp3613478qgf; Tue, 26 Sep 2017 02:36:42 -0700 (PDT) X-Google-Smtp-Source: AOwi7QA02cIc1MXNwR3qX11ARCupE84mJyd6jd+gos6SPDyQArwH9dEa3sdiDjzaX85KaL2Byrxq X-Received: by 10.99.42.79 with SMTP id q76mr10314117pgq.66.1506418602251; Tue, 26 Sep 2017 02:36:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506418602; cv=none; d=google.com; s=arc-20160816; b=mGJxNx8eRazJog26ytUW1BFtU1/bevqEEO6nj2uW3JC1ArHutwei7T0G9XaqfVG6Vi 3/N1UQj7uB55dW0xKo142WghJSEXE/7umigqWt41MDfMCep0d6czW0CH8zDGwAfx5QzQ HVT4ACcijHQiB6lzQW7dRhH4sEzvpu/yGjZbs17udBBCFQugH4rxC6FgvmkUTokvup45 OxNd99jmCFZ7xgG5qcbmLOrvOVu9tNtKOmwWgp/zA6YVfPzndUPz2QvFolrA7n+TDDnR 1EnNBN/BEVZFhQ/deTPAqslwuW2BtGedIbU8rBNzWmUQzfOzneHKeNbWYrKIZyWqKdRG Nmmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:date:message-id:subject:from:to :delivered-to:sender:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature:arc-authentication-results; bh=g2vN2NyOvgryYyHLBpkjxaxrHkezDa/eFCpRl690TGY=; b=tGj643ZalUoR381qWnFvaW4p5uOyU9IG2Mrs/JPYGoVfgAaq169GTjdUMimQzCgAnH M+b488KhffacHX3pmsKe/bJL4GUsdVPxfxth59s5/UkER/9q4NUWu8jxogybPE7EMNUx f4vequ6oAdgBqNiQd5TXluRT+5ySyt0apyHD16FKBMdb/bZ4NVANTelWoech03PWP2hQ NjHpQoLqBIbmGoOfpJOGCM8ZH2ydf0uWkPOoQYxpyQezMsj/eaOnRzIEN2/LrEFK1Sar kjI0AmUBL6GLP7G1aRyIeoV+D4fZ+1y0qJ1aYmJlLjCbjRSjI5Jl10ELD6razPqFIwjm ZQOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=oy+iJErP; spf=pass (google.com: domain of gcc-patches-return-462938-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-462938-patch=linaro.org@gcc.gnu.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id e9si5485988pgo.71.2017.09.26.02.36.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Sep 2017 02:36:42 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-462938-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=oy+iJErP; spf=pass (google.com: domain of gcc-patches-return-462938-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-462938-patch=linaro.org@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=rGbUK9P7Xkes+RQdQtXAWuT+37TypffOh8X9HfkxjZGPaHfazI qwMP7Pf2MdvhT6eKQqnlIxEw2fKKfhuzELU7/irfY9KyjTfeWxe45mDX8JdrnL6+ Qy9QxAg0qumqFjA1MZfyEcd7qVneHm4upBgl6rVnctM9iF9J+WexSwlT0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=OFqp2m0BL+K7qewBWIa9ADb4wv4=; b=oy+iJErPeRCPJzmlw8qt 7TN5bN6vg8q6Nb/iNg+oZ99SKkDKLqaq3T31lTBbxBR2L+H89AFeurvyEyFHWuLX efhsCNXKNyySAtEUqujx/Qb9TYxbVne+K6E1O++6kfBQtDGOU/O2VBdnziunjtvo XPKTZG6ppPqYpbr3hXjC66Y= Received: (qmail 96862 invoked by alias); 26 Sep 2017 09:36:27 -0000 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 Received: (qmail 96842 invoked by uid 89); 26 Sep 2017 09:36:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 26 Sep 2017 09:36:25 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D922F1529; Tue, 26 Sep 2017 02:36:23 -0700 (PDT) Received: from e105689-lin.cambridge.arm.com (e105689-lin.cambridge.arm.com [10.2.207.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 632773F3E1; Tue, 26 Sep 2017 02:36:23 -0700 (PDT) To: gcc-patches From: "Richard Earnshaw (lists)" Subject: [patch] [arm] Fix pr82175 - fix -mcpu=native not working correctly Message-ID: <33ea0785-3da1-9985-b773-044e0e9893e7@arm.com> Date: Tue, 26 Sep 2017 10:35:53 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 The new option processing machinery relies on %< rules in the specs to suppress options that are rewritten. Suppression appears to be a two phase process where the option is partially suppressed when %< is processed and then fully suppressed at the end of the string. Strings are separated by commas and there can be multiple strings used to form DRIVER_SELF_SPECS. The fix in this case is to separate the driver self specs for ARM into separate rules as described; this forces the -m{cpu,tune,arch}=native options to be properly removed before proceeding to the next rule set. PR target/82175 * config/arm/arm.h (DRIVER_SELF_SPECS): Separate sub-rules with commas. Tested on cross and native. Applied to trunk. diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index 9a171b0..0804e2a 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -2237,9 +2237,12 @@ const char *arm_be8_option (int argc, const char **argv); " %{mfloat-abi=*: abi %*}" \ " %