summaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2019-07-15 11:11:03 +0200
committerDaniel Borkmann <daniel@iogearbox.net>2019-07-15 23:13:17 +0200
commit81f522f96f788ba978f505d5a03a039f75360b8b (patch)
tree9d37ab0d210254906f978466162a4381ca75e9d8 /samples
parentselftests/bpf: put test_stub.o into $(OUTPUT) (diff)
downloadlinux-81f522f96f788ba978f505d5a03a039f75360b8b.tar.xz
linux-81f522f96f788ba978f505d5a03a039f75360b8b.zip
samples/bpf: build with -D__TARGET_ARCH_$(SRCARCH)
While $ARCH can be relatively flexible (see Makefile and tools/scripts/Makefile.arch), $SRCARCH always corresponds to a directory name under arch/. Therefore, build samples with -D__TARGET_ARCH_$(SRCARCH), since that matches the expectations of bpf_helpers.h. Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Acked-by: Vasily Gorbik <gor@linux.ibm.com> Acked-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'samples')
-rw-r--r--samples/bpf/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index f90daadfbc89..1d9be26b4edd 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -284,7 +284,7 @@ $(obj)/%.o: $(src)/%.c
$(Q)$(CLANG) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) -I$(obj) \
-I$(srctree)/tools/testing/selftests/bpf/ \
-D__KERNEL__ -D__BPF_TRACING__ -Wno-unused-value -Wno-pointer-sign \
- -D__TARGET_ARCH_$(ARCH) -Wno-compare-distinct-pointer-types \
+ -D__TARGET_ARCH_$(SRCARCH) -Wno-compare-distinct-pointer-types \
-Wno-gnu-variable-sized-type-not-at-end \
-Wno-address-of-packed-member -Wno-tautological-compare \
-Wno-unknown-warning-option $(CLANG_ARCH_ARGS) \