Commit 748e50c1 authored by Ilya Leoshkevich's avatar Ilya Leoshkevich Committed by Daniel Borkmann
Browse files

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: default avatarIlya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: default avatarStanislav Fomichev <sdf@google.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
parent 9cae4ace
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
# 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 - </dev/null 2>&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