From patchwork Tue Sep 24 18:47:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Turner X-Patchwork-Id: 1166794 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-509520-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="loRZGNoZ"; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="dLmFNNtt"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46d9FX5Hc0z9sBF for ; Wed, 25 Sep 2019 04:48:46 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; q=dns; s=default; b=TFC NOjQkRpmdXMjXEug8W/77/F6bik4asY3ZvJZ0cWPwEKq1PfIFbbaprFKzwjq/oRU LENr89ajJ41K1GD1DeIeeOLV5BktfWLcovOJsaT0gbdo7CK33cW60YDuno7vbJ4X BqyoFLGL8gmxAnw/YuuMD6Su5WpUXR4OpsAurBgc= 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:from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=default; bh=c1PkW3c6B FDuvAphPb91983swI0=; b=loRZGNoZILuSKjP035ls3OP76cZL7VJDFbFLiWeF3 G/6wOB8qWz7EUdAk42MbSQwuTiWsw+Meid2RN0dMEcfdanrNKNgX0kwkY+fzAK6s Z7/Qj61s04i4e5omkPIB/flJ1vkY07X9/avoshoZPc0qMFgE3jG6AJ1Twf9UHvr1 Xs= Received: (qmail 71899 invoked by alias); 24 Sep 2019 18:48:06 -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 71398 invoked by uid 89); 24 Sep 2019 18:48:05 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.8 required=5.0 tests=AWL, BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail-pg1-f169.google.com Received: from mail-pg1-f169.google.com (HELO mail-pg1-f169.google.com) (209.85.215.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 24 Sep 2019 18:48:03 +0000 Received: by mail-pg1-f169.google.com with SMTP id c17so1794771pgg.4 for ; Tue, 24 Sep 2019 11:48:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PDGR2fC7pYhJyjs42ZJkKEeCPq4UwkBwVhJxfHWqsGM=; b=dLmFNNttpvDnh0nOJO43n4TI58ttWSkNN4Iz2f+8J79CMoGIlnyHnUu01jFVbhTHK8 cYBgdpKiVeX60axOZ7qTpNmwi4UEbVcKq+SjFtqABKhzL91OX6vhFTdmVVPYS8nNO0S9 j7iYxImNEvP7T1IRfpqYCYn+V+pQ0ZpZSJgR6NrORNjmEqTmOJs+eQn8ZzqUXq6JPw99 PGbcnO/4F/CHJRf7c0VFSRQmcuQ1ZXe/+Q3Ia5vMQXGIVPGPPLjSWRI4yqxmWCFuZp9n KOBWKnrR7HxT1Vps4geMIwFhXO3381i08iCmdo3O2Zuk6Y68vefidNjczO0B3+c9deBO N37Q== Received: from localhost ([108.161.26.224]) by smtp.gmail.com with ESMTPSA id b24sm2477844pgs.15.2019.09.24.11.48.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Sep 2019 11:48:00 -0700 (PDT) From: Matt Turner To: gcc-patches@gcc.gnu.org Cc: James Greenhalgh , Kyrylo Tkachov , Marcus Shawcroft , Nick Clifton , Ramana Radhakrishnan , Richard Earnshaw , Matt Turner Subject: [PATCH] driver: Also prune joined switches with negation Date: Tue, 24 Sep 2019 11:47:56 -0700 Message-Id: <20190924184756.13295-1-mattst88@gmail.com> In-Reply-To: <20190924040427.32342-1-mattst88@gmail.com> References: <20190924040427.32342-1-mattst88@gmail.com> MIME-Version: 1.0 When -march=native is passed to host_detect_local_cpu to the backend, it overrides all command lines after it. That means $ gcc -march=native -march=armv8-a is treated as $ gcc -march=armv8-a -march=native Prune joined switches with Negative and RejectNegative to allow -march=armv8-a to override previous -march=native on command-line. This is the same fix as was applied for i386 in SVN revision 269164 but for aarch64 and arm. gcc/ PR driver/69471 * config/aarch64/aarch64.opt (march=): Add Negative(march=). (mtune=): Add Negative(mtune=). (mcpu=): Add Negative(mcpu=). * config/arm/arm.opt: Likewise. --- gcc/config/aarch64/aarch64.opt | 6 +++--- gcc/config/arm/arm.opt | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gcc/config/aarch64/aarch64.opt b/gcc/config/aarch64/aarch64.opt index 865b6a6d8ca..fc43428b32a 100644 --- a/gcc/config/aarch64/aarch64.opt +++ b/gcc/config/aarch64/aarch64.opt @@ -119,15 +119,15 @@ EnumValue Enum(aarch64_tls_size) String(48) Value(48) march= -Target RejectNegative ToLower Joined Var(aarch64_arch_string) +Target RejectNegative Negative(march=) ToLower Joined Var(aarch64_arch_string) Use features of architecture ARCH. mcpu= -Target RejectNegative ToLower Joined Var(aarch64_cpu_string) +Target RejectNegative Negative(mcpu=) ToLower Joined Var(aarch64_cpu_string) Use features of and optimize for CPU. mtune= -Target RejectNegative ToLower Joined Var(aarch64_tune_string) +Target RejectNegative Negative(mtune=) ToLower Joined Var(aarch64_tune_string) Optimize for CPU. mabi= diff --git a/gcc/config/arm/arm.opt b/gcc/config/arm/arm.opt index 452f0cf6d67..76c10ab62a2 100644 --- a/gcc/config/arm/arm.opt +++ b/gcc/config/arm/arm.opt @@ -82,7 +82,7 @@ mapcs-stack-check Target Report Mask(APCS_STACK) Undocumented march= -Target RejectNegative ToLower Joined Var(arm_arch_string) +Target RejectNegative Negative(march=) ToLower Joined Var(arm_arch_string) Specify the name of the target architecture. ; Other arm_arch values are loaded from arm-tables.opt @@ -107,7 +107,7 @@ Target Report Mask(CALLER_INTERWORKING) Thumb: Assume function pointers may go to non-Thumb aware code. mcpu= -Target RejectNegative ToLower Joined Var(arm_cpu_string) +Target RejectNegative Negative(mcpu=) ToLower Joined Var(arm_cpu_string) Specify the name of the target CPU. mfloat-abi= @@ -232,7 +232,7 @@ Target Report Mask(TPCS_LEAF_FRAME) Thumb: Generate (leaf) stack frames even if not needed. mtune= -Target RejectNegative ToLower Joined Var(arm_tune_string) +Target RejectNegative Negative(mtune=) ToLower Joined Var(arm_tune_string) Tune code for the given processor. mprint-tune-info