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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F2C4C433EF for ; Mon, 23 May 2022 12:36:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235632AbiEWMgo (ORCPT ); Mon, 23 May 2022 08:36:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235650AbiEWMeO (ORCPT ); Mon, 23 May 2022 08:34:14 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C667542A39; Mon, 23 May 2022 05:34:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 7D134B80FF4; Mon, 23 May 2022 12:34:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0082C385AA; Mon, 23 May 2022 12:34:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653309251; bh=IqR90Auy8+tT5aBpfUUHrQsHhH/KbDi15pMJuDCIMFc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=imDXnGyIkgwwzqBvghc35XlYOcVmZcIlk/acnHhC5QP+tPXLaT8oHoiSYIRyVJiOp MjSi1ss6NJPbXhE9hGfUWHWL1MOfG4qc5LxnLDw0w4tcnmiiRYIm0IxnHgGXg+mllw he3OmR83kipEPT9BP9NqKRyXpeYO7O4IKFJr2Lh/I51p9s0ra41n1V8FoBJbsIQxpG GIOECSmMZgDGeYPkDIMXu4g7nEypp+EsvLa9+J+Ni3aqsNqq6S/LBuZGhecVcuPOW3 StAfBCcMyRNiC7BDd+arC80MCOsv832gnMGvOgz8sTqTF+rHuoqTWoAKFlyfOX7Aab TrjYb0mcY4Izg== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 02E33400B1; Mon, 23 May 2022 09:34:07 -0300 (-03) Date: Mon, 23 May 2022 09:34:07 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Ian Rogers , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Namhyung Kim , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [PATCH] perf build: Error for BPF skeletons without LIBBPF Message-ID: References: <20220520211826.1828180-1-irogers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, May 23, 2022 at 11:12:16AM +0200, Jiri Olsa escreveu: > On Fri, May 20, 2022 at 02:18:26PM -0700, Ian Rogers wrote: > > LIBBPF requires LIBELF so doing "make BUILD_BPF_SKEL=1 NO_LIBELF=1" > > fails with compiler errors about missing declarations. Similar could > > happen if libbpf feature detection fails. Prefer to error when > > BUILD_BPF_SKEL is enabled but LIBBPF isn't. > > > > Signed-off-by: Ian Rogers > > Acked-by: Jiri Olsa Thanks, applied. - Arnaldo > thanks, > jirka > > > --- > > tools/perf/Makefile.config | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config > > index d9b699ad402c..bedb734bd6f2 100644 > > --- a/tools/perf/Makefile.config > > +++ b/tools/perf/Makefile.config > > @@ -664,6 +664,9 @@ ifdef BUILD_BPF_SKEL > > ifeq ($(feature-clang-bpf-co-re), 0) > > dummy := $(error Error: clang too old/not installed. Please install recent clang to build with BUILD_BPF_SKEL) > > endif > > + ifeq ($(filter -DHAVE_LIBBPF_SUPPORT, $(CFLAGS)),) > > + dummy := $(error Error: BPF skeleton support requires libbpf) > > + endif > > $(call detected,CONFIG_PERF_BPF_SKEL) > > CFLAGS += -DHAVE_BPF_SKEL > > endif > > -- > > 2.36.1.124.g0e6072fb45-goog > > -- - Arnaldo