Skip to content

Commit

Permalink
runtime: fix linux-musl-loongarch64 build
Browse files Browse the repository at this point in the history
Signed-off-by: WANG Xuerui <[email protected]>
  • Loading branch information
xen0n committed Nov 22, 2024
1 parent 6a41a73 commit 1f37fc2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/runtime/eng/common/cross/toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ elseif(TARGET_ARCH_NAME STREQUAL "armv6")
endif()
elseif(TARGET_ARCH_NAME STREQUAL "loongarch64")
set(CMAKE_SYSTEM_PROCESSOR loongarch64)
set(TOOLCHAIN "loongarch64-linux-gnu")
if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/loongarch64-alpine-linux-musl)
set(TOOLCHAIN "loongarch64-alpine-linux-musl")
else()
set(TOOLCHAIN "loongarch64-linux-gnu")
endif()
elseif(TARGET_ARCH_NAME STREQUAL "ppc64le")
set(CMAKE_SYSTEM_PROCESSOR ppc64le)
if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/powerpc64le-alpine-linux-musl)
Expand Down
3 changes: 2 additions & 1 deletion src/runtime/eng/native/tryrun.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/armv7-alpine-linux-musleabihf OR
EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/ppc64le-alpine-linux-musl OR
EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl OR
EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/x86_64-alpine-linux-musl OR
EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/riscv64-alpine-linux-musl)
EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/riscv64-alpine-linux-musl OR
EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/loongarch64-alpine-linux-musl)

set(ALPINE_LINUX 1)
elseif(EXISTS ${CROSS_ROOTFS}/bin/freebsd-version)
Expand Down

0 comments on commit 1f37fc2

Please sign in to comment.