Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp639825rdb; Thu, 19 Oct 2023 14:58:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEp6nR8glHqhWzYAo2ZJ5ZqNzu8X+LURXuBrzgs1HHOuJNvQXW5WR/ZJjMQZtWqTg1TsKth X-Received: by 2002:a05:6a20:6a8a:b0:15f:16f5:858e with SMTP id bi10-20020a056a206a8a00b0015f16f5858emr29263pzb.58.1697752718087; Thu, 19 Oct 2023 14:58:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697752718; cv=none; d=google.com; s=arc-20160816; b=WdtjLJmNXTYqHy2e684UvkHs3xWHjw9Z9vLllWJayWRLqbD1uaJQyKSFGtny/0C+9J vHgg+sXdr+nvOSEeKF/SpptkD9ed0aaXMWtG2CinCKrc0crhg677XbVM34i+1JfvwkGk pXykHW5d3xVyPNTst7U2DytZkr47cUZtrAdQxdJj8EOdCAp4p0eUGePGi3sI14Qr82aQ hiccoyauPXhKCfYunXNtbk1A03cL3pzdBSNXXRxIcLiCHef6lg8toTYqgRYECwiZhdSg cVfX+PdEFI2xEu2d5xB56jdK+rHtf5Up6VP6RgAsqn2DeTJmbhC4hObE7/w/jIwffX/+ W89A== 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=xwvPbEHpAjaA4Y9KWdhz2lpaz5n8xnml5PfY99zf+1c=; fh=Iv5+/5rAEUG7xF4tsubfsmDc1Fr9116IBpXRROcin4s=; b=CU2T9/HA87vc+eV5AYTPvokmkQM78yaH7ipiKuTmMXldt7Fkj5jSOAwNaSOQTUQ05k YbOg3GPPo0gw02JsKrd2efGOLR+pm5B7YcaXy0bF+GYnxDHDuk7dDsUSSIwcVbhiR+et L84t0xMBdRdECDwb7iiL/tFUzggGseZ71GvjsyqixvdIWjllGOLo1mVIRCwd0yOQXKRS uqIpRQIVYGh78KVxdz+VdwAWwaI8wrbn63+ZUCDmVNz1+SQmMTqmljI5IKM+6p6MXnme tZk88f64jEHBHwB66F+6SrM/ThrHWsooQza+7VE1CuRNcoLnbVikNIUOVaaCYMFIKXUr xOTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=ZdxM0JMA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id v12-20020a63f20c000000b0056603994af8si444679pgh.666.2023.10.19.14.58.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 14:58:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=ZdxM0JMA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 6ECBB8043012; Thu, 19 Oct 2023 14:58:34 -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 S1346608AbjJSV61 (ORCPT + 99 others); Thu, 19 Oct 2023 17:58:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235540AbjJSV60 (ORCPT ); Thu, 19 Oct 2023 17:58:26 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D4F411B for ; Thu, 19 Oct 2023 14:58:24 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-53f647c84d4so5113a12.0 for ; Thu, 19 Oct 2023 14:58:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1697752702; x=1698357502; 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=xwvPbEHpAjaA4Y9KWdhz2lpaz5n8xnml5PfY99zf+1c=; b=ZdxM0JMAgQpdkjMuDBdksj717bAUVyU8h0fC1iciL6h2EHPL/yZ/ozXZJYbRc7b40J qKjitgng6jZ/MfJ6U3zLpdg1xaJ8xTUlxe4npgRgUH2oYBX/lG6cfI/qis6vupTPYSNS TcYXmk6myP+jZnVkNRrhLw+2SbPvDSAuL4aOKDlUt+WbuaCofoRIiPlKAGJWdjv37TAd WtZ2ADCsvdVtFHmaWxG293HXGsNurE2gwTkF+gH40Smf1vhTpq7EJKFpQRh8mvw/12td kW2ghinw2IFnRC7bNwfIQUbcTe9xA+e7lTYe81kp2+BXauONeO9hbpYPzUjAqCg/re9F /wZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697752702; x=1698357502; 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=xwvPbEHpAjaA4Y9KWdhz2lpaz5n8xnml5PfY99zf+1c=; b=nhIfdfm8W2L8I+hYJAXgGhhelHFS65bm6H/GGJmttHZmd5gaCHkpFWGSEX/gX/FCaW 6wv4nvyIkGCFC06N7yu/cNXNM6EDC+I7BhwXinnKp/iCTUrpJPkBMS41IGslPvWbOAfC z45aYvQCTZYslTK02zxyC/4sNEAusZZ7fanTehRMcmfz7kC49h0OK8AP8OBKOU20oiea d0HUzhay8Ly8i4OLCArbqZovG8khz5GjyiQsfQM0a7XN8dCOxLopNYoEPrauam1X/Ct4 BUxQFIFWJj5Xwt4lcoaj+qX8tGMaXUkmtc8Itcs3EwHumBXi6zbouYEjZMsu1kqwIYWb dX4A== X-Gm-Message-State: AOJu0YxIBiDGPJXHkORZ878g2PyMkKR3CnAOOowed2TWa1hE/8t+4v5P ko9HFB06pdv3/jv98BqBkc8PKxYjTnJ7uevhzZhL2w== X-Received: by 2002:a50:d49e:0:b0:53f:90a8:2794 with SMTP id s30-20020a50d49e000000b0053f90a82794mr39158edi.0.1697752702382; Thu, 19 Oct 2023 14:58:22 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ian Rogers Date: Thu, 19 Oct 2023 14:58:10 -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 , 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=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL 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 14:58:34 -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)") > 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 Sorry for the breakage. Reviewed-by: Ian Rogers Thanks, Ian > --- > 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 >