Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp663676rdb; Thu, 19 Oct 2023 15:52:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFHH2hgePbCkjA8NbiE1+MQC3fVDeg7VWbN+yDpbDI+5EW6S0g0Jsb9zLJdFFU8yqKDyNlB X-Received: by 2002:a17:902:f689:b0:1ca:4e1a:a47d with SMTP id l9-20020a170902f68900b001ca4e1aa47dmr312258plg.42.1697755952454; Thu, 19 Oct 2023 15:52:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697755952; cv=none; d=google.com; s=arc-20160816; b=jKvzVrKXSfHLvnmgpaEsf2dF94js2XvHtKFcyUBv2331xwa5Rgb4KP1ZpR44wtRHOk fEq28J7Yn7k68PQYdxmAX/P973L0COjD4fO/SM2JNF5bmPRl6c7fgEERxLorMTl77p2v b3dHPY2WBeaRB8wOlI+bZJ9uYIfOLA3qSaYSweEtARouHNDQlupUtMqVFGOFr4jHDLm/ mC3pRf2dwyizHrlam9X9KwL8IbrTd11YweCm+o4z/bK7XLE5VOgQZW+VkKXBezV5px/r XHI3WgWXq3whxSFPCn6PBV2CXKDqwV6AKS3fqYgH40gTm+CfXDGqFvojPGWoRxuwiamV f85A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Gw+NhNs7Kd8Sn7Jgw+a43o7ZL5jXRR/xNu8rKmPPZ40=; fh=Or5mOXNk1UM0oAoHJAf8wSxMnt9GlDvzRtR6DYpGHmE=; b=JKSiaLZQAST27AyNirECJEuL5c+lUFCMrA4rh04NokuuK08rPo19TKJ6FUiH9045lK F7GXbvqlipBKEZxg6fx3LT3yTefAnJc1LY5vUywZRCrIzj0Y6VZe8RGclwNHupw8FYn+ fmtc0IZyjW1TuINVaMdf4a3mg/W41fYllYLXPt3J9FJq6sSkbpTqBr/Ejx+IkrK5qsd8 KiP91ezBIMLhus1MdOlYkZz8L1kd4IOT7av6kZ1s8WVkLp/BuUIJTDkkeoo40HyExZgA MtPsUXWG/4EGPg+t2CHFGpWMsC1qJ+27pPtlgl5HVboue4Pu4UaH5Vv11tpG9FI2xg9G 4Hgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=cqUlDcOn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id u14-20020a170902e5ce00b001c07bac13d0si498328plf.383.2023.10.19.15.52.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 15:52:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=cqUlDcOn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id C7E3480C3463; Thu, 19 Oct 2023 15:52:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233362AbjJSWwW (ORCPT + 99 others); Thu, 19 Oct 2023 18:52:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233313AbjJSWwV (ORCPT ); Thu, 19 Oct 2023 18:52:21 -0400 Received: from mail-oo1-xc2b.google.com (mail-oo1-xc2b.google.com [IPv6:2607:f8b0:4864:20::c2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBD3298; Thu, 19 Oct 2023 15:52:19 -0700 (PDT) Received: by mail-oo1-xc2b.google.com with SMTP id 006d021491bc7-57ad95c555eso115883eaf.3; Thu, 19 Oct 2023 15:52:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697755939; x=1698360739; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Gw+NhNs7Kd8Sn7Jgw+a43o7ZL5jXRR/xNu8rKmPPZ40=; b=cqUlDcOn8B2qnMUm367lem/JMGujVIYophyIKNq4aMiXtD9SllwQvbetUbydstn//8 ufOcYr7Q6jGEB1uFhd6xR/RilEZGFKExrP+XabRSdG/v0KRLY7OQoDRk3K0TVsLtEsgC pir6osLTnzboHD8z37Ih0WNL/OjzI6wGwmvwtmieNFZ2P0amKhKOhfdNAbbmYQJvJwh4 QRqOzVF0xvO3q7C4NZVwggTEtJinGXcUPmyNytBqrVrMl39DGMNGu7gNUVojaYjA4QZG 2oFE8bjTV9SyxxCt6LdvvYzcdd4OVk+gJe2ySANO/8CZnVG9AZNhYQcVj5LFT4zCDFym Uqgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697755939; x=1698360739; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Gw+NhNs7Kd8Sn7Jgw+a43o7ZL5jXRR/xNu8rKmPPZ40=; b=vG40LavUgaRsEZq88dlRznRPSkgk/EfTgieDjRjJbjWycsHFP5GLsyUwBWHOGRVdeE n6A9mzhcf6b0EdUk8LT8etvCLo85EvqT8ouFOZZYP6I2I6uGR+2hBfEPJCU3mOBTIC1K I+tfwqv4XRtMWrvufsidyzCsxFdvbFAZeSC15Hge3RY5csyYBb5jIwdkxb+dngs/94cP 13QQ+tzt7R4rToZw7Pq27fBb4mv+LPwPAGHH0PD5MgRsVO4CtluH8vELz8hoSGukEU46 fzMN5rM9P3ednzmgMSS2a0SxSW1gc8hIQYRf/hJy93rEfyu8Lrx3v9Rx0sdZFY758fvC bHJg== X-Gm-Message-State: AOJu0YxHBDqIa7hmwCEjdBIPcPwrtlKfs1Qvvc5t8BXQeTzfr21xzSIu aWZvwpiUkrDU1O6LMzLRlzg= X-Received: by 2002:a05:6358:724e:b0:166:dc89:8c92 with SMTP id i14-20020a056358724e00b00166dc898c92mr108490rwa.26.1697755938799; Thu, 19 Oct 2023 15:52:18 -0700 (PDT) Received: from surya ([2600:1700:3ec2:2011:b14a:c750:3938:f592]) by smtp.gmail.com with ESMTPSA id x26-20020aa79ada000000b006be5af77f06sm289689pfp.2.2023.10.19.15.52.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 15:52:18 -0700 (PDT) Date: Thu, 19 Oct 2023 15:52:15 -0700 From: Manu Bretelle To: Arnaldo Carvalho de Melo Cc: linux-kernel@vger.kernel.org, Adrian Hunter , Alexander Shishkin , Andi Kleen , Andrii Nakryiko , Anshuman Khandual , Carsten Haitzler , Eduard Zingerman , Fangrui Song , He Kuang , Ian Rogers , Ingo Molnar , James Clark , Jiri Olsa , Kan Liang , Leo Yan , llvm@lists.linux.dev, Madhavan Srinivasan , Mark Rutland , Namhyung Kim , Nathan Chancellor , "Naveen N. Rao" , Nick Desaulniers , Peter Zijlstra , Quentin Monnet , Ravi Bangoria , Rob Herring , Tiezhu Yang , Tom Rix , Wang Nan , Wang ShaoBo , Yang Jihong , Yonghong Song , YueHaibing , linux-perf-users@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [PATCH 1/1] tools build: Fix llvm feature detection, still used by bpftool Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 19 Oct 2023 15:52:30 -0700 (PDT) On Thu, Oct 19, 2023 at 06:17:37PM -0300, Arnaldo Carvalho de Melo wrote: > When removing the BPF event for perf a feature test that checks if the > llvm devel files are availabe was removed but that is also used by > bpftool. > > bpftool uses it to decide what kind of disassembly it will use: llvm or > binutils based. > > Removing the tools/build/feature/test-llvm.cpp file made bpftool to > always fallback to binutils disassembly, even with the llvm devel files > installed, fix it by restoring just that small test-llvm.cpp test file. > > Fixes: 56b11a2126bf2f42 ("perf bpf: Remove support for embedding clang for compiling BPF events (-e foo.c)") > Reported-by: Manu Bretelle > Cc: Adrian Hunter > Cc: Alexander Shishkin > Cc: Andi Kleen > Cc: Andrii Nakryiko > Cc: Anshuman Khandual > Cc: Carsten Haitzler > Cc: Eduard Zingerman > Cc: Fangrui Song > Cc: He Kuang > Cc: Ian Rogers > Cc: Ingo Molnar > Cc: James Clark > Cc: Jiri Olsa > Cc: Kan Liang > Cc: Leo Yan > Cc: llvm@lists.linux.dev > Cc: Madhavan Srinivasan > Cc: Mark Rutland > Cc: Namhyung Kim > Cc: Nathan Chancellor > Cc: Naveen N. Rao > Cc: Nick Desaulniers > Cc: Peter Zijlstra > Cc: Quentin Monnet > Cc: Ravi Bangoria > Cc: Rob Herring > Cc: Tiezhu Yang > Cc: Tom Rix > Cc: Wang Nan > Cc: Wang ShaoBo > Cc: Yang Jihong > Cc: Yonghong Song > Cc: YueHaibing > Link: https://lore.kernel.org/lkml/ZTGa0Ukt7QyxWcVy@kernel.org > Signed-off-by: Arnaldo Carvalho de Melo > --- > tools/build/feature/test-llvm.cpp | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > create mode 100644 tools/build/feature/test-llvm.cpp > > diff --git a/tools/build/feature/test-llvm.cpp b/tools/build/feature/test-llvm.cpp > new file mode 100644 > index 0000000000000000..88a3d1bdd9f6978e > --- /dev/null > +++ b/tools/build/feature/test-llvm.cpp > @@ -0,0 +1,14 @@ > +// SPDX-License-Identifier: GPL-2.0 > +#include "llvm/Support/ManagedStatic.h" > +#include "llvm/Support/raw_ostream.h" > +#define NUM_VERSION (((LLVM_VERSION_MAJOR) << 16) + (LLVM_VERSION_MINOR << 8) + LLVM_VERSION_PATCH) > + > +#if NUM_VERSION < 0x030900 > +# error "LLVM version too low" > +#endif > +int main() > +{ > + llvm::errs() << "Hello World!\n"; > + llvm::llvm_shutdown(); > + return 0; > +} Thanks for the quick turnaround!