Enable PIC even for static libraries

Start using CMAKE_POSITION_INDEPENDENT_CODE=ON in order to keep the same
behavior that existed before a set of changes modified it and ended up
with the inclusion of CMAKE_POSITION_INDEPENDENT_CODE in commit
a6e5563dfaff0cb7147058b9c49e38b611a28fb1.

Fixes: rhbz#2186531
This commit is contained in:
Tulio Magno Quites Machado Filho 2023-05-04 11:00:32 -03:00
parent 65ca9d0a2a
commit 8cc3bcf263

View File

@ -9,7 +9,7 @@
Name: llvm-libunwind
Version: %{libunwind_version}%{?rc_ver:~rc%{rc_ver}}
Release: 1%{?dist}
Release: 2%{?dist}
Summary: LLVM libunwind
License: ASL 2.0 or NCSA or MIT
@ -77,6 +77,7 @@ export ASMFLAGS=$CFLAGS
%cmake -GNinja \
-DCMAKE_MODULE_PATH=%{_libdir}/cmake/llvm \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DLLVM_BUILD_DOCS=ON \
-DLLVM_ENABLE_SPHINX=ON \
-DLIBUNWIND_INCLUDE_DOCS=ON \
@ -137,6 +138,9 @@ rm %{buildroot}%{_pkgdocdir}/html/.buildinfo
%doc %{_pkgdocdir}/html
%changelog
* Wed May 03 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 15.0.7-2
- Enable PIC even for static libraries (rhbz#2186531)
* Fri Jan 13 2023 Nikita Popov <npopov@redhat.com> - 15.0.7-1
- Update to LLVM 15.0.7