There exists many build errors when make M=samples/bpf on the Loongson[...]
platform, this issue is MIPS related, x86 compiles just fine.
Here are some errors:
So we can do the similar things in samples/bpf/Makefile, just add
platform specific and generic include dir for MIPS Loongson64 to
fix the build errors.
Signed-off-by: Tiezhu Yang <yangtiezhu@xxxxxxxxxxx>
---
samples/bpf/Makefile | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index 362f314..45ceca4 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -185,6 +185,10 @@ endif
ifeq ($(ARCH), mips)
TPROGS_CFLAGS += -D__SANE_USERSPACE_TYPES__
+ifdef CONFIG_MACH_LOONGSON64
+BPF_EXTRA_CFLAGS += -I$(srctree)/arch/mips/include/asm/mach-loongson64
+BPF_EXTRA_CFLAGS += -I$(srctree)/arch/mips/include/asm/mach-generic
+endif
endif
TPROGS_CFLAGS += -Wall -O2