From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15132C433C1 for ; Fri, 19 Mar 2021 17:31:38 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 95B746191C for ; Fri, 19 Mar 2021 17:31:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 95B746191C Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=OalespD9Owj7137qR5Ae3p8kQItE1O62WudUWLY74Wg=; b=n7QTdncBx1u1FsaEVBFLsdcBa 9T0wtDXhFBNHMpC3JVlW/jdEgHRINfRHpticuxHLR/Jsohl3LANAV/WDVr21poOMapb41Zioavr02 IOP2OoMBQ7ElYzcdrhHd/bejLUqb5c15WCGAKpPGB/Ct2f1aPnRHSP270tn9MBhJnkbj7vUZoa3Zt 5M/ureyHTyIA2Bhwu1zrN9y2hnkw83yxH0KTIK5YxjxsqSsIfnHRGooQDjaA5PpCOOMJyKzRvNDZu mIs1+XsdcUem5aGErTmvAQQz0u5/WsbWFGynWWGgCvQD+UZ2hGhd4t1eJRpTAW7Bf4rhEYPTE/3MY KD3t5dAdw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lNIwV-007qY8-MN; Fri, 19 Mar 2021 17:29:47 +0000 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lNIwR-007qWy-38 for linux-arm-kernel@lists.infradead.org; Fri, 19 Mar 2021 17:29:45 +0000 Received: by mail-lf1-x135.google.com with SMTP id q13so11181771lfu.8 for ; Fri, 19 Mar 2021 10:29:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tvHhezgm6LLrHkw6LiFzJkS2cxMTL9fEuJKrvKkiKUQ=; b=qxS40zfHoppJ4w1lAzxDUZz14akR+3ew9ZSSFoJXHxNFw1LVt1bz/DmDYKQBrI35Te eaRTyqZWelaZH0wZgpff2VPb4Ed6mjOVVxc14NXlZbFkTQpp94o+dmwpB6228UBHBwBh kL+TsgwdDnlkZR1RwFOI/uytBecNjPKS8SPVK1UytrDqn7F3FVpuEMb15EIvTucYDQqy 8gpvccbxZ9p8+YrBPogXC4G/zmqng4gzbyT78DcjLlqk/UJwfusuijmbneZywzX81xq+ WxPKJQWO4dr6l0gDDrdf9e0uJ21NvIuYU9sZLHRJdAfUSzL/A9ExU8DyvTvq1Fk0ttMj Iblw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tvHhezgm6LLrHkw6LiFzJkS2cxMTL9fEuJKrvKkiKUQ=; b=iL96UOr/6zAlm0usfaXxM7Ej57xBs/MrwS7sC0lSR+biApCYYDtW8ASJmP6xg+wbgi qzIlqjI+OR3S0Nl33RBB6wZOn2iKOVg1OyXZNYEZ91JfQagrRuV2lH/IjA0wY3Wi0+1w l2GD7WuVvqEw3xb5tYgTDxUXsZfBdZUGl+5I+e8oOKOXQ0f86z9c+tjkYz9NypAglU0v rWQrCwI3Ggyvxr1uMkcUd42ZZjdVkVxhq0MDbpuynZZsNivCFgQ+vx1i2oAHBgbEuZif cmrwwf3005fcRwG63XDEl07o4WJsnP4Co2QwDgKXeBCJ/upL5Nw2zO2cR2Y41hcXy/KU 9nVg== X-Gm-Message-State: AOAM532M0MNPcxQztpLDXxu5XFQK7GTBuLZVqkXKjw3KUasWyrdEfqms hVCFRyhgetMxlZOt1iDC3zVDjappuIHDCDjyWUNBWQ== X-Google-Smtp-Source: ABdhPJzRz1nB+l60pFJwjW9wIy+NAzMWNbWYz5dq7MRdQPPqZStIy1/duwYDcBooz6oxJMlvPl/ekDQJiugt+eiH3Iw= X-Received: by 2002:ac2:538e:: with SMTP id g14mr1375802lfh.543.1616174982034; Fri, 19 Mar 2021 10:29:42 -0700 (PDT) MIME-Version: 1.0 References: <20210319165334.29213-1-andre.przywara@arm.com> <20210319165334.29213-2-andre.przywara@arm.com> In-Reply-To: <20210319165334.29213-2-andre.przywara@arm.com> From: Nick Desaulniers Date: Fri, 19 Mar 2021 10:29:30 -0700 Message-ID: Subject: Re: [PATCH 01/11] kselftest/arm64: mte: Fix compilation with native compiler To: Andre Przywara Cc: Will Deacon , Catalin Marinas , Shuah Khan , Amit Daniel Kachhap , Mark Brown , Vincenzo Frascino , Linux ARM , "open list:KERNEL SELFTEST FRAMEWORK" , Nathan Chancellor , clang-built-linux X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210319_172943_257550_1599F0A9 X-CRM114-Status: GOOD ( 21.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Mar 19, 2021 at 9:53 AM Andre Przywara wrote: > > 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 > --- > 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.17.5 > -- Thanks, ~Nick Desaulniers _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel