mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 07:13:34 +08:00
Add compiler cmake files for RISC-V (rv64gc) targets
This adds the basic support for riscv64-unknown-elf compiler amd rv64gc ISA Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This commit is contained in:
committed by
Daniel Agar
parent
935253357a
commit
34de392425
@@ -0,0 +1,11 @@
|
||||
|
||||
if(CONFIG_ARCH_DPFPU)
|
||||
message(STATUS "Enabling double FP precision hardware instructions")
|
||||
set(cpu_flags "-march=rv64gc -mabi=lp64d -mcmodel=medany")
|
||||
else()
|
||||
set(cpu_flags "-march=rv64imac -mabi=lp64 -mcmodel=medany")
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_FLAGS "${cpu_flags}" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_FLAGS "${cpu_flags}" CACHE STRING "" FORCE)
|
||||
set(CMAKE_ASM_FLAGS "${cpu_flags} -D__ASSEMBLY__" CACHE STRING "" FORCE)
|
||||
Reference in New Issue
Block a user