Skip to content

Commit

Permalink
tools:cmake: ARCH supports riscv64
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
cp0613 authored and anakryiko committed Oct 26, 2023
1 parent dfda858 commit b3a6590
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/cmake/FindBpfObject.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ endif()

# Get target arch
execute_process(COMMAND uname -m
COMMAND sed -e "s/x86_64/x86/" -e "s/aarch64/arm64/" -e "s/ppc64le/powerpc/" -e "s/mips.*/mips/"
COMMAND sed -e "s/x86_64/x86/" -e "s/aarch64/arm64/" -e "s/ppc64le/powerpc/" -e "s/mips.*/mips/" -e "s/riscv64/riscv/"
OUTPUT_VARIABLE ARCH_output
ERROR_VARIABLE ARCH_error
RESULT_VARIABLE ARCH_result
Expand Down

0 comments on commit b3a6590

Please sign in to comment.