Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp641781rdb; Thu, 19 Oct 2023 15:01:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGV7KqSOyN1TgCsMT3q7cxwD/9JFp5+dZKqki+1jIn/au9pcppAFR1AxavlQevHZGZ9Klk9 X-Received: by 2002:a17:902:f686:b0:1c8:7489:56e2 with SMTP id l6-20020a170902f68600b001c8748956e2mr170183plg.35.1697752909293; Thu, 19 Oct 2023 15:01:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697752909; cv=none; d=google.com; s=arc-20160816; b=xdt47h2kVsMyT2h4dRX3899F7zxID2B34B4bLsEVaUSwkUF/Xd3wuszbWOvexHuyug 6n9TvcKJw4aWwRqeYQu0EmJj+vZdoMmFguN05X95HtrryQoMBAZZ5/Kd85ulhpS6tGAZ v5iDwVKW/1sBA247jY2z8Yip3RQg/qNbXkq2LPiIxDhckjhbJN7wOU+Lh1g29IBx+J6Q VlQ8l+T1nH82XQ4DZP8dA1StZ+zuSXGop+FII2TA9Pr9p+nJe9ryI7ZEae7aaDqNar44 PWpLEjX9djLa55AW0dLPLze9IYegbU33hKRcmkF7dkM5+t9j6qWmWcXk7B7jzynXyIcA AHhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=RVH7g5Xn7KERhNbwCPYA3chPVbA58wuAlRpGYKpj+Ag=; fh=Iy+FjAo3gwc3JSpnDCmU7RxqRecWqBtyzQGwo7oILsQ=; b=aQicDEGXAG171YYJXZtw4wu73SX9C4qZWu5TdUFZu7H/NrzEfjU8Qg2zJAgzCCxk3v U+6cLfqj0UCs9gD/xXgy0qJWXPpD7E8xp3VwB0O1NYXvWyO6DofAJS94Qf8B9QE194mV AT5xIcCJls/8z+IIob3CkcPxtztWW/8zp7ubA+fDcWZdpOZ278DneOmaa9fviXqxmXiC +JH9kh6GT3NvPjX7X3+55t5/WPOlAsswi0KlOaiETRO2o418Yow1rxVDW+Xddp+EBvgI JftW1hi8/hUT9ZHkGJg5UsJv+LgqClCQVEC0qPmXNhFKL47PciBrXaOa7BPj8YMruq4p Te4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@isovalent.com header.s=google header.b=dM8DfLrQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=isovalent.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id g19-20020a170902869300b001c9b172c35fsi375621plo.40.2023.10.19.15.01.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 15:01:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@isovalent.com header.s=google header.b=dM8DfLrQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=isovalent.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id C0D55833E1EB; Thu, 19 Oct 2023 15:01:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346610AbjJSWBj (ORCPT + 99 others); Thu, 19 Oct 2023 18:01:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345256AbjJSWBh (ORCPT ); Thu, 19 Oct 2023 18:01:37 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B69BC112 for ; Thu, 19 Oct 2023 15:01:34 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-507cee17b00so178601e87.2 for ; Thu, 19 Oct 2023 15:01:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=isovalent.com; s=google; t=1697752893; x=1698357693; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=RVH7g5Xn7KERhNbwCPYA3chPVbA58wuAlRpGYKpj+Ag=; b=dM8DfLrQRsUlwILnQznK2dZd+bBw2FtHHDC/J5Pc/0SXxpdv2h0eg/Z0buMdSSyCz4 KxUSKjsXNFqOJ6JAAvwwIueelMMRmunjcM1WEUGyHOzWsotdopnCl45VXg8gPv9lsKts DicbsMGt/obSa6o/vpKZ5du0KSqpzFY/1ruetv4sJX7Z1iiNAzbOhn5NWb7Kf85mZjpV CTTFFBSBYgsoe691WM8H+0fKS+IHoiAZOg3KY6uoRCvCo5uQ6g4NNz9OOqGtZu0nUTaD 3iO6BsvlkQScJkbch9ec8sBvPdwM+xziFmDsX/1ZhYH9h7eCmIejZiJ7AeS03JbChj/v VeKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697752893; x=1698357693; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RVH7g5Xn7KERhNbwCPYA3chPVbA58wuAlRpGYKpj+Ag=; b=QcKHPxEaacpvbiagQ3zsaraOUDpTgh75Md9yeis3OI5sVSAz1edkT384i9fVy9xSNc tKbFhcu3TMZ/VHwcS36yOvI76g5nnCfGCO+wDhmtTEbg6eiAWLVWP5lWM3lfeoNomNpK FvoszyaunofyCxFtNQNLGscW5zRMud8CsaS1gWXLRAU55e8G5WSLOINPwcbKlUupj3w9 qajLyXiuduHUw+AZ2ufyYfz10LxcXU2rd+I7Q2i+7ESoITncS89myJ6rEgLYK+AjIX6i HIuVMBG+AebYQRCreExtoAgQZFAmc3DI6Usei9eXeavFNO2i9yUBFnSQ2FeoNqLjjVHP LhKA== X-Gm-Message-State: AOJu0Yx5ZV0wDpOqzbKHzOJVNzp2XXck/455FI0aztqmDxbngmF8G/LD Fnb1+HkUf7vZ4sNiPTaUpiUBgQ== X-Received: by 2002:ac2:488e:0:b0:503:b65:5d95 with SMTP id x14-20020ac2488e000000b005030b655d95mr5431lfc.6.1697752892966; Thu, 19 Oct 2023 15:01:32 -0700 (PDT) Received: from ?IPV6:2a02:8011:e80c:0:a8cd:a90a:ba21:5ae1? ([2a02:8011:e80c:0:a8cd:a90a:ba21:5ae1]) by smtp.gmail.com with ESMTPSA id g11-20020adffc8b000000b0032dc24ae625sm289631wrr.12.2023.10.19.15.01.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Oct 2023 15:01:32 -0700 (PDT) Message-ID: Date: Thu, 19 Oct 2023 23:01:30 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/1] tools build: Fix llvm feature detection, still used by bpftool Content-Language: en-GB To: Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org, Manu Bretelle Cc: 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 , 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 References: From: Quentin Monnet In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 morse.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 (morse.vger.email [0.0.0.0]); Thu, 19 Oct 2023 15:01:46 -0700 (PDT) On 19/10/2023 22:17, 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; > +} Acked-by: Quentin Monnet Thanks Arnaldo, Manu!