summaryrefslogtreecommitdiffstats
path: root/tools/bpf
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2018-10-08 10:22:58 +0200
committerDaniel Borkmann <daniel@iogearbox.net>2018-10-11 10:24:52 +0200
commit0ef6bf39f09832866fd581cbafafbad9b2469eb3 (patch)
tree0615aecf7723236f74058d752eaee30e8e2312b8 /tools/bpf
parent438363c0feb831ac3f66646939b3833362750d94 (diff)
downloadlinux-0ef6bf39f09832866fd581cbafafbad9b2469eb3.tar.bz2
bpftool: Allow to add compiler flags via EXTRA_CFLAGS variable
Adding EXTRA_CFLAGS allowing user to specify extra flags for CFLAGS variable. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Acked-by: Song Liu <songliubraving@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/bpf')
-rw-r--r--tools/bpf/bpftool/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile
index 74288a2197ab..5bfa07e3f2f7 100644
--- a/tools/bpf/bpftool/Makefile
+++ b/tools/bpf/bpftool/Makefile
@@ -46,6 +46,10 @@ CFLAGS += -DPACKAGE='"bpftool"' -D__EXPORTED_HEADERS__ \
-I$(srctree)/tools/lib/bpf \
-I$(srctree)/tools/perf
CFLAGS += -DBPFTOOL_VERSION='"$(BPFTOOL_VERSION)"'
+ifneq ($(EXTRA_CFLAGS),)
+CFLAGS += $(EXTRA_CFLAGS)
+endif
+
LIBS = -lelf -lbfd -lopcodes $(LIBBPF)
INSTALL ?= install