Add cmake support for LOONGARCH64

This commit is contained in:
gxw
2021-08-02 10:00:41 +08:00
parent 34207bdf5b
commit 0b8f7c8c10
5 changed files with 25 additions and 1 deletions
+9
View File
@@ -29,6 +29,15 @@ if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU" OR ${CMAKE_C_COMPILER_ID} STREQUAL "LS
set(FCOMMON_OPT "${FCOMMON_OPT} -march=mips64")
endif ()
if (LOONGARCH64)
if (BINARY64)
set(CCOMMON_OPT "${CCOMMON_OPT} -mabi=lp64")
else ()
set(CCOMMON_OPT "${CCOMMON_OPT} -mabi=lp32")
endif ()
set(BINARY_DEFINED 1)
endif ()
if (CMAKE_SYSTEM_NAME STREQUAL "AIX")
set(BINARY_DEFINED 1)
endif ()