mkxp-z/subprojects/packagefiles/mpg123-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

18 lines
950 B
Diff

# Prevents mpg123's build system from forcibly enabling position-independent code.
# Also removes the duplicate inclusion of compat_str.c. That causes duplicate symbol errors when linking mpg123 as whole archive.
--- a/ports/cmake/src/compat/CMakeLists.txt
+++ b/ports/cmake/src/compat/CMakeLists.txt
@@ -2,12 +2,6 @@ set(TARGET compat)
add_library(${TARGET} OBJECT
"${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/compat/compat.c"
"${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/compat/compat_str.c")
-set_target_properties(${TARGET} PROPERTIES POSITION_INDEPENDENT_CODE ON)
add_library(${TARGET}_dl OBJECT
"${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/compat/compat_dl.c")
-set_target_properties(${TARGET}_dl PROPERTIES POSITION_INDEPENDENT_CODE ON)
-
-add_library(${TARGET}_str OBJECT
- "${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/compat/compat_str.c")
-set_target_properties(${TARGET}_str PROPERTIES POSITION_INDEPENDENT_CODE ON)