mkxp-z/subprojects/packagefiles/openal-soft-pic.patch
刘皓 f8d5fc06f5
Disable PIC in static libretro builds
Apparently Vita SDK doesn't support PIC. It throws "Invalid relocation
type 25!" while creating the .self file when building RetroArch.
2025-02-21 00:17:01 -05:00

24 lines
912 B
Diff

# Prevents OpenAL Soft's build system from forcibly enabling position-independent code.
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1377,7 +1377,7 @@ target_compile_definitions(alsoft.common PRIVATE ${CPP_DEFS})
target_compile_options(alsoft.common PRIVATE ${C_FLAGS})
target_link_libraries(alsoft.common PRIVATE alsoft::fmt)
set_target_properties(alsoft.common PROPERTIES ${ALSOFT_STD_VERSION_PROPS}
- POSITION_INDEPENDENT_CODE TRUE)
+ )
unset(HAS_ROUTER)
--- a/fmt-11.1.1/CMakeLists.txt
+++ b/fmt-11.1.1/CMakeLists.txt
@@ -73,7 +73,7 @@ target_include_directories(alsoft.fmt PUBLIC
set_target_properties(alsoft.fmt PROPERTIES ${ALSOFT_STD_VERSION_PROPS}
VERSION ${FMT_VERSION} SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}
DEBUG_POSTFIX "${ALSOFT_FMT_DEBUG_POSTFIX}"
- POSITION_INDEPENDENT_CODE TRUE
+
C_VISIBILITY_PRESET hidden
CXX_VISIBILITY_PRESET hidden
EXCLUDE_FROM_ALL TRUE)