[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y5/hqqIwJIjdBSRh@leoy-yangtze.lan>
Date: Mon, 19 Dec 2022 11:59:38 +0800
From: Leo Yan <leo.yan@...aro.org>
To: Changbin Du <changbin.du@...il.com>
Cc: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Quentin Monnet <quentin@...valent.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Shuah Khan <shuah@...nel.org>,
Martin KaFai Lau <martin.lau@...ux.dev>,
Song Liu <song@...nel.org>, Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>,
Stanislav Fomichev <sdf@...gle.com>,
Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
bpf@...r.kernel.org, linux-kernel@...r.kernel.org,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Namhyung Kim <namhyung@...nel.org>,
Mykola Lysenko <mykolal@...com>,
linux-perf-users@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v3 2/2] bpf: makefiles: do not generate empty vmlinux.h
On Sun, Dec 18, 2022 at 06:35:09AM +0800, Changbin Du wrote:
> Remove the empty vmlinux.h if bpftool failed to dump btf info.
> The empty vmlinux.h can hide real error when reading output
> of make.
>
> This is done by adding .DELETE_ON_ERROR special target in related
> makefiles.
We need to handle the same case for perf building, its makefile
linux/tools/perf/Makefile.perf also uses bpftool to generate
vmlinux.h, see:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/perf/Makefile.perf#n1067
Please consider to use a separate patch to add the same change in
Makefile.perf?
Thanks,
Leo
> Signed-off-by: Changbin Du <changbin.du@...il.com>
> ---
> tools/bpf/bpftool/Makefile | 3 +++
> tools/testing/selftests/bpf/Makefile | 3 +++
> 2 files changed, 6 insertions(+)
>
> diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile
> index 787b857d3fb5..313fd1b09189 100644
> --- a/tools/bpf/bpftool/Makefile
> +++ b/tools/bpf/bpftool/Makefile
> @@ -289,3 +289,6 @@ FORCE:
> .PHONY: all FORCE bootstrap clean install-bin install uninstall
> .PHONY: doc doc-clean doc-install doc-uninstall
> .DEFAULT_GOAL := all
> +
> +# Delete partially updated (corrupted) files on error
> +.DELETE_ON_ERROR:
> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> index c22c43bbee19..205e8c3c346a 100644
> --- a/tools/testing/selftests/bpf/Makefile
> +++ b/tools/testing/selftests/bpf/Makefile
> @@ -626,3 +626,6 @@ EXTRA_CLEAN := $(TEST_CUSTOM_PROGS) $(SCRATCH_DIR) $(HOST_SCRATCH_DIR) \
> liburandom_read.so)
>
> .PHONY: docs docs-clean
> +
> +# Delete partially updated (corrupted) files on error
> +.DELETE_ON_ERROR:
> --
> 2.37.2
>
Powered by blists - more mailing lists