summaryrefslogtreecommitdiffstats
path: root/samples/bpf
diff options
context:
space:
mode:
authorIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>2019-10-11 02:28:06 +0200
committerAlexei Starovoitov <ast@kernel.org>2019-10-13 01:08:59 +0200
commitd8ceae91e9f031232d225a7159cca36e9eefdf85 (patch)
treeb384b952bd82b41ce3296637d6a42870fc7f7b5b /samples/bpf
parentlibbpf: Add C/LDFLAGS to libbpf.so and test_libpf targets (diff)
downloadlinux-d8ceae91e9f031232d225a7159cca36e9eefdf85.tar.xz
linux-d8ceae91e9f031232d225a7159cca36e9eefdf85.zip
samples/bpf: Provide C/LDFLAGS to libbpf
In order to build lib using C/LD flags of target arch, provide them to libbpf make. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20191011002808.28206-14-ivan.khoronzhuk@linaro.org
Diffstat (limited to 'samples/bpf')
-rw-r--r--samples/bpf/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index a6c33496e8ca..6b161326ac67 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -248,7 +248,8 @@ clean:
$(LIBBPF): FORCE
# Fix up variables inherited from Kbuild that tools/ build system won't like
- $(MAKE) -C $(dir $@) RM='rm -rf' LDFLAGS= srctree=$(BPF_SAMPLES_PATH)/../../ O=
+ $(MAKE) -C $(dir $@) RM='rm -rf' EXTRA_CFLAGS="$(TPROGS_CFLAGS)" \
+ LDFLAGS=$(TPROGS_LDFLAGS) srctree=$(BPF_SAMPLES_PATH)/../../ O=
$(obj)/syscall_nrs.h: $(obj)/syscall_nrs.s FORCE
$(call filechk,offsets,__SYSCALL_NRS_H__)