From patchwork Thu Sep 12 15:11:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw X-Patchwork-Id: 1984727 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=JFy7P+4a; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=JFy7P+4a; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X4LXL3cmKz1y1l for ; Fri, 13 Sep 2024 01:12:34 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 51ADD385B508 for ; Thu, 12 Sep 2024 15:12:32 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on20629.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e1a::629]) by sourceware.org (Postfix) with ESMTPS id 1E6303858D3C for ; Thu, 12 Sep 2024 15:11:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1E6303858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1E6303858D3C Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f400:7e1a::629 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1726153906; cv=pass; b=kxgIl789DKRMsCeNpqTr87HYwVy5WD9uCHjiuSvS/mk9ZfM2E4dy/E8wXawsDvxJVdEKa5DWSQUSTOrwUEtxc4pFwVdZqZusS4ShXiwfcYgrHAvs7Dl5rmKo1UF660neCfGOPSk9qN7yCq1FtDG4dg7IqLvCbmGld/xU7mhaaag= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1726153906; c=relaxed/simple; bh=ex0Y6eoSaMsTOyPLRk6DsdhV9R1ZEr6bZkkfMBNGCDg=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=ZystPrI3qkltgbxTNktGbziQgWmmElSPHWYe3D0piMoLLwGtHGNQPTyL953TUz1k2FZY4/hBmOmqCUuA+rOVbBFFLzp39m4hXidrNTEOIj2/zVFcG5oVN8A327AznC8S6ongrAVMaOz21S2epT+HpfAZ10/z0XlkM5OZe+TczOg= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=fmIkFQFMuk12LjvnQaTry0fPRQhy63Ir/Y4F1zkQBr8S0uCcO2KSVSKrh4EAaY0DNg3zaty/i6GrOKABVzUheoM6DI8yJNEEJ/eMPSntSvB8tCDbaIt1U3iNvuxZ7g871+9XCaFDxzCL0AiHwhAU8CHznnSK54KXmIgumKnVfT8CC4X+ayXviWM71zA+z/DBL45pj56IUX1YnbHjEcAwvF2axNomN3YArs5iseHSgIm17u6Abv7czwEe2bTgrAOVJQ/zBnLUr8MTiDyroSR0WSV/g2TYISX7LTrD87Afh5NHW6RR1MIGl4D0CGM9Pr6Y2837opi//WA0SgX76Mutcw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=M9On0h1cQfSy67XqR28+11lyN2AL8rauLTWHImdGd3w=; b=U1HbMUqqH86bh8taCxVtF/JbFcoWhEAuRLanV0QlBrscyV5kLaYS6QvU3NMP9+7D1bknspVJdajuAgnWdn2jGfxybO8UXooIC+D4ECYUIpe3FCQXbXBHrE6V5RdkbWY2Kjfg5lXFOTLeIrMYe6RvZ3DVT8J3MW+//bRSyRI7h7mlLavwtpqExWRdk5DbMWUlryBKMX3qyu1l1AgAKm+G/DcpbpbizyVew/R/RXr7dlyqI/RloidYWe2p+ua95pswDmRqPUfL9xd9UvfLyG93DwnMZVe7Cyy9YRRVS9C1CxqbL5WrFAzRiLljlR2NcDaZTV/E4TfV+4mwuU+uFbC9+g== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M9On0h1cQfSy67XqR28+11lyN2AL8rauLTWHImdGd3w=; b=JFy7P+4aYoT8rBnaykWM7H62Iem6Lm4bERe9rzi/rV9AKjOK+Z19Z0TDsp1isA/woRS4UFOmNPUxU6R6Iw+5bH0cG9VCvYrl7mDZThxVrMh0CpjhJuRN4ODPOS58hnFgPgXrYnGaofmLEeecri3Nl/Y/nlKQsTzoWDoLL933d8M= Received: from PR1P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:19f::8) by AS2PR08MB8926.eurprd08.prod.outlook.com (2603:10a6:20b:5f9::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.17; Thu, 12 Sep 2024 15:11:33 +0000 Received: from AM4PEPF00025F9A.EURPRD83.prod.outlook.com (2603:10a6:102:19f:cafe::88) by PR1P264CA0021.outlook.office365.com (2603:10a6:102:19f::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.25 via Frontend Transport; Thu, 12 Sep 2024 15:11:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=arm.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM4PEPF00025F9A.mail.protection.outlook.com (10.167.16.9) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7982.0 via Frontend Transport; Thu, 12 Sep 2024 15:11:33 +0000 Received: ("Tessian outbound b109797c3965:v441"); Thu, 12 Sep 2024 15:11:32 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 0430a3bfd9deb373 X-CR-MTA-TID: 64aa7808 Received: from L26bfe6417c95.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 98020056-D478-4111-8E53-00AA1DD977AC.1; Thu, 12 Sep 2024 15:11:26 +0000 Received: from EUR03-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L26bfe6417c95.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 12 Sep 2024 15:11:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=W1klDo9NQxLC1DPjhsbi4Iq9HcZGzWgYDIBznVCUThxvZYCr7wrfMMa2qFsPWAKVdj3ReHUZtJPTjA9CQ0LSeu15a1A9wQ26ChNMD3TPhQZoOMEQejyiV5gi8brF2JGLuABx6GjzdXiphYo0GlwZZeKWO6T2RmhU6PhouxYBE26xJAo/wTboFInXAYohfnvQgZCmxmIpnWaMeUiyNgjSFwjgC3sxTcMksukq9w41VXN4niInUByu8OMlZt/USM4c4hmCowHM9Wk7f9hPPX4oWTNUjf6goawUQjwzhpbxpzY0C0WT2Vot6s4dfATGjH/OXOlyylKLboRMnhL2a1h6eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=M9On0h1cQfSy67XqR28+11lyN2AL8rauLTWHImdGd3w=; b=CMXa9nWEkvYpX2kgzY4O6V9LYj+x/3Ud7YqputDYieWRZdivZPvABqQabI67r7xPKRB51FiIepTfC9A8hjKJLZlVDR1Z2pjKIEIPVH9XySV5pJPdg6zCMUF2q110T8pynLGZ8M0bpFYeRwDp03mlk9E6lAp6U7UXaZ9o2rjcj9x1C5wxAz3fO1alhQV5o6i+9tVQ+p7WlZa9HSt9S8wyvijy4pUWy3GQEjLhDBCKrNkri5i9aq28dpDWiROjdfCBrbdzvGuix+ukzOGLeyzB1WNy2z0e6GsbwJ+rAfU0RBUsuIoI9rGVfVO6JhjuYRMrkjssgw6N9Kmd/nbREny5Yw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M9On0h1cQfSy67XqR28+11lyN2AL8rauLTWHImdGd3w=; b=JFy7P+4aYoT8rBnaykWM7H62Iem6Lm4bERe9rzi/rV9AKjOK+Z19Z0TDsp1isA/woRS4UFOmNPUxU6R6Iw+5bH0cG9VCvYrl7mDZThxVrMh0CpjhJuRN4ODPOS58hnFgPgXrYnGaofmLEeecri3Nl/Y/nlKQsTzoWDoLL933d8M= Received: from AS9PR06CA0368.eurprd06.prod.outlook.com (2603:10a6:20b:460::32) by VI1PR08MB10299.eurprd08.prod.outlook.com (2603:10a6:800:1bf::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.16; Thu, 12 Sep 2024 15:11:22 +0000 Received: from AM3PEPF0000A794.eurprd04.prod.outlook.com (2603:10a6:20b:460:cafe::8e) by AS9PR06CA0368.outlook.office365.com (2603:10a6:20b:460::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.25 via Frontend Transport; Thu, 12 Sep 2024 15:11:22 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by AM3PEPF0000A794.mail.protection.outlook.com (10.167.16.123) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7918.13 via Frontend Transport; Thu, 12 Sep 2024 15:11:21 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 12 Sep 2024 15:11:20 +0000 Received: from e120077-lin.cambridge.arm.com (10.2.78.71) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Thu, 12 Sep 2024 15:11:20 +0000 From: Richard Earnshaw To: CC: Richard Earnshaw Subject: [PATCH 1/2] arm: Allow -mcpu and -march options to be unset Date: Thu, 12 Sep 2024 16:11:12 +0100 Message-ID: <20240912151113.4079992-2-rearnsha@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240912151113.4079992-1-rearnsha@arm.com> References: <20240912151113.4079992-1-rearnsha@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM3PEPF0000A794:EE_|VI1PR08MB10299:EE_|AM4PEPF00025F9A:EE_|AS2PR08MB8926:EE_ X-MS-Office365-Filtering-Correlation-Id: eb1a2354-d2d5-45c1-1410-08dcd33d2ff2 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|36860700013|376014|1800799024|82310400026; X-Microsoft-Antispam-Message-Info-Original: bD5xWLKLa+JjvDetQzJlJJ7DyMM8kgTOhSKIeTIaZmtRQR3oJGJoR9vR89MZM2EfxWYvXYVgFcAUT8h95M1WIShbXxu+4MCQDKqYWF3Q1lAX969vZAViYKb0P9jy/6oltkhcjidbzcK+AqD+0saWZAZcJrq16EWg8REGni8AvGbB+7LeIukgN188Eo18McbIGspthWJ2IjqqiwYbXaPUYanuNgR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Z2VzRYP/Ehb/CrtOWqN+b6QVbxa2YenAgKtrX19U46nqedLSdE3kr03y+39TWIKs2ytXW6NxpSA/AxiDd2syVl0cxHqZA8ZHYpt95NN3+ZdlbIMWBChF+3aI7d9MMrkyy2Zuv3PA0+lCRvKbXIIgKmc+1b0/xLq2ABOWDxArfq X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(36860700013)(376014)(1800799024)(82310400026); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB10299 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:20b:460::32]; domain=AS9PR06CA0368.eurprd06.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM4PEPF00025F9A.EURPRD83.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: ef9d959f-5455-4cda-01f6-08dcd33d2961 X-Microsoft-Antispam: BCL:0; ARA:13230040|35042699022|376014|82310400026|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: XwtSr/gy3vJq9lwSQfYPH3FZ1kh6fHqaILkn777WA2HNBXkpvqeMYQcvFA8kZbSw3a4iNzyKjK90c9IMRG1YQZTVxMoofsBmX1wDULfykZyGBdMFw+jckjovul6GDuO4FONy8D1F1Vf5p1TFM5HHZE+0xAOzcgNKn+qdMKSJk+FHEH8MHEvrBUgzovC+eV0JeH5WEito2OPp2OZcxHv5p1/qwtwqF+vPUB0fXQ7g/9/j3fuwm7+CFUVU84CLTMxhVHGYTRPEoroj5q51Ya1SbGotMq8qMgk+Q7F8M1XUOOX4zqCq3dF0HU67HBLv+ZEvlNz96YHfBxRMfNIcegOZjDOThkad3+PWB+5VKylmtE/b4JJKmhp4swVUaLP+t5SO66vBOguNYWn1p4mRT/I6qrlGnXtOIQoVBdnyF58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NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230040)(35042699022)(376014)(82310400026)(1800799024)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Sep 2024 15:11:33.0158 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: eb1a2354-d2d5-45c1-1410-08dcd33d2ff2 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM4PEPF00025F9A.EURPRD83.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB8926 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NONE, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org The compiler will warn if the architectural specification derived from a -mcpu option is not the same as that specified by -march. This is because it was never intended that the two should be used at the same time: -mcpu= is supposed to be shorthand for -mtune= -march=arch-of(). Unfortunately, there are times when the two options passed to the compiler may come from distinct sources: one example is makefiles which accumulate options; another is the testsuite itself, when some tests require a particular architecture setting to be useful - only running the tests when the compiler/testsuite configuration exactly matched the requirements would make regression testing especially hard (we have too many permutations). So this patch allows a user to cancel any earlier setting of a particular flag and to make the compiler behave as though it was never passed. The intended usecase is (sources of options are shown in parenthesis, but that's just for grouping: (-march=armv7-a+simd) (-march=unset -mcpu=cortex-m33) The option processing logic will now simplify this to: -mcpu=cortex-m33 A useful corollary of this is that -march=armv7-a -march=unset will now cause the compiler to behave as though neither the architecture nor the CPU was ever set and to default back to the configure-time settings. gcc/ChangeLog: * config/arm/arm.h (OPTION_DEFAULT_SPECS): Allow -mcpu and -march to be unset. (ARCH_CPU_CLEANUP_SPECS): Likewise (DRIVER_SELF_SPECS): Add ARCH_CPU_CLEANUP_SPECS * doc/invoke.texi (arm: -mcpu= and -march=): Document use of 'unset'. --- gcc/config/arm/arm.h | 14 +++++++++++--- gcc/doc/invoke.texi | 12 ++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index 0cd5d733952..b092ba6ffe0 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -394,9 +394,11 @@ emission of floating point pcs attributes. */ TARGET_MODE_CHECK that also takes into account the selected CPU and architecture. */ #define OPTION_DEFAULT_SPECS \ - {"arch", "%{!march=*:%{!mcpu=*:-march=%(VALUE)}}" }, \ - {"cpu", "%{!march=*:%{!mcpu=*:-mcpu=%(VALUE)}}" }, \ - {"tune", "%{!mcpu=*:%{!mtune=*:-mtune=%(VALUE)}}" }, \ + {"arch", "%{!march=*|march=unset:"\ + "%{!mcpu=*|mcpu=unset:%