From d252a3c72ce7f1a04e675c8d359ea8d74ff33f26 Mon Sep 17 00:00:00 2001 From: STL1te Date: Wed, 30 Sep 2026 09:34:56 +0300 Subject: [PATCH] fix(build): FFmpeg links into the Linux prx and without Windows libraries there The MinGW FFmpeg package needs bcrypt, ole32 and user32; linking them unconditionally broke libSceAjm.native.prx on Linux. The Linux package's x86 assembly references its constants PC32, which ld refuses in a shared object unless the archives' symbols stay local: --exclude-libs,ALL keeps them out of the prx's dynamic symbols. Co-Authored-By: Claude Opus 5.5 --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f75e9677..b17426dec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,7 +36,11 @@ add_subdirectory(3rdparty/SDL2) set(CMAKE_EXE_LINKER_FLAGS "${ANYPS5_EXE_LINKER_FLAGS}") set(ARCHITECTURE x86_64) add_subdirectory(3rdparty/ffmpeg-core) -target_link_libraries(ffmpeg INTERFACE bcrypt ole32 user32) +if(MINGW) + target_link_libraries(ffmpeg INTERFACE bcrypt ole32 user32) +elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") + target_link_options(ffmpeg INTERFACE LINKER:--exclude-libs,ALL) +endif() set(FT_DISABLE_ZLIB ON CACHE BOOL "" FORCE) set(FT_DISABLE_BZIP2 ON CACHE BOOL "" FORCE)