From patchwork Fri Feb 14 03:18:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 1237838 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-519527-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=marvell.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha1 header.s=default header.b=XWy2R4tP; dkim=pass (2048-bit key; unprotected) header.d=marvell.com header.i=@marvell.com header.a=rsa-sha256 header.s=pfpt0818 header.b=HIFJEVn9; 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 48Jdr85RGXz9sRN for ; Fri, 14 Feb 2020 14:18:31 +1100 (AEDT) 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:mime-version:content-type; q=dns; s=default; b=EvRa++wNs3uGoAOWDVJiPKtiJ6t3rzroDrU+FqKnZ8nb2APUdg d55DKijFgj3Epv3ApxkHkczrqDd/4yOgb5s9wrMXcFHBl7ch7VKzGCDdg/BE9Mlb LFQzEai87Q1OQQHOsh6OCN5a+Pihh4E1X7UBiYbwqMHX1/mu1zwETeRW8= 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:mime-version:content-type; s= default; bh=5fbQN182Y02Vw/wiKrXF8KKljUc=; b=XWy2R4tP223myThjdcc8 /F4wp2zIBPV+NdkII3quItH48KZiR+9Tmzm3ouTY9z6ltbQD6tvtClK5KDwoOseF bicvYYHsF2BixYDjVlB2Fcm3LyJTe0rG/4wknKzW2kX1O8Cylgd3506QdwIf+0A3 5wsYnyuH0+CFckTb67MkNik= Received: (qmail 31718 invoked by alias); 14 Feb 2020 03:18:23 -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 31707 invoked by uid 89); 14 Feb 2020 03:18:22 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-27.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.1 spammy=supplies X-HELO: mx0b-0016f401.pphosted.com Received: from mx0a-0016f401.pphosted.com (HELO mx0b-0016f401.pphosted.com) (67.231.148.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 14 Feb 2020 03:18:21 +0000 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 01E3Hojk009478 for ; Thu, 13 Feb 2020 19:18:19 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0818; bh=mO8/cRJENj3Yk6u5I3TLk3k9RvkYy3526tt4bbIm6so=; b=HIFJEVn99JXzv60ioUDsM8Hl9fabN3QyjxJ/Lw8wJ2A4qnMgZqEvmcLaxOiRjZ2ST888 ubUpPBy2lVGp2d/rY9BHl8SQn6ZRoY8FFsAQ5Lrzg9zD9wAZRFCaZoiWjUWp5iQY4bUE DDs1iSPSiXodt7i7vuOqVK3TyxB8Ku3GD0lT4AEu9xthtdos+Y1cI8dSBtvbHFRypuXp mR/H6ePwP036wO/GdnVL0MdjwVytKJnEBMsUHxUIPLfQoPOksQV5aGcieswDU7+H5ojb Lh1sMXTqV2f7eHBvhnrS1hnZ2I81knCcmMc+J292ge33OcnzQ4yEjnFUgGKUV1j/b90R +A== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 2y4be2jrmw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 13 Feb 2020 19:18:19 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 13 Feb 2020 19:18:18 -0800 Received: from SC-EXCH01.marvell.com (10.93.176.81) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 13 Feb 2020 19:18:17 -0800 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 13 Feb 2020 19:18:17 -0800 Received: from linux.pinskiwright.org.com (unknown [10.11.201.32]) by maili.marvell.com (Postfix) with ESMTP id C89BC3F704F; Thu, 13 Feb 2020 19:18:16 -0800 (PST) From: To: CC: Andrew Pinski Subject: [PATCH] aarch64: Allow -mcpu=generic -march=armv8.5-a Date: Thu, 13 Feb 2020 19:18:04 -0800 Message-ID: <1581650284-3332-1-git-send-email-apinski@marvell.com> MIME-Version: 1.0 From: Andrew Pinski Right if someone supplies a -mcpu= option and then overrides that option with -march=*, we get a warning when they conflict. What we need is a generic cpu for each arch level but that is not that useful because the only difference would be the arch level. The best option is to allow -mcpu=generic -march=armv8.5-a not to warn and that is now a generic armv8.5-a arch. OK? Bootstrapped and tested on aarch64-linux-gnu with no regressions. Thanks, Andrew Pinski ChangeLog: * config/aarch64/aarch64.c (aarch64_override_options): Don't warn when the selected cpu was generic. --- gcc/config/aarch64/aarch64.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 4a34dce..9173afe 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -14075,10 +14075,12 @@ aarch64_override_options (void) explicit_tune_core = selected_tune->ident; } /* If both -mcpu and -march are specified check that they are architecturally - compatible, warn if they're not and prefer the -march ISA flags. */ + compatible, warn if they're not and prefer the -march ISA flags. + Only warn if not using the generic cpu. */ else if (selected_arch) { - if (selected_arch->arch != selected_cpu->arch) + if (selected_cpu->ident != generic + && selected_arch->arch != selected_cpu->arch) { warning (0, "switch %<-mcpu=%s%> conflicts with %<-march=%s%> switch", all_architectures[selected_cpu->arch].name,