The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH next 1/1] perf build: Warn about missing libelf before warning about missing libbpf
@ 2023-10-31 15:34 Arnaldo Carvalho de Melo
  2023-11-02  6:04 ` Namhyung Kim
  0 siblings, 1 reply; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-10-31 15:34 UTC (permalink / raw)
  To: Linux Kernel Mailing List
  Cc: Adrian Hunter, Ian Rogers, Jiri Olsa, Namhyung Kim

As libelf is a requirement for libbpf if it is not available, as in some
container build tests where NO_LIBELF=1 is used, then better warn about
the most basic library first.

Ditto for libz, check its availability before libbpf too.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Makefile.config | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index b3e6ed10f40c6f6c..8b6cffbc485834c8 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -680,15 +680,15 @@ ifndef BUILD_BPF_SKEL
 endif
 
 ifeq ($(BUILD_BPF_SKEL),1)
-  ifeq ($(filter -DHAVE_LIBBPF_SUPPORT, $(CFLAGS)),)
-    dummy := $(warning Warning: Disabled BPF skeletons as libbpf is required)
-    BUILD_BPF_SKEL := 0
-  else ifeq ($(filter -DHAVE_LIBELF_SUPPORT, $(CFLAGS)),)
+  ifeq ($(filter -DHAVE_LIBELF_SUPPORT, $(CFLAGS)),)
     dummy := $(warning Warning: Disabled BPF skeletons as libelf is required by bpftool)
     BUILD_BPF_SKEL := 0
   else ifeq ($(filter -DHAVE_ZLIB_SUPPORT, $(CFLAGS)),)
     dummy := $(warning Warning: Disabled BPF skeletons as zlib is required by bpftool)
     BUILD_BPF_SKEL := 0
+  else ifeq ($(filter -DHAVE_LIBBPF_SUPPORT, $(CFLAGS)),)
+    dummy := $(warning Warning: Disabled BPF skeletons as libbpf is required)
+    BUILD_BPF_SKEL := 0
   else ifeq ($(call get-executable,$(CLANG)),)
     dummy := $(warning Warning: Disabled BPF skeletons as clang ($(CLANG)) is missing)
     BUILD_BPF_SKEL := 0
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH next 1/1] perf build: Warn about missing libelf before warning about missing libbpf
  2023-10-31 15:34 [PATCH next 1/1] perf build: Warn about missing libelf before warning about missing libbpf Arnaldo Carvalho de Melo
@ 2023-11-02  6:04 ` Namhyung Kim
  0 siblings, 0 replies; 2+ messages in thread
From: Namhyung Kim @ 2023-11-02  6:04 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Linux Kernel Mailing List, Adrian Hunter, Ian Rogers, Jiri Olsa

On Tue, Oct 31, 2023 at 8:34 AM Arnaldo Carvalho de Melo
<acme@kernel.org> wrote:
>
> As libelf is a requirement for libbpf if it is not available, as in some
> container build tests where NO_LIBELF=1 is used, then better warn about
> the most basic library first.
>
> Ditto for libz, check its availability before libbpf too.
>
> Cc: Adrian Hunter <adrian.hunter@intel.com>
> Cc: Ian Rogers <irogers@google.com>
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks,
Namhyung

> ---
>  tools/perf/Makefile.config | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> index b3e6ed10f40c6f6c..8b6cffbc485834c8 100644
> --- a/tools/perf/Makefile.config
> +++ b/tools/perf/Makefile.config
> @@ -680,15 +680,15 @@ ifndef BUILD_BPF_SKEL
>  endif
>
>  ifeq ($(BUILD_BPF_SKEL),1)
> -  ifeq ($(filter -DHAVE_LIBBPF_SUPPORT, $(CFLAGS)),)
> -    dummy := $(warning Warning: Disabled BPF skeletons as libbpf is required)
> -    BUILD_BPF_SKEL := 0
> -  else ifeq ($(filter -DHAVE_LIBELF_SUPPORT, $(CFLAGS)),)
> +  ifeq ($(filter -DHAVE_LIBELF_SUPPORT, $(CFLAGS)),)
>      dummy := $(warning Warning: Disabled BPF skeletons as libelf is required by bpftool)
>      BUILD_BPF_SKEL := 0
>    else ifeq ($(filter -DHAVE_ZLIB_SUPPORT, $(CFLAGS)),)
>      dummy := $(warning Warning: Disabled BPF skeletons as zlib is required by bpftool)
>      BUILD_BPF_SKEL := 0
> +  else ifeq ($(filter -DHAVE_LIBBPF_SUPPORT, $(CFLAGS)),)
> +    dummy := $(warning Warning: Disabled BPF skeletons as libbpf is required)
> +    BUILD_BPF_SKEL := 0
>    else ifeq ($(call get-executable,$(CLANG)),)
>      dummy := $(warning Warning: Disabled BPF skeletons as clang ($(CLANG)) is missing)
>      BUILD_BPF_SKEL := 0
> --
> 2.41.0
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-11-02  6:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-31 15:34 [PATCH next 1/1] perf build: Warn about missing libelf before warning about missing libbpf Arnaldo Carvalho de Melo
2023-11-02  6:04 ` Namhyung Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox