From 9bd0cafffbcbccf823c9e1e2cf01bf54f3dbbc52 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Tue, 25 Feb 2025 15:47:41 -0300 Subject: [PATCH] Enable -fPIC for static compat libraries Generate static compat libraries with Position Independent Code in order to let these files to be used when linking to shared libraries. --- zlib-ng.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zlib-ng.spec b/zlib-ng.spec index 6752b6c..db61236 100644 --- a/zlib-ng.spec +++ b/zlib-ng.spec @@ -118,7 +118,7 @@ _EOF_ # defining BUILD_SHARED_LIBS disables the static library %undefine _cmake_shared_libs # Disable new strategies in order to keep compatibility with zlib. -%cmake %{cmake_param} -DZLIB_COMPAT=ON -DWITH_NEW_STRATEGIES=OFF +%cmake %{cmake_param} -DZLIB_COMPAT=ON -DWITH_NEW_STRATEGIES=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON %cmake_build %endif