Skip to content
Snippets Groups Projects
Commit e50ca0c0 authored by Steve Lhomme's avatar Steve Lhomme
Browse files

contrib: zlib: disable --version-script on static libraries

According to the documentation it's only useful for shared libraries.
With recent Android NDK this leads to linking issues with gz_intmax
In autotools it's only set with LDSHARED.

https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_chapter/ld_3.html
parent 0a0bfaa3
No related branches found
No related tags found
1 merge request!5221contrib: zlib: disable --version-script on static libraries
Pipeline #459086 canceled with stage
in 1 hour, 41 minutes, and 11 seconds
......@@ -19,6 +19,8 @@ zlib: zlib-$(ZLIB_VERSION).tar.xz .sum-zlib
sed -e 's,install(TARGETS zlib zlibstatic,install(TARGETS zlibstatic,' -i.orig $(UNPACK_DIR)/CMakeLists.txt
# only use the proper libz name for the static library
sed -e 's,set_target_properties(zlib zlibstatic ,set_target_properties(zlibstatic ,' -i.orig $(UNPACK_DIR)/CMakeLists.txt
# don't use --version-script on static libraries
sed -e 's,if(NOT APPLE AND NOT(CMAKE_SYSTEM_NAME STREQUAL AIX)),if(BUILD_SHARED_LIBS AND (NOT APPLE AND NOT(CMAKE_SYSTEM_NAME STREQUAL AIX))),' -i.orig $(UNPACK_DIR)/CMakeLists.txt
$(MOVE)
ZLIB_CONF = -DINSTALL_PKGCONFIG_DIR:STRING=$(PREFIX)/lib/pkgconfig -DZLIB_BUILD_EXAMPLES=OFF
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment