All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] perf build: Gracefully fail the build if BUILD_BPF_SKEL=1 is specified and clang isn't available
@ 2023-05-09 18:50 arnaldo.melo
  2023-05-09 19:52 ` Namhyung Kim
  0 siblings, 1 reply; 2+ messages in thread
From: arnaldo.melo @ 2023-05-09 18:50 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Adrian Hunter, Andrii Nakryiko, Ian Rogers, Ingo Molnar,
	Jiri Olsa, Song Liu, Yang Jihong, Linux Kernel Mailing List,
	linux-perf-users

Namhyung,

	The one you acked disabled the build and emitted a warning, but
then that was when we were trying to have BUILD_BPF_SKEL=1 as default,
this one is for the current situation, where we need to explicitely ask
for those features by explicitely adding BUILD_BPF_SKEL=1 to the make
command line, I think I can keep your Acked-by, right?

- Arnaldo

---

Build BPF skels require having a compiler able to generate BPF bytecode,
and so far this is only possible with clang, so check for its
availability and fail the build when the user explicitely ask for BPF
skels to be built.

Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>,
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Song Liu <songliubraving@meta.com>
Cc: Yang Jihong <yangjihong1@huawei.com>,
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Makefile.config | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 4884520f954f4b2a..70268442f7eeca50 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -216,6 +216,12 @@ ifeq ($(call get-executable,$(BISON)),)
   dummy := $(error Error: $(BISON) is missing on this system, please install it)
 endif
 
+ifeq ($(BUILD_BPF_SKEL),1)
+  ifeq ($(call get-executable,$(CLANG)),)
+    dummy := $(error $(CLANG) is missing on this system, please install it to be able to build with BUILD_BPF_SKEL=1)
+  endif
+endif
+
 ifneq ($(OUTPUT),)
   ifeq ($(shell expr $(shell $(BISON) --version | grep bison | sed -e 's/.\+ \([0-9]\+\).\([0-9]\+\).\([0-9]\+\)/\1\2\3/g') \>\= 371), 1)
     BISON_FILE_PREFIX_MAP := --file-prefix-map=$(OUTPUT)=
-- 
2.39.2


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

* Re: [PATCH 1/1] perf build: Gracefully fail the build if BUILD_BPF_SKEL=1 is specified and clang isn't available
  2023-05-09 18:50 [PATCH 1/1] perf build: Gracefully fail the build if BUILD_BPF_SKEL=1 is specified and clang isn't available arnaldo.melo
@ 2023-05-09 19:52 ` Namhyung Kim
  0 siblings, 0 replies; 2+ messages in thread
From: Namhyung Kim @ 2023-05-09 19:52 UTC (permalink / raw)
  To: arnaldo.melo
  Cc: Adrian Hunter, Andrii Nakryiko, Ian Rogers, Ingo Molnar,
	Jiri Olsa, Song Liu, Yang Jihong, Linux Kernel Mailing List,
	linux-perf-users

Hi Arnaldo,

On Tue, May 9, 2023 at 11:54 AM <arnaldo.melo@gmail.com> wrote:
>
> Namhyung,
>
>         The one you acked disabled the build and emitted a warning, but
> then that was when we were trying to have BUILD_BPF_SKEL=1 as default,
> this one is for the current situation, where we need to explicitely ask
> for those features by explicitely adding BUILD_BPF_SKEL=1 to the make
> command line, I think I can keep your Acked-by, right?

Sure thing!

Thanks,
Namhyung


> ---
>
> Build BPF skels require having a compiler able to generate BPF bytecode,
> and so far this is only possible with clang, so check for its
> availability and fail the build when the user explicitely ask for BPF
> skels to be built.
>
> Acked-by: Namhyung Kim <namhyung@kernel.org>
> Cc: Adrian Hunter <adrian.hunter@intel.com>
> Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>,
> Cc: Ian Rogers <irogers@google.com>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Song Liu <songliubraving@meta.com>
> Cc: Yang Jihong <yangjihong1@huawei.com>,
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> ---
>  tools/perf/Makefile.config | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> index 4884520f954f4b2a..70268442f7eeca50 100644
> --- a/tools/perf/Makefile.config
> +++ b/tools/perf/Makefile.config
> @@ -216,6 +216,12 @@ ifeq ($(call get-executable,$(BISON)),)
>    dummy := $(error Error: $(BISON) is missing on this system, please install it)
>  endif
>
> +ifeq ($(BUILD_BPF_SKEL),1)
> +  ifeq ($(call get-executable,$(CLANG)),)
> +    dummy := $(error $(CLANG) is missing on this system, please install it to be able to build with BUILD_BPF_SKEL=1)
> +  endif
> +endif
> +
>  ifneq ($(OUTPUT),)
>    ifeq ($(shell expr $(shell $(BISON) --version | grep bison | sed -e 's/.\+ \([0-9]\+\).\([0-9]\+\).\([0-9]\+\)/\1\2\3/g') \>\= 371), 1)
>      BISON_FILE_PREFIX_MAP := --file-prefix-map=$(OUTPUT)=
> --
> 2.39.2
>

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

end of thread, other threads:[~2023-05-09 19:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-09 18:50 [PATCH 1/1] perf build: Gracefully fail the build if BUILD_BPF_SKEL=1 is specified and clang isn't available arnaldo.melo
2023-05-09 19:52 ` Namhyung Kim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.