LoongArch support (#929)
* LoongArch: These files are only compiled on the LoongArch platform * Revert "Support loongarch64" This reverts commit 79d5b68e0a6e36eb1b4faf86bcfd78d1e0a61ee8. * LoongArch: link libatomic * LoongArch: add "-mcmodel=large" to CFLAGS
This commit is contained in:
@ -137,8 +137,9 @@ elseif(${ARCHITECTURE} STREQUAL "aarch64")
|
|||||||
set(MTUNE_CFLAGS "-mtune=generic" )
|
set(MTUNE_CFLAGS "-mtune=generic" )
|
||||||
set(ARCH_LDFLAGS "-l:libatomic.a")
|
set(ARCH_LDFLAGS "-l:libatomic.a")
|
||||||
elseif(${ARCHITECTURE} STREQUAL "loongarch64")
|
elseif(${ARCHITECTURE} STREQUAL "loongarch64")
|
||||||
set(MARCH_CFLAGS "-march=la464" )
|
set(MARCH_CFLAGS "-march=la464" "-mcmodel=large")
|
||||||
set(MTUNE_CFLAGS "-mabi=lp64d" )
|
set(MTUNE_CFLAGS "-mabi=lp64d")
|
||||||
|
set(ARCH_LDFLAGS "-latomic")
|
||||||
elseif(${ARCHITECTURE} STREQUAL "sw_64")
|
elseif(${ARCHITECTURE} STREQUAL "sw_64")
|
||||||
set(ARCH_LDFLAGS "-latomic -llzma")
|
set(ARCH_LDFLAGS "-latomic -llzma")
|
||||||
else()
|
else()
|
||||||
|
|||||||
11
deps/oblib/src/lib/CMakeLists.txt
vendored
11
deps/oblib/src/lib/CMakeLists.txt
vendored
@ -26,18 +26,11 @@ ob_lib_add_target(oblib_lib_coro_context
|
|||||||
coro/context/asm/make_sw_64_sysv_elf_gas.S
|
coro/context/asm/make_sw_64_sysv_elf_gas.S
|
||||||
coro/context/asm/jump_sw_64_sysv_elf_gas.S
|
coro/context/asm/jump_sw_64_sysv_elf_gas.S
|
||||||
coro/context/asm/ontop_sw_64_aapcs_elf_gas.S
|
coro/context/asm/ontop_sw_64_aapcs_elf_gas.S
|
||||||
|
|
||||||
)
|
|
||||||
disable_pch(oblib_lib_coro_context)
|
|
||||||
|
|
||||||
if(${ARCHITECTURE} STREQUAL "loongarch64")
|
|
||||||
ob_lib_add_target(oblib_lib_coro_context_loongarch64
|
|
||||||
coro/context/asm/jump_loongarch64_sysv_elf_gas.S
|
coro/context/asm/jump_loongarch64_sysv_elf_gas.S
|
||||||
coro/context/asm/make_loongarch64_sysv_elf_gas.S
|
coro/context/asm/make_loongarch64_sysv_elf_gas.S
|
||||||
coro/context/asm/ontop_loongarch64_sysv_elf_gas.S
|
coro/context/asm/ontop_loongarch64_sysv_elf_gas.S
|
||||||
)
|
)
|
||||||
disable_pch(oblib_lib_coro_context_loongarch64)
|
disable_pch(oblib_lib_coro_context)
|
||||||
endif()
|
|
||||||
|
|
||||||
ob_set_subtarget(oblib_lib coro
|
ob_set_subtarget(oblib_lib coro
|
||||||
coro/co_base_sched.cpp
|
coro/co_base_sched.cpp
|
||||||
|
|||||||
@ -38,6 +38,7 @@
|
|||||||
* *
|
* *
|
||||||
* *****************************************************/
|
* *****************************************************/
|
||||||
|
|
||||||
|
#if defined(__loongarch64)
|
||||||
.file "jump_loongarch64_sysv_elf_gas.S"
|
.file "jump_loongarch64_sysv_elf_gas.S"
|
||||||
.text
|
.text
|
||||||
.globl jump_fcontext
|
.globl jump_fcontext
|
||||||
@ -119,3 +120,4 @@ jump_fcontext:
|
|||||||
|
|
||||||
/* Mark that we don't need executable stack. */
|
/* Mark that we don't need executable stack. */
|
||||||
.section .note.GNU-stack,"",%progbits
|
.section .note.GNU-stack,"",%progbits
|
||||||
|
#endif
|
||||||
|
|||||||
@ -38,6 +38,7 @@
|
|||||||
* *
|
* *
|
||||||
* *****************************************************/
|
* *****************************************************/
|
||||||
|
|
||||||
|
#if defined(__loongarch64)
|
||||||
.file "make_loongarch64_sysv_elf_gas.S"
|
.file "make_loongarch64_sysv_elf_gas.S"
|
||||||
.text
|
.text
|
||||||
.globl make_fcontext
|
.globl make_fcontext
|
||||||
@ -70,3 +71,4 @@ finish:
|
|||||||
.size make_fcontext, .-make_fcontext
|
.size make_fcontext, .-make_fcontext
|
||||||
/* Mark that we don't need executable stack. */
|
/* Mark that we don't need executable stack. */
|
||||||
.section .note.GNU-stack,"",%progbits
|
.section .note.GNU-stack,"",%progbits
|
||||||
|
#endif
|
||||||
|
|||||||
@ -38,6 +38,7 @@
|
|||||||
* *
|
* *
|
||||||
* *****************************************************/
|
* *****************************************************/
|
||||||
|
|
||||||
|
#if defined(__loongarch64)
|
||||||
.file "ontop_loongarch64_sysv_elf_gas.S"
|
.file "ontop_loongarch64_sysv_elf_gas.S"
|
||||||
.text
|
.text
|
||||||
.globl ontop_fcontext
|
.globl ontop_fcontext
|
||||||
@ -116,3 +117,4 @@ ontop_fcontext:
|
|||||||
|
|
||||||
/* Mark that we don't need executable stack. */
|
/* Mark that we don't need executable stack. */
|
||||||
.section .note.GNU-stack,"",%progbits
|
.section .note.GNU-stack,"",%progbits
|
||||||
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user