Add a patch to remove rpath from ldc2.conf

Starting with F35, rpmbuild now fails the build if standard RPATH is
detected (https://fedoraproject.org/wiki/Changes/Broken_RPATH_will_fail_rpmbuild).

This commit drops the previous chrpath hack and instead patches ldc to
drop rpath from ldc2.conf, which should prevent the rpath from being set
in the first place.
epel9
Kalev Lember 3 years ago
parent 9652353098
commit d0e557d5ba

@ -0,0 +1,14 @@
Description: Don't set a default rpath in global LDC configuration.
Author: Matthias Klumpp <mak@debian.org>
--- a/runtime/CMakeLists.txt
+++ b/runtime/CMakeLists.txt
@@ -247,7 +247,7 @@
# Default -rpath linker option when linking against shared libraries.
if(SHARED_LIBS_SUPPORTED)
set(SHARED_LIBS_RPATH "${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}")
- set(SHARED_LIBS_INSTALL_RPATH "${CMAKE_INSTALL_LIBDIR}")
+ set(SHARED_LIBS_INSTALL_RPATH "")
endif()
# Only have either shared or static libs?

@ -38,11 +38,12 @@ Source3: macros.%{name}
# Make sure /usr/include/d is in the include search path
Patch0: ldc-include-path.patch
# Don't add rpath to standard libdir
Patch1: ldc-no-default-rpath.patch
ExclusiveArch: %{ldc_arches}
BuildRequires: bash-completion
BuildRequires: chrpath
BuildRequires: cmake
BuildRequires: gc
BuildRequires: gcc
@ -177,12 +178,6 @@ geany -c geany_config -g phobos.d.tags $(find runtime/phobos/std -name "*.d")
%install
%cmake_install
# Remove lib64 rpaths
chrpath --delete %{buildroot}%{_bindir}/ldc-prune-cache
chrpath --delete %{buildroot}%{_bindir}/ldc2
chrpath --delete %{buildroot}%{_bindir}/ldmd2
chrpath --delete %{buildroot}%{_bindir}/ldc-build-runtime
# macros for D package
mkdir -p %{buildroot}/%{_rpmconfigdir}/macros.d/
install --mode=0644 %{SOURCE3} %{buildroot}%{_rpmconfigdir}/macros.d/macros.ldc

Loading…
Cancel
Save