Merge pull request #22570 from alalek:fix_riscv_opt_path

riscv: use /opt/riscv path in toolchain
This commit is contained in:
Alexander Smorkalov 2022-09-27 09:44:43 +03:00 committed by GitHub
commit 72f1ce6550
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@ set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR riscv64)
set(RISCV_CLANG_BUILD_ROOT /opt/rvv-llvm CACHE PATH "Path to CLANG for RISC-V cross compiler build directory")
set(RISCV_GCC_INSTALL_ROOT /opt/RISCV CACHE PATH "Path to GCC for RISC-V cross compiler installation directory")
set(RISCV_GCC_INSTALL_ROOT /opt/riscv CACHE PATH "Path to GCC for RISC-V cross compiler installation directory")
set(CMAKE_SYSROOT ${RISCV_GCC_INSTALL_ROOT}/sysroot CACHE PATH "RISC-V sysroot")
set(CLANG_TARGET_TRIPLE riscv64-unknown-linux-gnu)

View File

@ -3,12 +3,12 @@ set(CMAKE_SYSTEM_PROCESSOR riscv64)
if(NOT DEFINED CMAKE_C_COMPILER)
find_program(CMAKE_C_COMPILER NAMES riscv64-unknown-linux-gnu-gcc
PATHS /opt/RISCV/bin ENV PATH)
PATHS /opt/riscv/bin ENV PATH)
endif()
if(NOT DEFINED CMAKE_CXX_COMPILER)
find_program(CMAKE_CXX_COMPILER NAMES riscv64-unknown-linux-gnu-g++
PATHS /opt/RISCV/bin ENV PATH)
PATHS /opt/riscv/bin ENV PATH)
endif()
get_filename_component(RISCV_GCC_INSTALL_ROOT ${CMAKE_C_COMPILER} DIRECTORY)