Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp664337rdb; Thu, 19 Oct 2023 15:54:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHS5O8X5sf0FPnMdCLzq+raGGFHXdnvt1Nqbm4f0f+9fCHD+YkGRPsgkaYxp562rmYXSQsk X-Received: by 2002:a05:6870:28d:b0:1e9:e605:279b with SMTP id q13-20020a056870028d00b001e9e605279bmr329621oaf.19.1697756063524; Thu, 19 Oct 2023 15:54:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697756063; cv=none; d=google.com; s=arc-20160816; b=jd5S2frIWPXKMAW1HHGrOqMj7g6yrV9Ykc608ayiz4inRN7RhpWRq56Tug/ukwnGvm YQJMBeP+t6NoIQAzWF5H7NTVsKmrxoHsvYTKiTTrdEtryZhFgXQ4mCqVUQTAqi7kmOCX vdRUl/x4OyzmqZIBt0VHkQ4L3H4HcuA5VrXVLTgmXbCNm/HHjVR2bQb++2FETwsKUyfE OFoXCVsPNbmri1xnu4JSRRWCXzLUhXhd133gOozfuEXE4j775tqKg5jV97Uevbok7sBS qSnFSMa+NsaaN5PTg+MPcvTWuV0Lml9ojgOraZ2HcfLltt8z5M9zwwCwSTYr7nRHtLik ITwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=znKTjYCMK7qVlPe1x85VLsQxhjgS/CN/1N2ibCS0Pek=; fh=t6bWbSQxf5zSOdh8ZDAodS0NcAJEAGpNnGnmUfl+mqU=; b=mkZHOdeHEatDLKdp4iOuRvUkiqQ2RY9MJGYrMwmVY3LM2PZtNzs4UPa9N6jkkqH31q EwLM9PehIJHDDVGIsql+q5MVlBNEGE05RxAenU37ZnVc2wJxKMjo/3Vpof/FcURxF/aH vZL5j1cg4tljSiHCXO4zBLeHWM9GjYPCK0aA2UoJY9A4at0iH7ueSfz+SfA8HKa8K5b9 4CdXup9j96TJoirg3EHbZrzKP9pouxXsNk3dJ74k6EkTxEO49ibW2JzV2Y7cPucKwxKi e2brJ/D4FbRcUM8jRJBEBg6yFRXUUCajGGGmgvOUmxYJFVMuIKVHOW7tFA1DaC824GH+ 04ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="ToZ/deRv"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id 128-20020a630286000000b005b56de1fd82si543087pgc.272.2023.10.19.15.54.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 15:54:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="ToZ/deRv"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 26063823CEB7; Thu, 19 Oct 2023 15:54:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346702AbjJSWyS (ORCPT + 99 others); Thu, 19 Oct 2023 18:54:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346697AbjJSWyR (ORCPT ); Thu, 19 Oct 2023 18:54:17 -0400 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 979C498; Thu, 19 Oct 2023 15:54:15 -0700 (PDT) Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-53d9f001b35so198164a12.2; Thu, 19 Oct 2023 15:54:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697756054; x=1698360854; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=znKTjYCMK7qVlPe1x85VLsQxhjgS/CN/1N2ibCS0Pek=; b=ToZ/deRvOJgo7YWy09hdxkSvDUdtiNPE6yGKf7IsAh+Ao+YfgXFcKBx3vB2x8xEf+l YhNeZZPft61eii3LD7CFV7oSTZkkdtq/X4tGQDLBGVrSLt3D6JhdXugX+vFGQuIZLp3Y 9D9YsNX5QEGjPikAayXcSJxKR8AJxy55WFfZoJ2dbJLtd6bHxSCpreRNjOcRqpRaeH9f 08XdooA+mY0lmstpvCssiEJg36IUZgWzp4Yqmmf5Gm0xnCK1rBqLM4JDLx7PmxOkBSPH WT763tl1DP3/PsGKWuUw8D6owr9jLft3swwOoTidcw69I3p+jWbj97bfe1hG5JwZuvMY NdEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697756054; x=1698360854; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=znKTjYCMK7qVlPe1x85VLsQxhjgS/CN/1N2ibCS0Pek=; b=nypuCifFDmRzA6zPalA3OAYXGHISLv7FBFlWH3rjIQCkm2cUcWnyZ3CpSMPt5Yz2Qz GNrHiHpDpOoJmsstts2lOj9eOw90Q3UN4QWBmuZlK5ykj1USeuQjp2NLLtv7R10fIlZi MkO3+kdpRJiiXDRFwcyeZ1nWV8SuTL0+bx/KGpT1tIg9y9UmS7WsHk/kMUPqmshgUwvo cux3kdEwpoEiQddCpRlHd227VOWKh90GMEiUc50sAvPMMq0KEUHEP35MGw595qaFr+4E hjcuam9yIYIUB57yYdWrgH8WrwY2P/rOZmkQYBQfFjZDx0HTB79B72Stpr8AlBSaHSDG +xjA== X-Gm-Message-State: AOJu0YxvBHX5I3Efyunu6QBQvk2g9ATmNtmSAM6tJ7dO68/n71XOEeo2 6ecgchJKpXWjTQYJWNHc0Y2dlLtzFVFT3zSpl73I19lp X-Received: by 2002:ac2:5470:0:b0:500:a6c1:36f7 with SMTP id e16-20020ac25470000000b00500a6c136f7mr73421lfn.3.1697755649162; Thu, 19 Oct 2023 15:47:29 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Andrii Nakryiko Date: Thu, 19 Oct 2023 15:47:17 -0700 Message-ID: Subject: Re: [PATCH 1/1] tools build: Fix llvm feature detection, still used by bpftool To: Arnaldo Carvalho de Melo Cc: linux-kernel@vger.kernel.org, Manu Bretelle , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Thu, 19 Oct 2023 15:54:22 -0700 (PDT) On Thu, Oct 19, 2023 at 2:17=E2=80=AFPM 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 fo= r compiling BPF events (-e foo.c)") Should we route this through the bpf-next tree to get the fix for bpftool into Github mirror ASAP? > 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; > +} > -- > 2.41.0 >