Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2556415pxj; Mon, 10 May 2021 05:52:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzA+kUhkAnAefAEWqTwJZlnMr+nDstPT0ZPD4bcM++vlOGoZX3CS0LdlUXvOn60zx006AGw X-Received: by 2002:a17:906:a20b:: with SMTP id r11mr25819717ejy.323.1620651145234; Mon, 10 May 2021 05:52:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620651145; cv=none; d=google.com; s=arc-20160816; b=TBLPkYTiqlwScLp5cmiYZJeN/QrIUjx02MObkoWvEeGpTsvRwyGt9oHWaXy6W2PiVp V0mn/TNQEaw2lKrvfEqdT57AcCWcqpN0skLbx2UD1/wDIcEnRizWjGT99oHcVadVX6SB jLc0Z+bsrvxfrpLPHxYBnVjWwHTzw/v4+onmQPJfqYiH3cuokODHWytyOTXiNJhKyjko eEa1kJJMALgRJCIS+FZ4UJEJYZm9CkYRJiDVZb1bqEPR39V8OMVXZAluoj3/nKMJZQBI ggKfGJtPC5nofTFI7yMVqXrmT0MaCsTZ7dz9m6x5ndyFX+OsTlio61/lSLvQWOxx/Bdo X45A== 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=nQnzGd+I2s5DyyE4dsl3QyEjo2NIe0M8pahBxukE/GpSHbLbLpNvrmtlSKOi7RWa07 RCFjJFl9/FqJ9tXIZPmma89hAsi9ZVlYWUlYMvgo8W+3xO/31ccFa8F9xdyd4FBHpouC XR2VUXY/6ForGUtRMdDp/g+a6ou2QMsecSM1psP+xlCszb66OlQEQRqFiGMvgDI/hUbd ZYdKnJ58+pU12QxSdxiH7xlHRoOk85uVhDQ+M+CpmBPFvoFNAXSVwY8VtRH1o3yXoAES QOaat15m/uYVz+vxiZG4mjzYFCRdzPQ5ccJoMb7fEbvcTS1Linwfey+y0fO2zcllfF4j nsww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="dFj/tiy8"; 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 k26si6737911eds.205.2021.05.10.05.52.00; Mon, 10 May 2021 05:52:25 -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="dFj/tiy8"; 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 S238483AbhEJMuZ (ORCPT + 99 others); Mon, 10 May 2021 08:50:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:44730 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243937AbhEJL5r (ORCPT ); Mon, 10 May 2021 07:57:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 40CF760FE4; Mon, 10 May 2021 11:56:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620647801; bh=ntF6ZVYYbcXM4UJ6U6+wFH2fXLxfV8Yn/5JKdRYUlEU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dFj/tiy8WuRI/MEx+QUTdew9LS1xq/HwlVljaTcWX63d/Nm18qZ8/5h06ymWZ0c7U BpXZ2douytxTSbvzKMsl1OReHfT+Vp15p70d6Vr1rH8GRFS8QyyEJ6br1+QkGgglxO UcPivMLu45nVnKPixUk8YvKp1aPpLkd7mcHHrvf0= 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.12 085/384] kselftest/arm64: mte: Fix compilation with native compiler Date: Mon, 10 May 2021 12:17:54 +0200 Message-Id: <20210510102017.691391663@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510102014.849075526@linuxfoundation.org> References: <20210510102014.849075526@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