Borrow a patch from the GCC package to stop libtool from inserting needless runpaths into binaries. (#2030667)

This commit is contained in:
Nick Clifton 2022-01-27 16:47:47 +00:00
parent 95c35f80af
commit c13a28efbc
2 changed files with 36 additions and 4 deletions

View File

@ -39,7 +39,7 @@
Summary: A GNU collection of binary utilities
Name: binutils%{?name_cross}%{?_with_debug:-debug}
Version: 2.37
Release: 24%{?dist}
Release: 25%{?dist}
License: GPLv3+
URL: https://sourceware.org/binutils
@ -333,6 +333,10 @@ Patch29: binutils-readelf-recognize-FDO-Packaging-Metadata-ELF-note.patch
# Lifetime: Fixed in 2.38.
Patch30: binutils-CVE-2021-45078.patch
# Purpose: Stop libtool from inserting useless runpaths into binaries.
# Lifetime: Who knows.
Patch31: gcc12-libtool-no-rpath.patch
#----------------------------------------------------------------------------
Provides: bundled(libiberty)
@ -850,9 +854,6 @@ if [ -x gold/ld-new ]; then
cat %{?cross}gold.lang >> %{?cross}binutils.lang
fi
# Stop check-rpaths from complaining about standard runpaths.
export QA_RPATHS=0x0001
#----------------------------------------------------------------------------
%post
@ -945,6 +946,9 @@ exit 0
#----------------------------------------------------------------------------
%changelog
* Thu Jan 27 2022 Nick Clifton <nickc@redhat.comn> - 2.37-25
- Borrow a patch from the GCC package to stop libtool from inserting needless runpaths into binaries. (#2030667)
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.37-24
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

View File

@ -0,0 +1,28 @@
diff -rup binutils.orig/ltmain.sh binutils-2.37/ltmain.sh
--- binutils.orig/ltmain.sh 2022-01-27 16:23:09.304207432 +0000
+++ binutils-2.37/ltmain.sh 2022-01-27 16:23:18.380143759 +0000
@@ -7103,6 +7103,7 @@ EOF
rpath="$finalize_rpath"
test "$mode" != relink && rpath="$compile_rpath$rpath"
for libdir in $rpath; do
+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
if test -n "$hardcode_libdir_flag_spec"; then
if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then
@@ -7798,6 +7799,7 @@ EOF
rpath=
hardcode_libdirs=
for libdir in $compile_rpath $finalize_rpath; do
+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
if test -n "$hardcode_libdir_flag_spec"; then
if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then
@@ -7849,6 +7851,7 @@ EOF
rpath=
hardcode_libdirs=
for libdir in $finalize_rpath; do
+ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac
if test -n "$hardcode_libdir_flag_spec"; then
if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then
Only in binutils-2.37: ltmain.sh.orig