From 8a55416bb3c936f4d0666f045432a3bdc47ed149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jani=20V=C3=A4limaa?= Date: Sun, 17 Oct 2021 13:55:59 +0300 Subject: build.macros: export LT_SYS_LIBRARY_PATH with %set_build_flags Setting LT_SYS_LIBRARY_PATH prevents libtool from hardcoding %_libdir into the binaries' RPATH (originally from Fedora). --- NEWS | 1 + build.macros.in | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index d516436..a1e288b 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,5 @@ - configure.ac: update and modernize with autoconf 2.71 +- build.macros: export LT_SYS_LIBRARY_PATH with %set_build_flags to prevent libtool hardcoding %_libdir into the binaries' RPATH (originally from Fedora) Version 2.61 - 7 September 2021, by Jani Välimaa - brp-mangle-shebang: fix handling of files without newlines (from Fedora) diff --git a/build.macros.in b/build.macros.in index 34466d4..4aa8843 100644 --- a/build.macros.in +++ b/build.macros.in @@ -172,12 +172,14 @@ GCONF_CONFIG_SOURCE=`%{_gconftool_bin} --get-default-source` %{_gconftool_bin} - # variables CFLAGS, CXXFLAGS, FFLAGS, FCFLAGS, LDFLAGS if they have # not been set already. RPM_OPT_FLAGS and RPM_LD_FLAGS have already # been set implicitly at the start of the %%build section. +# LT_SYS_LIBRARY_PATH is used by libtool script. %set_build_flags \ CFLAGS="${CFLAGS:-%{build_cflags}}" ; export CFLAGS ; \ CXXFLAGS="${CXXFLAGS:-%{build_cxxflags}}" ; export CXXFLAGS ; \ FFLAGS="${FFLAGS:-%{build_fflags}}" ; export FFLAGS ; \ FCFLAGS="${FCFLAGS:-%{build_fflags}}" ; export FCFLAGS ; \ - LDFLAGS="${LDFLAGS:-%{build_ldflags}}" ; export LDFLAGS + LDFLAGS="${LDFLAGS:-%{build_ldflags}}" ; export LDFLAGS ; \ + LT_SYS_LIBRARY_PATH="${LT_SYS_LIBRARY_PATH:-%_libdir:}" ; export LT_SYS_LIBRARY_PATH # For compatibility %setup_compile_flags \ -- cgit v1.2.1