Add RV64 support to CMakeLists.txt
based on loongarch64
@@ -12,6 +12,7 @@ option(TEGRAX1 "Set to ON if targeting an Tegra X1 based device" ${TEGRAX1})
option(PHYTIUM "Set to ON if targeting an Phytium (D2000 or FT2000/4) based device" ${PHYTIUM})
option(SD845 "Set to ON if targeting a Snapragon 845 based device" ${SD845})
option(LARCH64 "Set to ON if targeting an Loongarch64 based device" ${LARCH64})
+option(RV64 "Set to ON if targeting an RISCV RV64G based device" ${RV64})
option(PPC64LE "Set to ON if targeting an PowerPC 64 LE based device" ${PPC64LE})
option(LX2160A "Set to ON if targeting an LX2160A based device" ${LX2160A})
option(USE_CCACHE "Set to ON to use ccache if present in the system" ${USE_CCACHE})
@@ -23,6 +24,11 @@ if(LARCH64)
set(NOALIGN OFF CACHE BOOL "")
set(ARM_DYNAREC OFF CACHE BOOL "")
endif()
+if(RV64)
+ set(LD80BITS OFF CACHE BOOL "")
+ set(NOALIGN OFF CACHE BOOL "")
+ set(ARM_DYNAREC OFF CACHE BOOL "")
+endif()
if(PPC64LE)
set(LD80BITS OFF CACHE BOOL "")
set(NOALIGN OFF CACHE BOOL "")
@@ -93,6 +99,10 @@ elseif(LARCH64)
add_definitions(-DLARCH64)
add_definitions(-pipe -march=loongarch64)
set(CMAKE_ASM_FLAGS "-pipe -march=loongarch64")
+elseif(RV64)
+ add_definitions(-DRV64)
+ add_definitions(-pipe -march=rv64g)
+ set(CMAKE_ASM_FLAGS "-pipe -march=rv64g")
elseif(PPC64LE)
add_definitions(-DPPC64LE)
elseif(LX2160A)
