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>
This commit is contained in:
Jiri Olsa 2018-10-08 10:22:58 +02:00 committed by Daniel Borkmann
parent 438363c0fe
commit 0ef6bf39f0

View file

@ -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