Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2556381pxj; Mon, 10 May 2021 05:52:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYf3oz/LZQ/me2jj9GHLItFc8VmLw5n/Tn8rc0rmynjR/dVJn0d+QqjvshPicHiI1zgLum X-Received: by 2002:a05:6402:36e:: with SMTP id s14mr28875337edw.338.1620651143826; Mon, 10 May 2021 05:52:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620651143; cv=none; d=google.com; s=arc-20160816; b=IppR2nhC/sv2WpwnZd5NAu2C/06R7aLm/NjYWOsU79MK0cr/nj3TFL1+3umyAcQ0Fh pe7vNEFgMiJ5NojVS2gZSKfnrFJJfmS2zl9MGEeLNCTNHoc20cbkV5sz47UfCKRjzVct LMfWymCCjuLvnuc8ASUfooHCcumwGz/uq7kWFBYQFrAHM2IPNfpMPyAvUVexCLEQsIMJ n1mAaK0SlLGcocNqN17vZQZZiCEtOLd1oUV/kjUOg4W0HKdVm4Trh0fBRtxgrI84wZtY q5g14GUIUiMo1Y6zH7GZqC0kNytYxHQX7RuwW+506BkNgAih4H3eQelkh6MC37i4Wy6Q etDw== 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=+LMIMfXT0zIX6hIDOUbdLmKoiFIO4XtEs7gjalk+FK8=; b=wWexu22ur8ZcDE4NFOdY7aL07xjVQkIeJ4x5gEopzWD4fhgQLaglPyk0DjJiKYKHFZ lJrISGLIDXNJAKgLrTQIbiHNYXIIct6R4GwwdfrJ5QDG3AM/NzFCSyOXnNypvokS58xk 1ud+33Z7H0OTFI233QEwYsezEknpmlkXfT/ackpIUh7CbKV2WxsugszjT3FcsXe04yix 4ZorqpdimNAdc0Tp8iIySyNgpTWTY6A+G0n8bIi2FI9ToHNjba8bOPJcB+y1eICS93la VZS+NcnkVp3PK6PGYgo3+p6bM9RvIQkGcxAd8DJMOSGr1XA3mrofdHlLp3a3cSUbqJeq PZCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Buwf6goR; 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 o25si12878175ejg.539.2021.05.10.05.52.00; Mon, 10 May 2021 05:52:23 -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=Buwf6goR; 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 S1349744AbhEJMuA (ORCPT + 99 others); Mon, 10 May 2021 08:50:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:44360 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243629AbhEJL4o (ORCPT ); Mon, 10 May 2021 07:56:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 84746613C9; Mon, 10 May 2021 11:55:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620647740; bh=ntF6ZVYYbcXM4UJ6U6+wFH2fXLxfV8Yn/5JKdRYUlEU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Buwf6goRzyfiR2jWmeeR/CGXDPncmLHaXVB6cHphTfvwCvFi6k6LFXqwIAG8x6+Xa QZ/Iacn5VPREXSkf++3Cke3Nae0/mQgAsx6WS30DgCwPt/5HL7VkMXJgkE8nfcwzFv IfE4nRenpxwXPdSqKZbMrzipqoingMNBJjOOzQ2Y= 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.11 080/342] kselftest/arm64: mte: Fix compilation with native compiler Date: Mon, 10 May 2021 12:17:50 +0200 Message-Id: <20210510102012.765270676@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510102010.096403571@linuxfoundation.org> References: <20210510102010.096403571@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 0b3af552632a..df15d44aeb8d 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