From a36cd45937e6a8b1f764d169fd870a0eb4bc323a Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Wed, 24 Aug 2022 11:20:26 +0800 Subject: [PATCH] tools/bpftool: Add -Wall when building BPF programs mainline inclusion from mainline-5.12-rc1 commit bade5c554f1ac70a50cefe96517957629dbc0d8f category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5EUVD CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bade5c554f1ac70a50cefe96517957629dbc0d8f ------------------------------------------------- No additional warnings are generated by enabling this, but having it enabled will help avoid regressions. Signed-off-by: Ian Rogers Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210113223609.3358812-2-irogers@google.com (cherry picked from commit bade5c554f1ac70a50cefe96517957629dbc0d8f) Signed-off-by: Wang Yufen --- tools/bpf/bpftool/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile index ea6704f027e3..752d3e97e077 100644 --- a/tools/bpf/bpftool/Makefile +++ b/tools/bpf/bpftool/Makefile @@ -165,7 +165,7 @@ $(OUTPUT)%.bpf.o: skeleton/%.bpf.c $(OUTPUT)vmlinux.h $(LIBBPF) -I$(srctree)/tools/include/uapi/ \ -I$(LIBBPF_PATH) \ -I$(srctree)/tools/lib \ - -g -O2 -target bpf -c $< -o $@ && $(LLVM_STRIP) -g $@ + -g -O2 -Wall -target bpf -c $< -o $@ && $(LLVM_STRIP) -g $@ $(OUTPUT)%.skel.h: $(OUTPUT)%.bpf.o $(BPFTOOL_BOOTSTRAP) $(QUIET_GEN)$(BPFTOOL_BOOTSTRAP) gen skeleton $< > $@ -- GitLab