Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2560405pxj; Mon, 10 May 2021 05:58:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnbxdoWIqjgF68EHVSk4sOvQRHMPTOB6GZCmWFlrc7Lgt3WJsd8KnFvhZdLFEDqigsYKn+ X-Received: by 2002:a05:6638:2410:: with SMTP id z16mr21623236jat.130.1620651508300; Mon, 10 May 2021 05:58:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620651508; cv=none; d=google.com; s=arc-20160816; b=kcP469CaBHyDarKcwuMg2XFyD5igMfGHUmIf8Wv6NuNFtn9PwGlTu30gHS26so4hK4 DYrWCrX2KOnmQ/+Hd49xU2H5X887FBWUZk2mFco/pdeAd59p4VqIRknRBEO2nn9L1p8u zArNUAzf5ZTiDH+/8fbiGMa8rRz0DANrHdDLHO6k1e3KPLZD/lmeLr8FbsQ5qx2jjD5L GuJXisnqukyEyqZsJCydYFwzMr5DnH8qcJ+bJ5JseFf22U+7UJGlQdK2WxGkIP3OcU31 YE5IHrMRofe1O6WQflKDCNoY+gkgkqV7phPOyQJG9x5378t1jKORtVGK4UykjQaWP6pm e5zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Wz4770E6WlZHJO6FpRL8oRVVwrtetwJeiUEiuv47nWM=; b=ZqX3/5HS4DU4HLNwJp7MIYAzERN2JOFsdjtZT0VhZ+35WTb+ajTFj12V7ZWLDYXnFl XeGJoC0/NsnLtWR2lVXJiTWfQaTg6yILoG0NRR7T+K2BudjrS/Ge7NO6vuSlsJAV/3DI 07GjThTVwEDA/YAtp7DE08E8499KrwW5c6FZFgH4DcxY3WoyXa4ejOmmUjkQQTFK+F+2 b8rtCh5kQ0+f39ijhUdr38vqlVzx9U5UB0GUVskm8p9I/I3qmPTYlC1eb46HnnslZPeB WwjfVWJyILWSuaC6oYHHavy09ToqI/I01P/kwC4p/Rv3dqUYl8ZfQ38zoPA/YCPyFQZt PI0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=b6pXjUzp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a14si15705681iol.90.2021.05.10.05.58.14; Mon, 10 May 2021 05:58:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=b6pXjUzp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349727AbhEJMt5 (ORCPT + 99 others); Mon, 10 May 2021 08:49:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:44284 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243607AbhEJL4k (ORCPT ); Mon, 10 May 2021 07:56:40 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0FAD260E09; Mon, 10 May 2021 11:55:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620647735; bh=Buq1laZ76OqFLHmskKKS5PV5+ZPjhZXlVRG23gqzhT8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b6pXjUzp6YuGjnjrroTKwA2EYuaptYplV0UC5pMmI5THlVDN8bvf68EAlQA4BfgFz n6KlntxUrWKM3LbfQ3VxW5m48LValnRarrFNutXc7N7c0Y9bdiylk8OHLLB2JGa/jm l/CpUQ5yjO+DWkv+RiQvBBYV8y0N++BQX8Zdin2U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andre Przywara , Nick Desaulniers , Mark Brown , Catalin Marinas , Sasha Levin Subject: [PATCH 5.10 067/299] kselftest/arm64: mte: Fix compilation with native compiler Date: Mon, 10 May 2021 12:17:44 +0200 Message-Id: <20210510102007.119215596@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510102004.821838356@linuxfoundation.org> References: <20210510102004.821838356@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andre Przywara [ Upstream commit 4a423645bc2690376a7a94b4bb7b2f74bc6206ff ] The mte selftest Makefile contains a check for GCC, to add the memtag -march flag to the compiler options. This check fails if the compiler is not explicitly specified, so reverts to the standard "cc", in which case --version doesn't mention the "gcc" string we match against: $ cc --version | head -n 1 cc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 This will not add the -march switch to the command line, so compilation fails: mte_helper.S: Assembler messages: mte_helper.S:25: Error: selected processor does not support `irg x0,x0,xzr' mte_helper.S:38: Error: selected processor does not support `gmi x1,x0,xzr' ... Actually clang accepts the same -march option as well, so we can just drop this check and add this unconditionally to the command line, to avoid any future issues with this check altogether (gcc actually prints basename(argv[0]) when called with --version). Signed-off-by: Andre Przywara Reviewed-by: Nick Desaulniers Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20210319165334.29213-2-andre.przywara@arm.com Signed-off-by: Catalin Marinas Signed-off-by: Sasha Levin --- tools/testing/selftests/arm64/mte/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/testing/selftests/arm64/mte/Makefile b/tools/testing/selftests/arm64/mte/Makefile index 2480226dfe57..4084ef108d05 100644 --- a/tools/testing/selftests/arm64/mte/Makefile +++ b/tools/testing/selftests/arm64/mte/Makefile @@ -6,9 +6,7 @@ SRCS := $(filter-out mte_common_util.c,$(wildcard *.c)) PROGS := $(patsubst %.c,%,$(SRCS)) #Add mte compiler option -ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep gcc),) CFLAGS += -march=armv8.5-a+memtag -endif #check if the compiler works well mte_cc_support := $(shell if ($(CC) $(CFLAGS) -E -x c /dev/null -o /dev/null 2>&1) then echo "1"; fi) -- 2.30.2