Skip to content

Commit b3a6590

Browse files
cp0613anakryiko
authored andcommitted
tools:cmake: ARCH supports riscv64
The original code will generate an error when compiled on the riscv64 platform: "error: Must specify a BPF target arch via __TARGET_ARCH_xxx" This patch fixs it. Signed-off-by: Chen Pei <cp0613@linux.alibaba.com>
1 parent dfda858 commit b3a6590

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/cmake/FindBpfObject.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ endif()
141141

142142
# Get target arch
143143
execute_process(COMMAND uname -m
144-
COMMAND sed -e "s/x86_64/x86/" -e "s/aarch64/arm64/" -e "s/ppc64le/powerpc/" -e "s/mips.*/mips/"
144+
COMMAND sed -e "s/x86_64/x86/" -e "s/aarch64/arm64/" -e "s/ppc64le/powerpc/" -e "s/mips.*/mips/" -e "s/riscv64/riscv/"
145145
OUTPUT_VARIABLE ARCH_output
146146
ERROR_VARIABLE ARCH_error
147147
RESULT_VARIABLE ARCH_result

0 commit comments

Comments
 (0)