summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorAndrii Nakryiko <andriin@fb.com>2020-09-29 15:06:03 -0700
committerAlexei Starovoitov <ast@kernel.org>2020-09-29 17:05:31 -0700
commit0a62291d697f1d2882650f5b9f97d331ad9a505b (patch)
treef00b382d32e443e7f1c43ad71f3ce90c23d83200 /tools/lib
parent33433913459a6bfbfa808c202d6f5490aa43d7a7 (diff)
downloadlinux-0a62291d697f1d2882650f5b9f97d331ad9a505b.tar.gz
linux-0a62291d697f1d2882650f5b9f97d331ad9a505b.tar.bz2
linux-0a62291d697f1d2882650f5b9f97d331ad9a505b.zip
libbpf: Compile libbpf under -O2 level by default and catch extra warnings
For some reason compiler doesn't complain about uninitialized variable, fixed in previous patch, if libbpf is compiled without -O2 optimization level. So do compile it with -O2 and never let similar issue slip by again. -Wall is added unconditionally, so no need to specify it again. Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Martin KaFai Lau <kafai@fb.com> Link: https://lore.kernel.org/bpf/20200929220604.833631-2-andriin@fb.com
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/bpf/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
index f43249696d9f..70cb44efe8cb 100644
--- a/tools/lib/bpf/Makefile
+++ b/tools/lib/bpf/Makefile
@@ -98,7 +98,7 @@ PC_FILE = libbpf.pc
ifdef EXTRA_CFLAGS
CFLAGS := $(EXTRA_CFLAGS)
else
- CFLAGS := -g -Wall
+ CFLAGS := -g -O2
endif
# Append required CFLAGS