diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2019-07-15 05:11:03 -0400 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-07-15 17:13:17 -0400 |
commit | 81f522f96f788ba978f505d5a03a039f75360b8b (patch) | |
tree | 9d37ab0d210254906f978466162a4381ca75e9d8 /samples | |
parent | f83a46d4711e789642033eb00fed8e017e34fe7d (diff) |
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/Makefile | 2 |
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 | |||
284 | $(Q)$(CLANG) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) -I$(obj) \ | 284 | $(Q)$(CLANG) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) -I$(obj) \ |
285 | -I$(srctree)/tools/testing/selftests/bpf/ \ | 285 | -I$(srctree)/tools/testing/selftests/bpf/ \ |
286 | -D__KERNEL__ -D__BPF_TRACING__ -Wno-unused-value -Wno-pointer-sign \ | 286 | -D__KERNEL__ -D__BPF_TRACING__ -Wno-unused-value -Wno-pointer-sign \ |
287 | -D__TARGET_ARCH_$(ARCH) -Wno-compare-distinct-pointer-types \ | 287 | -D__TARGET_ARCH_$(SRCARCH) -Wno-compare-distinct-pointer-types \ |
288 | -Wno-gnu-variable-sized-type-not-at-end \ | 288 | -Wno-gnu-variable-sized-type-not-at-end \ |
289 | -Wno-address-of-packed-member -Wno-tautological-compare \ | 289 | -Wno-address-of-packed-member -Wno-tautological-compare \ |
290 | -Wno-unknown-warning-option $(CLANG_ARCH_ARGS) \ | 290 | -Wno-unknown-warning-option $(CLANG_ARCH_ARGS) \ |