remove rpath and runpath of exec files and libraries
This commit is contained in:
parent
1f9aef7b87
commit
445282625d
@ -1,7 +1,7 @@
|
||||
Summary: Binary utilities
|
||||
Name: binutils
|
||||
Version: 2.36.1
|
||||
Release: 1
|
||||
Release: 2
|
||||
License: GPLv3+
|
||||
URL: https://sourceware.org/binutils
|
||||
|
||||
@ -35,7 +35,7 @@ Provides: bundled(libiberty)
|
||||
Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||
|
||||
BuildRequires: gcc, perl, sed, coreutils, dejagnu, zlib-devel, glibc-static, sharutils, bc, libstdc++-static
|
||||
BuildRequires: bison, m4, gcc-c++, gettext, flex, zlib-devel, texinfo >= 4.0, perl-podlators
|
||||
BuildRequires: bison, m4, gcc-c++, gettext, flex, zlib-devel, texinfo >= 4.0, perl-podlators chrpath
|
||||
Requires(post): info coreutils chkconfig
|
||||
Requires(preun):info chkconfig
|
||||
|
||||
@ -171,6 +171,14 @@ chmod +x %{buildroot}%{_libdir}/lib*.so*
|
||||
|
||||
rm -f %{buildroot}%{_libdir}/lib{bfd,opcodes}.{so,la}
|
||||
|
||||
#Remove rpath
|
||||
chrpath --delete %{buildroot}%{_bindir}/{ld.bfd,objcopy,addr2line,gprof,size,strings,c++filt,strip,as,objdump,nm,ranlib,ar,readelf}
|
||||
chrpath --delete %{buildroot}%{_libdir}/libopcodes-%{version}.so
|
||||
chrpath --delete %{buildroot}%{_libdir}/libctf.so.0.0.0
|
||||
|
||||
mkdir -p %{buildroot}/etc/ld.so.conf.d
|
||||
echo "%{_libdir}" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
|
||||
|
||||
%ifarch %{ix86} x86_64 arm
|
||||
sed -i -e '/^#include "ansidecl.h"/{p;s~^.*$~#include <bits/wordsize.h>~;}' \
|
||||
-e 's/^#define BFD_DEFAULT_TARGET_SIZE \(32\|64\) *$/#define BFD_DEFAULT_TARGET_SIZE __WORDSIZE/' \
|
||||
@ -324,6 +332,7 @@ fi
|
||||
%exclude %{_libdir}/libctf-nobfd.a
|
||||
%exclude %{_libdir}/libbfd.so
|
||||
%exclude %{_libdir}/libopcodes.so
|
||||
%config(noreplace) /etc/ld.so.conf.d/*
|
||||
|
||||
%files devel
|
||||
%{_prefix}/include/*
|
||||
@ -342,6 +351,12 @@ fi
|
||||
%{_infodir}/bfd*info*
|
||||
|
||||
%changelog
|
||||
* Tue Sep 7 2021 yangzhuangzhuang <yangzhuangzhuang1@huawei.com> - 2.36.1-2
|
||||
- Type:requirements
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:remove rpath and runpath of exec files and libraries
|
||||
|
||||
* Mon Jul 5 2021 yixiangzhike <zhangxingliang3@huawei.com> - 2.36.1-1
|
||||
- Type:NA
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user