From: Ilya Leoshkevich Date: Thu, 11 Jul 2019 14:29:27 +0000 (+0200) Subject: selftests/bpf: compile progs with -D__TARGET_ARCH_$(SRCARCH) X-Git-Tag: v5.15~5883^2~7^2~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=748e50c1c13d33dffcdca66f0b1cb3d96d17fe31;p=platform%2Fkernel%2Flinux-starfive.git selftests/bpf: compile progs with -D__TARGET_ARCH_$(SRCARCH) This opens up the possibility of accessing registers in an arch-independent way. Signed-off-by: Ilya Leoshkevich Reviewed-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann --- diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index 8312db1..277d860 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 include ../../../../scripts/Kbuild.include +include ../../../scripts/Makefile.arch LIBDIR := ../../../lib BPFDIR := $(LIBDIR)/bpf @@ -139,7 +140,8 @@ CLANG_SYS_INCLUDES := $(shell $(CLANG) -v -E - &1 \ CLANG_FLAGS = -I. -I./include/uapi -I../../../include/uapi \ $(CLANG_SYS_INCLUDES) \ - -Wno-compare-distinct-pointer-types + -Wno-compare-distinct-pointer-types \ + -D__TARGET_ARCH_$(SRCARCH) $(OUTPUT)/test_l4lb_noinline.o: CLANG_FLAGS += -fno-inline $(OUTPUT)/test_xdp_noinline.o: CLANG_FLAGS += -fno-inline