Skip to content
Snippets Groups Projects
Commit d52341df authored by Siwei Zhuang's avatar Siwei Zhuang
Browse files

cmake: Update the RISCV build to work with GCC 8.2.0

parent c666820e
No related branches found
No related tags found
No related merge requests found
......@@ -72,11 +72,11 @@ if(KernelArchARM)
endif()
if(KernelArchRiscV)
if(Kernel64)
string(APPEND c_common_flags " -march=rv64imac")
string(APPEND c_common_flags " -mabi=lp64")
string(APPEND common_flags " -march=rv64imac")
string(APPEND common_flags " -mabi=lp64")
else()
string(APPEND c_common_flags " -march=rv32ima")
string(APPEND c_common_flags " -mabi=ilp32")
string(APPEND common_flags " -march=rv32imac")
string(APPEND common_flags " -mabi=ilp32")
endif()
endif()
string(APPEND common_flags " ${build_arch}")
......
......@@ -30,10 +30,8 @@ if("${CROSS_COMPILER_PREFIX}" STREQUAL "")
set(CROSS_COMPILER_PREFIX "arm-linux-gnueabihf-" CACHE INTERNAL "")
elseif(AARCH64)
set(CROSS_COMPILER_PREFIX "aarch64-linux-gnu-" CACHE INTERNAL "")
elseif(RISCV32)
set(CROSS_COMPILER_PREFIX "riscv32-unknown-elf-" CACHE INTERNAL "")
elseif(RISCV64)
set(CROSS_COMPILER_PREFIX "riscv64-unknown-elf-" CACHE INTERNAL "")
elseif(RISCV32 OR RISCV64)
set(CROSS_COMPILER_PREFIX "riscv64-unknown-linux-gnu-" CACHE INTERNAL "")
else()
# If we haven't set a target above we assume x86_64/ia32 target
if(APPLE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment