tools, build: Add RISC-V to HOSTARCH parsing
authorBjörn Töpel <bjorn@kernel.org>
Thu, 28 Oct 2021 16:10:55 +0000 (18:10 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 1 Nov 2021 16:08:21 +0000 (17:08 +0100)
Add RISC-V to the HOSTARCH parsing, so that ARCH is "riscv", and not
"riscv32" or "riscv64".

This affects the perf and libbpf builds, so that arch specific
includes are correctly picked up for RISC-V.

Signed-off-by: Björn Töpel <bjorn@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20211028161057.520552-3-bjorn@kernel.org
tools/scripts/Makefile.arch

index b10b7a27c33fd16b10fa3d7fcfd7a5fa372f2d59..0c6c7f45688784b59cd7e85032c8d1d9a3a12925 100644 (file)
@@ -4,7 +4,8 @@ HOSTARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
                                   -e /arm64/!s/arm.*/arm/ -e s/sa110/arm/ \
                                   -e s/s390x/s390/ -e s/parisc64/parisc/ \
                                   -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
-                                  -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ )
+                                  -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ \
+                                  -e s/riscv.*/riscv/)
 
 ifndef ARCH
 ARCH := $(HOSTARCH)