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 AAC9BC43217 for ; Fri, 20 May 2022 21:18:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240128AbiETVSj (ORCPT ); Fri, 20 May 2022 17:18:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238039AbiETVSd (ORCPT ); Fri, 20 May 2022 17:18:33 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 992A519C752 for ; Fri, 20 May 2022 14:18:31 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id p5-20020a254205000000b0064da2110759so8159115yba.12 for ; Fri, 20 May 2022 14:18:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:message-id:mime-version:subject:from:to:cc; bh=18bwlj3FX7yKV9w1kkR962CK79p7S27hQhP4LX/pIKQ=; b=mGLUmGi7jHY+PecyF64Hh2M2xvayEJfgYAn0zfQ9IgXvts4wFfUo/cOK2a3daAlpgg Z/x0HHvPMLlPCHc9MstENKUlKWNXgfRsbiUOAaaTTp4LGCLLob8PqJE00c56hO8yBeA5 UYaUuo/kE5Q5H3FnALF4QALDGnNih0qa6kUuob34d/lJi+Ur/6bZI614pp9by3LrWZvR H1iqBas8ASIS/p9lPF1kbYol7QbDHQx11F8zRDfz8JOi/CTwHzmBV3jsYPFlrgD5u/QU z+QN4QXG7G/hJ3pPyosd8UGGfLmcfl1mee3LPkMxTAK8Ly0VQ1hBj69p/QL19CckSzlb paoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=18bwlj3FX7yKV9w1kkR962CK79p7S27hQhP4LX/pIKQ=; b=GsTFw7xSF1udc8fm1LrMF2177wDoafX5EE0mSOdNzd7wqWv/m9raV1AfLPOE2yZNEq 9oCS0p4fhatclDfuYmgBpxUW+JITaQx66yNAePMGAucUZFiTsQZJ0KfzIF/g6sO40FOq +y9UUBroW8BZBX8+rydZCV3teP5MzDs04VdoejtiwNDXzexQeKqwJbOA58741yQeOG+C kLL4JDlfHv+VQvj2OhRjTjd36aBpzEd4iHcIMzqEVSPhwFYj4ic+BhgXec+Y2Rs+l7xc x9pKdqV2dfJfBNyKyv0TebtFalOoWOYmzCMkFvbIqsyo3hllfvUpDQlkBcX1wUGbx+q8 HLUQ== X-Gm-Message-State: AOAM532jmB3DX1AEf+nW5wIHJUxXMceSAwm7tiBcEkoLj4JKyE5MB3fK 4POkAQJfJNh/D+XNgABlnpqVOkf8TI6S X-Google-Smtp-Source: ABdhPJyWt6SQJDsVNaO60kNg1MhSmmRPKx9jLE6nMqMy595GulDCVDpGbFVt14AFkHVJWwUIZVUuND4YgxJd X-Received: from irogers.svl.corp.google.com ([2620:15c:2cd:202:64b0:e751:72e8:e4a7]) (user=irogers job=sendgmr) by 2002:a25:496:0:b0:64f:59d4:dea2 with SMTP id 144-20020a250496000000b0064f59d4dea2mr5340798ybe.493.1653081510737; Fri, 20 May 2022 14:18:30 -0700 (PDT) Date: Fri, 20 May 2022 14:18:26 -0700 Message-Id: <20220520211826.1828180-1-irogers@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.36.1.124.g0e6072fb45-goog Subject: [PATCH] perf build: Error for BPF skeletons without LIBBPF From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , 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 Cc: Ian Rogers Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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