mirror of
https://github.com/ARMSX2/ARMSX1.git
synced 2026-08-24 16:53:35 -07:00
Fix musl atomic linking and wasm FSUI dependencies
This commit is contained in:
@@ -46,7 +46,6 @@ FSUI_DIR := third_party/fsui-lib
|
||||
FSUI_BUILD_DIR ?= build/fsui/native
|
||||
WASM_HTML_POSTPROCESS := $(FSUI_DIR)/cmake/postprocess_web_html.cmake
|
||||
FSUI_LINK_SYSTEM_GL ?= 1
|
||||
MUSL_LINK_ATOMIC ?= 0
|
||||
|
||||
ifeq ($(PSVITA_TARGET),1)
|
||||
ifeq ($(strip $(VITASDK)),)
|
||||
@@ -217,9 +216,15 @@ FSUI_LIBS := \
|
||||
$(FSUI_BUILD_DIR)/libfsui-renderer-sdl2surface.a \
|
||||
$(FSUI_BUILD_DIR)/libfsui-core.a \
|
||||
$(FSUI_BUILD_DIR)/libfsui_imgui.a \
|
||||
$(FSUI_BUILD_DIR)/libfsui-renderer-opengl.a \
|
||||
$(FSUI_BUILD_DIR)/libfsui_glad.a \
|
||||
$(FSUI_BUILD_DIR)/libfsui_resources.a
|
||||
ifeq ($(WASM_TARGET),wasm)
|
||||
FSUI_LIBS += \
|
||||
$(FSUI_BUILD_DIR)/libfsui-renderer-opengl.a
|
||||
else
|
||||
FSUI_LIBS += \
|
||||
$(FSUI_BUILD_DIR)/libfsui-renderer-opengl.a \
|
||||
$(FSUI_BUILD_DIR)/libfsui_glad.a
|
||||
endif
|
||||
|
||||
PLATFORM_EXTRA_LDFLAGS :=
|
||||
PLATFORM_EXTRA_LIBS :=
|
||||
@@ -242,9 +247,6 @@ else ifneq ($(WASM_TARGET),wasm)
|
||||
ifeq ($(FSUI_LINK_SYSTEM_GL),1)
|
||||
PLATFORM_EXTRA_LIBS += -lGL
|
||||
endif
|
||||
ifeq ($(MUSL_LINK_ATOMIC),1)
|
||||
PLATFORM_EXTRA_LIBS += -latomic
|
||||
endif
|
||||
endif
|
||||
|
||||
C_OBJS := $(patsubst %.c,$(OBJ_DIR)/%.o,$(C_SOURCES))
|
||||
|
||||
@@ -116,13 +116,6 @@ configure_target() {
|
||||
|
||||
configure_target
|
||||
|
||||
musl_link_atomic=0
|
||||
case "$target" in
|
||||
arm64|arm32)
|
||||
musl_link_atomic=1
|
||||
;;
|
||||
esac
|
||||
|
||||
toolchain_dir="$(download_toolchain "$toolchain_name")"
|
||||
apk_static="$(download_apk_static)"
|
||||
python3_bin="$(command -v python3 || true)"
|
||||
@@ -180,6 +173,12 @@ export PKG_CONFIG_LIBDIR="$sysroot_dir/usr/lib/pkgconfig:$sysroot_dir/usr/share/
|
||||
|
||||
sdl_cflags="$(pkg-config --cflags sdl2)"
|
||||
sdl_libs="$(pkg-config --libs sdl2)"
|
||||
platform_extra_ldflags="-static-libstdc++ -static-libgcc"
|
||||
case "$target" in
|
||||
arm64|arm32)
|
||||
platform_extra_ldflags="$platform_extra_ldflags -Wl,-Bstatic -latomic -Wl,-Bdynamic"
|
||||
;;
|
||||
esac
|
||||
|
||||
rm -rf "$fsui_build_dir" "$artifact_root"
|
||||
mkdir -p "$artifact_root"
|
||||
@@ -207,9 +206,8 @@ make \
|
||||
FSUI_LINK_SYSTEM_GL=0 \
|
||||
SDL_CFLAGS="$sdl_cflags" \
|
||||
SDL_LIBS_DYNAMIC="$sdl_libs" \
|
||||
MUSL_LINK_ATOMIC="$musl_link_atomic" \
|
||||
FSUI_BUILD_DIR="$fsui_build_dir" \
|
||||
PLATFORM_EXTRA_LDFLAGS="-static-libstdc++ -static-libgcc"
|
||||
PLATFORM_EXTRA_LDFLAGS="$platform_extra_ldflags"
|
||||
|
||||
mkdir -p "$package_root/lib" "$package_root/icons"
|
||||
cp "$repo_root/bin/armsx" "$package_root/armsx.bin"
|
||||
|
||||
Reference in New Issue
Block a user