From: Jiri Olsa Date: Mon, 8 Oct 2018 08:22:58 +0000 (+0200) Subject: bpftool: Allow to add compiler flags via EXTRA_CFLAGS variable X-Git-Tag: microblaze-v5.0-rc1~24^2~59^2~9 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=0ef6bf39f09832866fd581cbafafbad9b2469eb3;p=linux-2.6-microblaze.git 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 Acked-by: Song Liu Signed-off-by: Daniel Borkmann --- 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