forked from pool/binutils
Accepting request 919840 from home:schubi2
- Using libalternatives instead of update-alternatives. - OBS-URL: https://build.opensuse.org/request/show/919840 OBS-URL: https://build.opensuse.org/package/show/devel:gcc/binutils?expand=0&rev=368
This commit is contained in:
parent
a922d937e8
commit
628ae5d647
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 10 23:16:12 CEST 2021 - Stefan Schubert schubi@suse.de
|
||||
|
||||
- Using libalternatives instead of update-alternatives.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 8 15:09:58 UTC 2021 - Michael Matz <matz@suse.com>
|
||||
|
||||
|
@ -36,6 +36,13 @@ BuildRequires: zlib-devel
|
||||
%endif
|
||||
Version: 2.37
|
||||
Release: 0
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
#
|
||||
# RUN_TESTS
|
||||
%define run_tests %(test ! -f %_sourcedir/RUN_TESTS ; echo $?)
|
||||
@ -107,7 +114,11 @@ Patch90: cross-avr-nesc-as.patch
|
||||
Patch92: cross-avr-omit_section_dynsym.patch
|
||||
Patch93: cross-avr-size.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
|
||||
%description
|
||||
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
|
||||
@ -119,7 +130,11 @@ Summary: The gold linker
|
||||
License: GPL-3.0-or-later
|
||||
Group: Development/Tools/Building
|
||||
Requires: binutils = %{version}-%{release}
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
%if 0%{!?cross:1}
|
||||
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
|
||||
%endif
|
||||
@ -392,12 +407,24 @@ if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
||||
else
|
||||
rm -f "%buildroot/%_bindir/ld";
|
||||
fi
|
||||
%if ! 0%{with libalternatives}
|
||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
||||
# Keep older versions of brp-symlink happy
|
||||
%if %{suse_version} < 1310
|
||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
||||
%endif
|
||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
||||
%else
|
||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||
binary=%{_bindir}/ld.gold
|
||||
EOF
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/2.conf <<EOF
|
||||
binary=%{_bindir}/ld.bfd
|
||||
EOF
|
||||
%endif
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
@ -469,35 +496,57 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
||||
%if 0%{!?cross:1}
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%if ! %{with libalternatives}
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.bfd" 2
|
||||
%endif
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%post gold
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.gold" 1
|
||||
%endif
|
||||
|
||||
%post -n libctf0 -p /sbin/ldconfig
|
||||
%post -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
|
||||
%if %{with libalternatives}
|
||||
%pre
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
|
||||
%pre gold
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
%if ! %{with libalternatives}
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%preun gold
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%postun -n libctf0 -p /sbin/ldconfig
|
||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
@ -516,7 +565,13 @@ fi;
|
||||
%dir %{_libdir}/bfd-plugins
|
||||
%{_libdir}/bfd-plugins/libdep.so
|
||||
%{_bindir}/*
|
||||
%if ! 0%{with libalternatives}
|
||||
%ghost %_sysconfdir/alternatives/ld
|
||||
%else
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/2.conf
|
||||
%endif
|
||||
%ifarch %gold_archs
|
||||
%exclude %{_bindir}/gold
|
||||
%exclude %{_bindir}/ld.gold
|
||||
@ -535,6 +590,11 @@ fi;
|
||||
%doc gold/NEWS gold/README
|
||||
%{_bindir}/gold
|
||||
%{_bindir}/ld.gold
|
||||
%if %{with libalternatives}
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/1.conf
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{!?cross:1}
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 10 23:16:12 CEST 2021 - Stefan Schubert schubi@suse.de
|
||||
|
||||
- Using libalternatives instead of update-alternatives.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 8 15:09:58 UTC 2021 - Michael Matz <matz@suse.com>
|
||||
|
||||
|
@ -39,6 +39,13 @@ BuildRequires: zlib-devel
|
||||
%endif
|
||||
Version: 2.37
|
||||
Release: 0
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
#
|
||||
# RUN_TESTS
|
||||
%define run_tests %(test ! -f %_sourcedir/RUN_TESTS ; echo $?)
|
||||
@ -110,7 +117,11 @@ Patch90: cross-avr-nesc-as.patch
|
||||
Patch92: cross-avr-omit_section_dynsym.patch
|
||||
Patch93: cross-avr-size.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
|
||||
%description
|
||||
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
|
||||
@ -122,7 +133,11 @@ Summary: The gold linker
|
||||
License: GPL-3.0-or-later
|
||||
Group: Development/Tools/Building
|
||||
Requires: binutils = %{version}-%{release}
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
%if 0%{!?cross:1}
|
||||
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
|
||||
%endif
|
||||
@ -395,12 +410,24 @@ if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
||||
else
|
||||
rm -f "%buildroot/%_bindir/ld";
|
||||
fi
|
||||
%if ! 0%{with libalternatives}
|
||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
||||
# Keep older versions of brp-symlink happy
|
||||
%if %{suse_version} < 1310
|
||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
||||
%endif
|
||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
||||
%else
|
||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||
binary=%{_bindir}/ld.gold
|
||||
EOF
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/2.conf <<EOF
|
||||
binary=%{_bindir}/ld.bfd
|
||||
EOF
|
||||
%endif
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
@ -472,35 +499,57 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
||||
%if 0%{!?cross:1}
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%if ! %{with libalternatives}
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.bfd" 2
|
||||
%endif
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%post gold
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.gold" 1
|
||||
%endif
|
||||
|
||||
%post -n libctf0 -p /sbin/ldconfig
|
||||
%post -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
|
||||
%if %{with libalternatives}
|
||||
%pre
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
|
||||
%pre gold
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
%if ! %{with libalternatives}
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%preun gold
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%postun -n libctf0 -p /sbin/ldconfig
|
||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
@ -519,7 +568,13 @@ fi;
|
||||
%dir %{_libdir}/bfd-plugins
|
||||
%{_libdir}/bfd-plugins/libdep.so
|
||||
%{_bindir}/*
|
||||
%if ! 0%{with libalternatives}
|
||||
%ghost %_sysconfdir/alternatives/ld
|
||||
%else
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/2.conf
|
||||
%endif
|
||||
%ifarch %gold_archs
|
||||
%exclude %{_bindir}/gold
|
||||
%exclude %{_bindir}/ld.gold
|
||||
@ -538,6 +593,11 @@ fi;
|
||||
%doc gold/NEWS gold/README
|
||||
%{_bindir}/gold
|
||||
%{_bindir}/ld.gold
|
||||
%if %{with libalternatives}
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/1.conf
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{!?cross:1}
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 10 23:16:12 CEST 2021 - Stefan Schubert schubi@suse.de
|
||||
|
||||
- Using libalternatives instead of update-alternatives.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 8 15:09:58 UTC 2021 - Michael Matz <matz@suse.com>
|
||||
|
||||
|
@ -39,6 +39,13 @@ BuildRequires: zlib-devel
|
||||
%endif
|
||||
Version: 2.37
|
||||
Release: 0
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
#
|
||||
# RUN_TESTS
|
||||
%define run_tests %(test ! -f %_sourcedir/RUN_TESTS ; echo $?)
|
||||
@ -110,7 +117,11 @@ Patch90: cross-avr-nesc-as.patch
|
||||
Patch92: cross-avr-omit_section_dynsym.patch
|
||||
Patch93: cross-avr-size.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
|
||||
%description
|
||||
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
|
||||
@ -122,7 +133,11 @@ Summary: The gold linker
|
||||
License: GPL-3.0-or-later
|
||||
Group: Development/Tools/Building
|
||||
Requires: binutils = %{version}-%{release}
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
%if 0%{!?cross:1}
|
||||
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
|
||||
%endif
|
||||
@ -395,12 +410,24 @@ if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
||||
else
|
||||
rm -f "%buildroot/%_bindir/ld";
|
||||
fi
|
||||
%if ! 0%{with libalternatives}
|
||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
||||
# Keep older versions of brp-symlink happy
|
||||
%if %{suse_version} < 1310
|
||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
||||
%endif
|
||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
||||
%else
|
||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||
binary=%{_bindir}/ld.gold
|
||||
EOF
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/2.conf <<EOF
|
||||
binary=%{_bindir}/ld.bfd
|
||||
EOF
|
||||
%endif
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
@ -472,35 +499,57 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
||||
%if 0%{!?cross:1}
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%if ! %{with libalternatives}
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.bfd" 2
|
||||
%endif
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%post gold
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.gold" 1
|
||||
%endif
|
||||
|
||||
%post -n libctf0 -p /sbin/ldconfig
|
||||
%post -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
|
||||
%if %{with libalternatives}
|
||||
%pre
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
|
||||
%pre gold
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
%if ! %{with libalternatives}
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%preun gold
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%postun -n libctf0 -p /sbin/ldconfig
|
||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
@ -519,7 +568,13 @@ fi;
|
||||
%dir %{_libdir}/bfd-plugins
|
||||
%{_libdir}/bfd-plugins/libdep.so
|
||||
%{_bindir}/*
|
||||
%if ! 0%{with libalternatives}
|
||||
%ghost %_sysconfdir/alternatives/ld
|
||||
%else
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/2.conf
|
||||
%endif
|
||||
%ifarch %gold_archs
|
||||
%exclude %{_bindir}/gold
|
||||
%exclude %{_bindir}/ld.gold
|
||||
@ -538,6 +593,11 @@ fi;
|
||||
%doc gold/NEWS gold/README
|
||||
%{_bindir}/gold
|
||||
%{_bindir}/ld.gold
|
||||
%if %{with libalternatives}
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/1.conf
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{!?cross:1}
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 10 23:16:12 CEST 2021 - Stefan Schubert schubi@suse.de
|
||||
|
||||
- Using libalternatives instead of update-alternatives.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 8 15:09:58 UTC 2021 - Michael Matz <matz@suse.com>
|
||||
|
||||
|
@ -39,6 +39,13 @@ BuildRequires: zlib-devel
|
||||
%endif
|
||||
Version: 2.37
|
||||
Release: 0
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
#
|
||||
# RUN_TESTS
|
||||
%define run_tests %(test ! -f %_sourcedir/RUN_TESTS ; echo $?)
|
||||
@ -110,7 +117,11 @@ Patch90: cross-avr-nesc-as.patch
|
||||
Patch92: cross-avr-omit_section_dynsym.patch
|
||||
Patch93: cross-avr-size.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
|
||||
%description
|
||||
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
|
||||
@ -122,7 +133,11 @@ Summary: The gold linker
|
||||
License: GPL-3.0-or-later
|
||||
Group: Development/Tools/Building
|
||||
Requires: binutils = %{version}-%{release}
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
%if 0%{!?cross:1}
|
||||
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
|
||||
%endif
|
||||
@ -395,12 +410,24 @@ if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
||||
else
|
||||
rm -f "%buildroot/%_bindir/ld";
|
||||
fi
|
||||
%if ! 0%{with libalternatives}
|
||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
||||
# Keep older versions of brp-symlink happy
|
||||
%if %{suse_version} < 1310
|
||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
||||
%endif
|
||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
||||
%else
|
||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||
binary=%{_bindir}/ld.gold
|
||||
EOF
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/2.conf <<EOF
|
||||
binary=%{_bindir}/ld.bfd
|
||||
EOF
|
||||
%endif
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
@ -472,35 +499,57 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
||||
%if 0%{!?cross:1}
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%if ! %{with libalternatives}
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.bfd" 2
|
||||
%endif
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%post gold
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.gold" 1
|
||||
%endif
|
||||
|
||||
%post -n libctf0 -p /sbin/ldconfig
|
||||
%post -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
|
||||
%if %{with libalternatives}
|
||||
%pre
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
|
||||
%pre gold
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
%if ! %{with libalternatives}
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%preun gold
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%postun -n libctf0 -p /sbin/ldconfig
|
||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
@ -519,7 +568,13 @@ fi;
|
||||
%dir %{_libdir}/bfd-plugins
|
||||
%{_libdir}/bfd-plugins/libdep.so
|
||||
%{_bindir}/*
|
||||
%if ! 0%{with libalternatives}
|
||||
%ghost %_sysconfdir/alternatives/ld
|
||||
%else
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/2.conf
|
||||
%endif
|
||||
%ifarch %gold_archs
|
||||
%exclude %{_bindir}/gold
|
||||
%exclude %{_bindir}/ld.gold
|
||||
@ -538,6 +593,11 @@ fi;
|
||||
%doc gold/NEWS gold/README
|
||||
%{_bindir}/gold
|
||||
%{_bindir}/ld.gold
|
||||
%if %{with libalternatives}
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/1.conf
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{!?cross:1}
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 10 23:16:12 CEST 2021 - Stefan Schubert schubi@suse.de
|
||||
|
||||
- Using libalternatives instead of update-alternatives.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 8 15:09:58 UTC 2021 - Michael Matz <matz@suse.com>
|
||||
|
||||
|
@ -39,6 +39,13 @@ BuildRequires: zlib-devel
|
||||
%endif
|
||||
Version: 2.37
|
||||
Release: 0
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
#
|
||||
# RUN_TESTS
|
||||
%define run_tests %(test ! -f %_sourcedir/RUN_TESTS ; echo $?)
|
||||
@ -110,7 +117,11 @@ Patch90: cross-avr-nesc-as.patch
|
||||
Patch92: cross-avr-omit_section_dynsym.patch
|
||||
Patch93: cross-avr-size.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
|
||||
%description
|
||||
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
|
||||
@ -122,7 +133,11 @@ Summary: The gold linker
|
||||
License: GPL-3.0-or-later
|
||||
Group: Development/Tools/Building
|
||||
Requires: binutils = %{version}-%{release}
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
%if 0%{!?cross:1}
|
||||
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
|
||||
%endif
|
||||
@ -395,12 +410,24 @@ if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
||||
else
|
||||
rm -f "%buildroot/%_bindir/ld";
|
||||
fi
|
||||
%if ! 0%{with libalternatives}
|
||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
||||
# Keep older versions of brp-symlink happy
|
||||
%if %{suse_version} < 1310
|
||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
||||
%endif
|
||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
||||
%else
|
||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||
binary=%{_bindir}/ld.gold
|
||||
EOF
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/2.conf <<EOF
|
||||
binary=%{_bindir}/ld.bfd
|
||||
EOF
|
||||
%endif
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
@ -472,35 +499,57 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
||||
%if 0%{!?cross:1}
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%if ! %{with libalternatives}
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.bfd" 2
|
||||
%endif
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%post gold
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.gold" 1
|
||||
%endif
|
||||
|
||||
%post -n libctf0 -p /sbin/ldconfig
|
||||
%post -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
|
||||
%if %{with libalternatives}
|
||||
%pre
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
|
||||
%pre gold
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
%if ! %{with libalternatives}
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%preun gold
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%postun -n libctf0 -p /sbin/ldconfig
|
||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
@ -519,7 +568,13 @@ fi;
|
||||
%dir %{_libdir}/bfd-plugins
|
||||
%{_libdir}/bfd-plugins/libdep.so
|
||||
%{_bindir}/*
|
||||
%if ! 0%{with libalternatives}
|
||||
%ghost %_sysconfdir/alternatives/ld
|
||||
%else
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/2.conf
|
||||
%endif
|
||||
%ifarch %gold_archs
|
||||
%exclude %{_bindir}/gold
|
||||
%exclude %{_bindir}/ld.gold
|
||||
@ -538,6 +593,11 @@ fi;
|
||||
%doc gold/NEWS gold/README
|
||||
%{_bindir}/gold
|
||||
%{_bindir}/ld.gold
|
||||
%if %{with libalternatives}
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/1.conf
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{!?cross:1}
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 10 23:16:12 CEST 2021 - Stefan Schubert schubi@suse.de
|
||||
|
||||
- Using libalternatives instead of update-alternatives.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 8 15:09:58 UTC 2021 - Michael Matz <matz@suse.com>
|
||||
|
||||
|
@ -39,6 +39,13 @@ BuildRequires: zlib-devel
|
||||
%endif
|
||||
Version: 2.37
|
||||
Release: 0
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
#
|
||||
# RUN_TESTS
|
||||
%define run_tests %(test ! -f %_sourcedir/RUN_TESTS ; echo $?)
|
||||
@ -110,7 +117,11 @@ Patch90: cross-avr-nesc-as.patch
|
||||
Patch92: cross-avr-omit_section_dynsym.patch
|
||||
Patch93: cross-avr-size.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
|
||||
%description
|
||||
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
|
||||
@ -122,7 +133,11 @@ Summary: The gold linker
|
||||
License: GPL-3.0-or-later
|
||||
Group: Development/Tools/Building
|
||||
Requires: binutils = %{version}-%{release}
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
%if 0%{!?cross:1}
|
||||
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
|
||||
%endif
|
||||
@ -395,12 +410,24 @@ if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
||||
else
|
||||
rm -f "%buildroot/%_bindir/ld";
|
||||
fi
|
||||
%if ! 0%{with libalternatives}
|
||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
||||
# Keep older versions of brp-symlink happy
|
||||
%if %{suse_version} < 1310
|
||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
||||
%endif
|
||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
||||
%else
|
||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||
binary=%{_bindir}/ld.gold
|
||||
EOF
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/2.conf <<EOF
|
||||
binary=%{_bindir}/ld.bfd
|
||||
EOF
|
||||
%endif
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
@ -472,35 +499,57 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
||||
%if 0%{!?cross:1}
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%if ! %{with libalternatives}
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.bfd" 2
|
||||
%endif
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%post gold
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.gold" 1
|
||||
%endif
|
||||
|
||||
%post -n libctf0 -p /sbin/ldconfig
|
||||
%post -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
|
||||
%if %{with libalternatives}
|
||||
%pre
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
|
||||
%pre gold
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
%if ! %{with libalternatives}
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%preun gold
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%postun -n libctf0 -p /sbin/ldconfig
|
||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
@ -519,7 +568,13 @@ fi;
|
||||
%dir %{_libdir}/bfd-plugins
|
||||
%{_libdir}/bfd-plugins/libdep.so
|
||||
%{_bindir}/*
|
||||
%if ! 0%{with libalternatives}
|
||||
%ghost %_sysconfdir/alternatives/ld
|
||||
%else
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/2.conf
|
||||
%endif
|
||||
%ifarch %gold_archs
|
||||
%exclude %{_bindir}/gold
|
||||
%exclude %{_bindir}/ld.gold
|
||||
@ -538,6 +593,11 @@ fi;
|
||||
%doc gold/NEWS gold/README
|
||||
%{_bindir}/gold
|
||||
%{_bindir}/ld.gold
|
||||
%if %{with libalternatives}
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/1.conf
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{!?cross:1}
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 10 23:16:12 CEST 2021 - Stefan Schubert schubi@suse.de
|
||||
|
||||
- Using libalternatives instead of update-alternatives.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 8 15:09:58 UTC 2021 - Michael Matz <matz@suse.com>
|
||||
|
||||
|
@ -39,6 +39,13 @@ BuildRequires: zlib-devel
|
||||
%endif
|
||||
Version: 2.37
|
||||
Release: 0
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
#
|
||||
# RUN_TESTS
|
||||
%define run_tests %(test ! -f %_sourcedir/RUN_TESTS ; echo $?)
|
||||
@ -110,7 +117,11 @@ Patch90: cross-avr-nesc-as.patch
|
||||
Patch92: cross-avr-omit_section_dynsym.patch
|
||||
Patch93: cross-avr-size.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
|
||||
%description
|
||||
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
|
||||
@ -122,7 +133,11 @@ Summary: The gold linker
|
||||
License: GPL-3.0-or-later
|
||||
Group: Development/Tools/Building
|
||||
Requires: binutils = %{version}-%{release}
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
%if 0%{!?cross:1}
|
||||
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
|
||||
%endif
|
||||
@ -395,12 +410,24 @@ if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
||||
else
|
||||
rm -f "%buildroot/%_bindir/ld";
|
||||
fi
|
||||
%if ! 0%{with libalternatives}
|
||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
||||
# Keep older versions of brp-symlink happy
|
||||
%if %{suse_version} < 1310
|
||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
||||
%endif
|
||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
||||
%else
|
||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||
binary=%{_bindir}/ld.gold
|
||||
EOF
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/2.conf <<EOF
|
||||
binary=%{_bindir}/ld.bfd
|
||||
EOF
|
||||
%endif
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
@ -472,35 +499,57 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
||||
%if 0%{!?cross:1}
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%if ! %{with libalternatives}
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.bfd" 2
|
||||
%endif
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%post gold
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.gold" 1
|
||||
%endif
|
||||
|
||||
%post -n libctf0 -p /sbin/ldconfig
|
||||
%post -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
|
||||
%if %{with libalternatives}
|
||||
%pre
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
|
||||
%pre gold
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
%if ! %{with libalternatives}
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%preun gold
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%postun -n libctf0 -p /sbin/ldconfig
|
||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
@ -519,7 +568,13 @@ fi;
|
||||
%dir %{_libdir}/bfd-plugins
|
||||
%{_libdir}/bfd-plugins/libdep.so
|
||||
%{_bindir}/*
|
||||
%if ! 0%{with libalternatives}
|
||||
%ghost %_sysconfdir/alternatives/ld
|
||||
%else
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/2.conf
|
||||
%endif
|
||||
%ifarch %gold_archs
|
||||
%exclude %{_bindir}/gold
|
||||
%exclude %{_bindir}/ld.gold
|
||||
@ -538,6 +593,11 @@ fi;
|
||||
%doc gold/NEWS gold/README
|
||||
%{_bindir}/gold
|
||||
%{_bindir}/ld.gold
|
||||
%if %{with libalternatives}
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/1.conf
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{!?cross:1}
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 10 23:16:12 CEST 2021 - Stefan Schubert schubi@suse.de
|
||||
|
||||
- Using libalternatives instead of update-alternatives.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 8 15:09:58 UTC 2021 - Michael Matz <matz@suse.com>
|
||||
|
||||
|
@ -39,6 +39,13 @@ BuildRequires: zlib-devel
|
||||
%endif
|
||||
Version: 2.37
|
||||
Release: 0
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
#
|
||||
# RUN_TESTS
|
||||
%define run_tests %(test ! -f %_sourcedir/RUN_TESTS ; echo $?)
|
||||
@ -110,7 +117,11 @@ Patch90: cross-avr-nesc-as.patch
|
||||
Patch92: cross-avr-omit_section_dynsym.patch
|
||||
Patch93: cross-avr-size.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
|
||||
%description
|
||||
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
|
||||
@ -122,7 +133,11 @@ Summary: The gold linker
|
||||
License: GPL-3.0-or-later
|
||||
Group: Development/Tools/Building
|
||||
Requires: binutils = %{version}-%{release}
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
%if 0%{!?cross:1}
|
||||
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
|
||||
%endif
|
||||
@ -395,12 +410,24 @@ if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
||||
else
|
||||
rm -f "%buildroot/%_bindir/ld";
|
||||
fi
|
||||
%if ! 0%{with libalternatives}
|
||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
||||
# Keep older versions of brp-symlink happy
|
||||
%if %{suse_version} < 1310
|
||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
||||
%endif
|
||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
||||
%else
|
||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||
binary=%{_bindir}/ld.gold
|
||||
EOF
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/2.conf <<EOF
|
||||
binary=%{_bindir}/ld.bfd
|
||||
EOF
|
||||
%endif
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
@ -472,35 +499,57 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
||||
%if 0%{!?cross:1}
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%if ! %{with libalternatives}
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.bfd" 2
|
||||
%endif
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%post gold
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.gold" 1
|
||||
%endif
|
||||
|
||||
%post -n libctf0 -p /sbin/ldconfig
|
||||
%post -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
|
||||
%if %{with libalternatives}
|
||||
%pre
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
|
||||
%pre gold
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
%if ! %{with libalternatives}
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%preun gold
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%postun -n libctf0 -p /sbin/ldconfig
|
||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
@ -519,7 +568,13 @@ fi;
|
||||
%dir %{_libdir}/bfd-plugins
|
||||
%{_libdir}/bfd-plugins/libdep.so
|
||||
%{_bindir}/*
|
||||
%if ! 0%{with libalternatives}
|
||||
%ghost %_sysconfdir/alternatives/ld
|
||||
%else
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/2.conf
|
||||
%endif
|
||||
%ifarch %gold_archs
|
||||
%exclude %{_bindir}/gold
|
||||
%exclude %{_bindir}/ld.gold
|
||||
@ -538,6 +593,11 @@ fi;
|
||||
%doc gold/NEWS gold/README
|
||||
%{_bindir}/gold
|
||||
%{_bindir}/ld.gold
|
||||
%if %{with libalternatives}
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/1.conf
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{!?cross:1}
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 10 23:16:12 CEST 2021 - Stefan Schubert schubi@suse.de
|
||||
|
||||
- Using libalternatives instead of update-alternatives.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 8 15:09:58 UTC 2021 - Michael Matz <matz@suse.com>
|
||||
|
||||
|
@ -39,6 +39,13 @@ BuildRequires: zlib-devel
|
||||
%endif
|
||||
Version: 2.37
|
||||
Release: 0
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
#
|
||||
# RUN_TESTS
|
||||
%define run_tests %(test ! -f %_sourcedir/RUN_TESTS ; echo $?)
|
||||
@ -110,7 +117,11 @@ Patch90: cross-avr-nesc-as.patch
|
||||
Patch92: cross-avr-omit_section_dynsym.patch
|
||||
Patch93: cross-avr-size.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
|
||||
%description
|
||||
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
|
||||
@ -122,7 +133,11 @@ Summary: The gold linker
|
||||
License: GPL-3.0-or-later
|
||||
Group: Development/Tools/Building
|
||||
Requires: binutils = %{version}-%{release}
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
%if 0%{!?cross:1}
|
||||
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
|
||||
%endif
|
||||
@ -395,12 +410,24 @@ if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
||||
else
|
||||
rm -f "%buildroot/%_bindir/ld";
|
||||
fi
|
||||
%if ! 0%{with libalternatives}
|
||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
||||
# Keep older versions of brp-symlink happy
|
||||
%if %{suse_version} < 1310
|
||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
||||
%endif
|
||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
||||
%else
|
||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||
binary=%{_bindir}/ld.gold
|
||||
EOF
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/2.conf <<EOF
|
||||
binary=%{_bindir}/ld.bfd
|
||||
EOF
|
||||
%endif
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
@ -472,35 +499,57 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
||||
%if 0%{!?cross:1}
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%if ! %{with libalternatives}
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.bfd" 2
|
||||
%endif
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%post gold
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.gold" 1
|
||||
%endif
|
||||
|
||||
%post -n libctf0 -p /sbin/ldconfig
|
||||
%post -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
|
||||
%if %{with libalternatives}
|
||||
%pre
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
|
||||
%pre gold
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
%if ! %{with libalternatives}
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%preun gold
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%postun -n libctf0 -p /sbin/ldconfig
|
||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
@ -519,7 +568,13 @@ fi;
|
||||
%dir %{_libdir}/bfd-plugins
|
||||
%{_libdir}/bfd-plugins/libdep.so
|
||||
%{_bindir}/*
|
||||
%if ! 0%{with libalternatives}
|
||||
%ghost %_sysconfdir/alternatives/ld
|
||||
%else
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/2.conf
|
||||
%endif
|
||||
%ifarch %gold_archs
|
||||
%exclude %{_bindir}/gold
|
||||
%exclude %{_bindir}/ld.gold
|
||||
@ -538,6 +593,11 @@ fi;
|
||||
%doc gold/NEWS gold/README
|
||||
%{_bindir}/gold
|
||||
%{_bindir}/ld.gold
|
||||
%if %{with libalternatives}
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/1.conf
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{!?cross:1}
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 10 23:16:12 CEST 2021 - Stefan Schubert schubi@suse.de
|
||||
|
||||
- Using libalternatives instead of update-alternatives.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 8 15:09:58 UTC 2021 - Michael Matz <matz@suse.com>
|
||||
|
||||
|
@ -39,6 +39,13 @@ BuildRequires: zlib-devel
|
||||
%endif
|
||||
Version: 2.37
|
||||
Release: 0
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
#
|
||||
# RUN_TESTS
|
||||
%define run_tests %(test ! -f %_sourcedir/RUN_TESTS ; echo $?)
|
||||
@ -110,7 +117,11 @@ Patch90: cross-avr-nesc-as.patch
|
||||
Patch92: cross-avr-omit_section_dynsym.patch
|
||||
Patch93: cross-avr-size.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
|
||||
%description
|
||||
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
|
||||
@ -122,7 +133,11 @@ Summary: The gold linker
|
||||
License: GPL-3.0-or-later
|
||||
Group: Development/Tools/Building
|
||||
Requires: binutils = %{version}-%{release}
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
%if 0%{!?cross:1}
|
||||
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
|
||||
%endif
|
||||
@ -395,12 +410,24 @@ if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
||||
else
|
||||
rm -f "%buildroot/%_bindir/ld";
|
||||
fi
|
||||
%if ! 0%{with libalternatives}
|
||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
||||
# Keep older versions of brp-symlink happy
|
||||
%if %{suse_version} < 1310
|
||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
||||
%endif
|
||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
||||
%else
|
||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||
binary=%{_bindir}/ld.gold
|
||||
EOF
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/2.conf <<EOF
|
||||
binary=%{_bindir}/ld.bfd
|
||||
EOF
|
||||
%endif
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
@ -472,35 +499,57 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
||||
%if 0%{!?cross:1}
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%if ! %{with libalternatives}
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.bfd" 2
|
||||
%endif
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%post gold
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.gold" 1
|
||||
%endif
|
||||
|
||||
%post -n libctf0 -p /sbin/ldconfig
|
||||
%post -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
|
||||
%if %{with libalternatives}
|
||||
%pre
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
|
||||
%pre gold
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
%if ! %{with libalternatives}
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%preun gold
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%postun -n libctf0 -p /sbin/ldconfig
|
||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
@ -519,7 +568,13 @@ fi;
|
||||
%dir %{_libdir}/bfd-plugins
|
||||
%{_libdir}/bfd-plugins/libdep.so
|
||||
%{_bindir}/*
|
||||
%if ! 0%{with libalternatives}
|
||||
%ghost %_sysconfdir/alternatives/ld
|
||||
%else
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/2.conf
|
||||
%endif
|
||||
%ifarch %gold_archs
|
||||
%exclude %{_bindir}/gold
|
||||
%exclude %{_bindir}/ld.gold
|
||||
@ -538,6 +593,11 @@ fi;
|
||||
%doc gold/NEWS gold/README
|
||||
%{_bindir}/gold
|
||||
%{_bindir}/ld.gold
|
||||
%if %{with libalternatives}
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/1.conf
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{!?cross:1}
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 10 23:16:12 CEST 2021 - Stefan Schubert schubi@suse.de
|
||||
|
||||
- Using libalternatives instead of update-alternatives.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 8 15:09:58 UTC 2021 - Michael Matz <matz@suse.com>
|
||||
|
||||
|
@ -39,6 +39,13 @@ BuildRequires: zlib-devel
|
||||
%endif
|
||||
Version: 2.37
|
||||
Release: 0
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
#
|
||||
# RUN_TESTS
|
||||
%define run_tests %(test ! -f %_sourcedir/RUN_TESTS ; echo $?)
|
||||
@ -110,7 +117,11 @@ Patch90: cross-avr-nesc-as.patch
|
||||
Patch92: cross-avr-omit_section_dynsym.patch
|
||||
Patch93: cross-avr-size.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
|
||||
%description
|
||||
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
|
||||
@ -122,7 +133,11 @@ Summary: The gold linker
|
||||
License: GPL-3.0-or-later
|
||||
Group: Development/Tools/Building
|
||||
Requires: binutils = %{version}-%{release}
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
%if 0%{!?cross:1}
|
||||
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
|
||||
%endif
|
||||
@ -395,12 +410,24 @@ if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
||||
else
|
||||
rm -f "%buildroot/%_bindir/ld";
|
||||
fi
|
||||
%if ! 0%{with libalternatives}
|
||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
||||
# Keep older versions of brp-symlink happy
|
||||
%if %{suse_version} < 1310
|
||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
||||
%endif
|
||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
||||
%else
|
||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||
binary=%{_bindir}/ld.gold
|
||||
EOF
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/2.conf <<EOF
|
||||
binary=%{_bindir}/ld.bfd
|
||||
EOF
|
||||
%endif
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
@ -472,35 +499,57 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
||||
%if 0%{!?cross:1}
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%if ! %{with libalternatives}
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.bfd" 2
|
||||
%endif
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%post gold
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.gold" 1
|
||||
%endif
|
||||
|
||||
%post -n libctf0 -p /sbin/ldconfig
|
||||
%post -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
|
||||
%if %{with libalternatives}
|
||||
%pre
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
|
||||
%pre gold
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
%if ! %{with libalternatives}
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%preun gold
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%postun -n libctf0 -p /sbin/ldconfig
|
||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
@ -519,7 +568,13 @@ fi;
|
||||
%dir %{_libdir}/bfd-plugins
|
||||
%{_libdir}/bfd-plugins/libdep.so
|
||||
%{_bindir}/*
|
||||
%if ! 0%{with libalternatives}
|
||||
%ghost %_sysconfdir/alternatives/ld
|
||||
%else
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/2.conf
|
||||
%endif
|
||||
%ifarch %gold_archs
|
||||
%exclude %{_bindir}/gold
|
||||
%exclude %{_bindir}/ld.gold
|
||||
@ -538,6 +593,11 @@ fi;
|
||||
%doc gold/NEWS gold/README
|
||||
%{_bindir}/gold
|
||||
%{_bindir}/ld.gold
|
||||
%if %{with libalternatives}
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/1.conf
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{!?cross:1}
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 10 23:16:12 CEST 2021 - Stefan Schubert schubi@suse.de
|
||||
|
||||
- Using libalternatives instead of update-alternatives.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 8 15:09:58 UTC 2021 - Michael Matz <matz@suse.com>
|
||||
|
||||
|
@ -39,6 +39,13 @@ BuildRequires: zlib-devel
|
||||
%endif
|
||||
Version: 2.37
|
||||
Release: 0
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
#
|
||||
# RUN_TESTS
|
||||
%define run_tests %(test ! -f %_sourcedir/RUN_TESTS ; echo $?)
|
||||
@ -110,7 +117,11 @@ Patch90: cross-avr-nesc-as.patch
|
||||
Patch92: cross-avr-omit_section_dynsym.patch
|
||||
Patch93: cross-avr-size.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
|
||||
%description
|
||||
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
|
||||
@ -122,7 +133,11 @@ Summary: The gold linker
|
||||
License: GPL-3.0-or-later
|
||||
Group: Development/Tools/Building
|
||||
Requires: binutils = %{version}-%{release}
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
%if 0%{!?cross:1}
|
||||
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
|
||||
%endif
|
||||
@ -395,12 +410,24 @@ if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
||||
else
|
||||
rm -f "%buildroot/%_bindir/ld";
|
||||
fi
|
||||
%if ! 0%{with libalternatives}
|
||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
||||
# Keep older versions of brp-symlink happy
|
||||
%if %{suse_version} < 1310
|
||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
||||
%endif
|
||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
||||
%else
|
||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||
binary=%{_bindir}/ld.gold
|
||||
EOF
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/2.conf <<EOF
|
||||
binary=%{_bindir}/ld.bfd
|
||||
EOF
|
||||
%endif
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
@ -472,35 +499,57 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
||||
%if 0%{!?cross:1}
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%if ! %{with libalternatives}
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.bfd" 2
|
||||
%endif
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%post gold
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.gold" 1
|
||||
%endif
|
||||
|
||||
%post -n libctf0 -p /sbin/ldconfig
|
||||
%post -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
|
||||
%if %{with libalternatives}
|
||||
%pre
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
|
||||
%pre gold
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
%if ! %{with libalternatives}
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%preun gold
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%postun -n libctf0 -p /sbin/ldconfig
|
||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
@ -519,7 +568,13 @@ fi;
|
||||
%dir %{_libdir}/bfd-plugins
|
||||
%{_libdir}/bfd-plugins/libdep.so
|
||||
%{_bindir}/*
|
||||
%if ! 0%{with libalternatives}
|
||||
%ghost %_sysconfdir/alternatives/ld
|
||||
%else
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/2.conf
|
||||
%endif
|
||||
%ifarch %gold_archs
|
||||
%exclude %{_bindir}/gold
|
||||
%exclude %{_bindir}/ld.gold
|
||||
@ -538,6 +593,11 @@ fi;
|
||||
%doc gold/NEWS gold/README
|
||||
%{_bindir}/gold
|
||||
%{_bindir}/ld.gold
|
||||
%if %{with libalternatives}
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/1.conf
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{!?cross:1}
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 10 23:16:12 CEST 2021 - Stefan Schubert schubi@suse.de
|
||||
|
||||
- Using libalternatives instead of update-alternatives.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 8 15:09:58 UTC 2021 - Michael Matz <matz@suse.com>
|
||||
|
||||
|
@ -39,6 +39,13 @@ BuildRequires: zlib-devel
|
||||
%endif
|
||||
Version: 2.37
|
||||
Release: 0
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
#
|
||||
# RUN_TESTS
|
||||
%define run_tests %(test ! -f %_sourcedir/RUN_TESTS ; echo $?)
|
||||
@ -110,7 +117,11 @@ Patch90: cross-avr-nesc-as.patch
|
||||
Patch92: cross-avr-omit_section_dynsym.patch
|
||||
Patch93: cross-avr-size.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
|
||||
%description
|
||||
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
|
||||
@ -122,7 +133,11 @@ Summary: The gold linker
|
||||
License: GPL-3.0-or-later
|
||||
Group: Development/Tools/Building
|
||||
Requires: binutils = %{version}-%{release}
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
%if 0%{!?cross:1}
|
||||
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
|
||||
%endif
|
||||
@ -395,12 +410,24 @@ if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
||||
else
|
||||
rm -f "%buildroot/%_bindir/ld";
|
||||
fi
|
||||
%if ! 0%{with libalternatives}
|
||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
||||
# Keep older versions of brp-symlink happy
|
||||
%if %{suse_version} < 1310
|
||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
||||
%endif
|
||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
||||
%else
|
||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||
binary=%{_bindir}/ld.gold
|
||||
EOF
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/2.conf <<EOF
|
||||
binary=%{_bindir}/ld.bfd
|
||||
EOF
|
||||
%endif
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
@ -472,35 +499,57 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
||||
%if 0%{!?cross:1}
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%if ! %{with libalternatives}
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.bfd" 2
|
||||
%endif
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%post gold
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.gold" 1
|
||||
%endif
|
||||
|
||||
%post -n libctf0 -p /sbin/ldconfig
|
||||
%post -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
|
||||
%if %{with libalternatives}
|
||||
%pre
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
|
||||
%pre gold
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
%if ! %{with libalternatives}
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%preun gold
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%postun -n libctf0 -p /sbin/ldconfig
|
||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
@ -519,7 +568,13 @@ fi;
|
||||
%dir %{_libdir}/bfd-plugins
|
||||
%{_libdir}/bfd-plugins/libdep.so
|
||||
%{_bindir}/*
|
||||
%if ! 0%{with libalternatives}
|
||||
%ghost %_sysconfdir/alternatives/ld
|
||||
%else
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/2.conf
|
||||
%endif
|
||||
%ifarch %gold_archs
|
||||
%exclude %{_bindir}/gold
|
||||
%exclude %{_bindir}/ld.gold
|
||||
@ -538,6 +593,11 @@ fi;
|
||||
%doc gold/NEWS gold/README
|
||||
%{_bindir}/gold
|
||||
%{_bindir}/ld.gold
|
||||
%if %{with libalternatives}
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/1.conf
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{!?cross:1}
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 10 23:16:12 CEST 2021 - Stefan Schubert schubi@suse.de
|
||||
|
||||
- Using libalternatives instead of update-alternatives.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 8 15:09:58 UTC 2021 - Michael Matz <matz@suse.com>
|
||||
|
||||
|
@ -39,6 +39,13 @@ BuildRequires: zlib-devel
|
||||
%endif
|
||||
Version: 2.37
|
||||
Release: 0
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
#
|
||||
# RUN_TESTS
|
||||
%define run_tests %(test ! -f %_sourcedir/RUN_TESTS ; echo $?)
|
||||
@ -110,7 +117,11 @@ Patch90: cross-avr-nesc-as.patch
|
||||
Patch92: cross-avr-omit_section_dynsym.patch
|
||||
Patch93: cross-avr-size.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
|
||||
%description
|
||||
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
|
||||
@ -122,7 +133,11 @@ Summary: The gold linker
|
||||
License: GPL-3.0-or-later
|
||||
Group: Development/Tools/Building
|
||||
Requires: binutils = %{version}-%{release}
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
%if 0%{!?cross:1}
|
||||
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
|
||||
%endif
|
||||
@ -395,12 +410,24 @@ if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
||||
else
|
||||
rm -f "%buildroot/%_bindir/ld";
|
||||
fi
|
||||
%if ! 0%{with libalternatives}
|
||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
||||
# Keep older versions of brp-symlink happy
|
||||
%if %{suse_version} < 1310
|
||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
||||
%endif
|
||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
||||
%else
|
||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||
binary=%{_bindir}/ld.gold
|
||||
EOF
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/2.conf <<EOF
|
||||
binary=%{_bindir}/ld.bfd
|
||||
EOF
|
||||
%endif
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
@ -472,35 +499,57 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
||||
%if 0%{!?cross:1}
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%if ! %{with libalternatives}
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.bfd" 2
|
||||
%endif
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%post gold
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.gold" 1
|
||||
%endif
|
||||
|
||||
%post -n libctf0 -p /sbin/ldconfig
|
||||
%post -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
|
||||
%if %{with libalternatives}
|
||||
%pre
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
|
||||
%pre gold
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
%if ! %{with libalternatives}
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%preun gold
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%postun -n libctf0 -p /sbin/ldconfig
|
||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
@ -519,7 +568,13 @@ fi;
|
||||
%dir %{_libdir}/bfd-plugins
|
||||
%{_libdir}/bfd-plugins/libdep.so
|
||||
%{_bindir}/*
|
||||
%if ! 0%{with libalternatives}
|
||||
%ghost %_sysconfdir/alternatives/ld
|
||||
%else
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/2.conf
|
||||
%endif
|
||||
%ifarch %gold_archs
|
||||
%exclude %{_bindir}/gold
|
||||
%exclude %{_bindir}/ld.gold
|
||||
@ -538,6 +593,11 @@ fi;
|
||||
%doc gold/NEWS gold/README
|
||||
%{_bindir}/gold
|
||||
%{_bindir}/ld.gold
|
||||
%if %{with libalternatives}
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/1.conf
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{!?cross:1}
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 10 23:16:12 CEST 2021 - Stefan Schubert schubi@suse.de
|
||||
|
||||
- Using libalternatives instead of update-alternatives.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 8 15:09:58 UTC 2021 - Michael Matz <matz@suse.com>
|
||||
|
||||
|
@ -39,6 +39,13 @@ BuildRequires: zlib-devel
|
||||
%endif
|
||||
Version: 2.37
|
||||
Release: 0
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
#
|
||||
# RUN_TESTS
|
||||
%define run_tests %(test ! -f %_sourcedir/RUN_TESTS ; echo $?)
|
||||
@ -110,7 +117,11 @@ Patch90: cross-avr-nesc-as.patch
|
||||
Patch92: cross-avr-omit_section_dynsym.patch
|
||||
Patch93: cross-avr-size.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
|
||||
%description
|
||||
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
|
||||
@ -122,7 +133,11 @@ Summary: The gold linker
|
||||
License: GPL-3.0-or-later
|
||||
Group: Development/Tools/Building
|
||||
Requires: binutils = %{version}-%{release}
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
%if 0%{!?cross:1}
|
||||
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
|
||||
%endif
|
||||
@ -395,12 +410,24 @@ if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
||||
else
|
||||
rm -f "%buildroot/%_bindir/ld";
|
||||
fi
|
||||
%if ! 0%{with libalternatives}
|
||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
||||
# Keep older versions of brp-symlink happy
|
||||
%if %{suse_version} < 1310
|
||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
||||
%endif
|
||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
||||
%else
|
||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||
binary=%{_bindir}/ld.gold
|
||||
EOF
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/2.conf <<EOF
|
||||
binary=%{_bindir}/ld.bfd
|
||||
EOF
|
||||
%endif
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
@ -472,35 +499,57 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
||||
%if 0%{!?cross:1}
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%if ! %{with libalternatives}
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.bfd" 2
|
||||
%endif
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%post gold
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.gold" 1
|
||||
%endif
|
||||
|
||||
%post -n libctf0 -p /sbin/ldconfig
|
||||
%post -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
|
||||
%if %{with libalternatives}
|
||||
%pre
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
|
||||
%pre gold
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
%if ! %{with libalternatives}
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%preun gold
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%postun -n libctf0 -p /sbin/ldconfig
|
||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
@ -519,7 +568,13 @@ fi;
|
||||
%dir %{_libdir}/bfd-plugins
|
||||
%{_libdir}/bfd-plugins/libdep.so
|
||||
%{_bindir}/*
|
||||
%if ! 0%{with libalternatives}
|
||||
%ghost %_sysconfdir/alternatives/ld
|
||||
%else
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/2.conf
|
||||
%endif
|
||||
%ifarch %gold_archs
|
||||
%exclude %{_bindir}/gold
|
||||
%exclude %{_bindir}/ld.gold
|
||||
@ -538,6 +593,11 @@ fi;
|
||||
%doc gold/NEWS gold/README
|
||||
%{_bindir}/gold
|
||||
%{_bindir}/ld.gold
|
||||
%if %{with libalternatives}
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/1.conf
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{!?cross:1}
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 10 23:16:12 CEST 2021 - Stefan Schubert schubi@suse.de
|
||||
|
||||
- Using libalternatives instead of update-alternatives.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 8 15:09:58 UTC 2021 - Michael Matz <matz@suse.com>
|
||||
|
||||
|
@ -39,6 +39,13 @@ BuildRequires: zlib-devel
|
||||
%endif
|
||||
Version: 2.37
|
||||
Release: 0
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
#
|
||||
# RUN_TESTS
|
||||
%define run_tests %(test ! -f %_sourcedir/RUN_TESTS ; echo $?)
|
||||
@ -110,7 +117,11 @@ Patch90: cross-avr-nesc-as.patch
|
||||
Patch92: cross-avr-omit_section_dynsym.patch
|
||||
Patch93: cross-avr-size.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
|
||||
%description
|
||||
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
|
||||
@ -122,7 +133,11 @@ Summary: The gold linker
|
||||
License: GPL-3.0-or-later
|
||||
Group: Development/Tools/Building
|
||||
Requires: binutils = %{version}-%{release}
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
%if 0%{!?cross:1}
|
||||
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
|
||||
%endif
|
||||
@ -395,12 +410,24 @@ if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
||||
else
|
||||
rm -f "%buildroot/%_bindir/ld";
|
||||
fi
|
||||
%if ! 0%{with libalternatives}
|
||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
||||
# Keep older versions of brp-symlink happy
|
||||
%if %{suse_version} < 1310
|
||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
||||
%endif
|
||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
||||
%else
|
||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||
binary=%{_bindir}/ld.gold
|
||||
EOF
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/2.conf <<EOF
|
||||
binary=%{_bindir}/ld.bfd
|
||||
EOF
|
||||
%endif
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
@ -472,35 +499,57 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
||||
%if 0%{!?cross:1}
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%if ! %{with libalternatives}
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.bfd" 2
|
||||
%endif
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%post gold
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.gold" 1
|
||||
%endif
|
||||
|
||||
%post -n libctf0 -p /sbin/ldconfig
|
||||
%post -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
|
||||
%if %{with libalternatives}
|
||||
%pre
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
|
||||
%pre gold
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
%if ! %{with libalternatives}
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%preun gold
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%postun -n libctf0 -p /sbin/ldconfig
|
||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
@ -519,7 +568,13 @@ fi;
|
||||
%dir %{_libdir}/bfd-plugins
|
||||
%{_libdir}/bfd-plugins/libdep.so
|
||||
%{_bindir}/*
|
||||
%if ! 0%{with libalternatives}
|
||||
%ghost %_sysconfdir/alternatives/ld
|
||||
%else
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/2.conf
|
||||
%endif
|
||||
%ifarch %gold_archs
|
||||
%exclude %{_bindir}/gold
|
||||
%exclude %{_bindir}/ld.gold
|
||||
@ -538,6 +593,11 @@ fi;
|
||||
%doc gold/NEWS gold/README
|
||||
%{_bindir}/gold
|
||||
%{_bindir}/ld.gold
|
||||
%if %{with libalternatives}
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/1.conf
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{!?cross:1}
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 10 23:16:12 CEST 2021 - Stefan Schubert schubi@suse.de
|
||||
|
||||
- Using libalternatives instead of update-alternatives.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 8 15:09:58 UTC 2021 - Michael Matz <matz@suse.com>
|
||||
|
||||
|
@ -39,6 +39,13 @@ BuildRequires: zlib-devel
|
||||
%endif
|
||||
Version: 2.37
|
||||
Release: 0
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
#
|
||||
# RUN_TESTS
|
||||
%define run_tests %(test ! -f %_sourcedir/RUN_TESTS ; echo $?)
|
||||
@ -110,7 +117,11 @@ Patch90: cross-avr-nesc-as.patch
|
||||
Patch92: cross-avr-omit_section_dynsym.patch
|
||||
Patch93: cross-avr-size.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
|
||||
%description
|
||||
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
|
||||
@ -122,7 +133,11 @@ Summary: The gold linker
|
||||
License: GPL-3.0-or-later
|
||||
Group: Development/Tools/Building
|
||||
Requires: binutils = %{version}-%{release}
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
%if 0%{!?cross:1}
|
||||
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
|
||||
%endif
|
||||
@ -395,12 +410,24 @@ if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
||||
else
|
||||
rm -f "%buildroot/%_bindir/ld";
|
||||
fi
|
||||
%if ! 0%{with libalternatives}
|
||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
||||
# Keep older versions of brp-symlink happy
|
||||
%if %{suse_version} < 1310
|
||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
||||
%endif
|
||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
||||
%else
|
||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||
binary=%{_bindir}/ld.gold
|
||||
EOF
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/2.conf <<EOF
|
||||
binary=%{_bindir}/ld.bfd
|
||||
EOF
|
||||
%endif
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
@ -472,35 +499,57 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
||||
%if 0%{!?cross:1}
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%if ! %{with libalternatives}
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.bfd" 2
|
||||
%endif
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%post gold
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.gold" 1
|
||||
%endif
|
||||
|
||||
%post -n libctf0 -p /sbin/ldconfig
|
||||
%post -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
|
||||
%if %{with libalternatives}
|
||||
%pre
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
|
||||
%pre gold
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
%if ! %{with libalternatives}
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%preun gold
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%postun -n libctf0 -p /sbin/ldconfig
|
||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
@ -519,7 +568,13 @@ fi;
|
||||
%dir %{_libdir}/bfd-plugins
|
||||
%{_libdir}/bfd-plugins/libdep.so
|
||||
%{_bindir}/*
|
||||
%if ! 0%{with libalternatives}
|
||||
%ghost %_sysconfdir/alternatives/ld
|
||||
%else
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/2.conf
|
||||
%endif
|
||||
%ifarch %gold_archs
|
||||
%exclude %{_bindir}/gold
|
||||
%exclude %{_bindir}/ld.gold
|
||||
@ -538,6 +593,11 @@ fi;
|
||||
%doc gold/NEWS gold/README
|
||||
%{_bindir}/gold
|
||||
%{_bindir}/ld.gold
|
||||
%if %{with libalternatives}
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/1.conf
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{!?cross:1}
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 10 23:16:12 CEST 2021 - Stefan Schubert schubi@suse.de
|
||||
|
||||
- Using libalternatives instead of update-alternatives.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 8 15:09:58 UTC 2021 - Michael Matz <matz@suse.com>
|
||||
|
||||
|
@ -39,6 +39,13 @@ BuildRequires: zlib-devel
|
||||
%endif
|
||||
Version: 2.37
|
||||
Release: 0
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
#
|
||||
# RUN_TESTS
|
||||
%define run_tests %(test ! -f %_sourcedir/RUN_TESTS ; echo $?)
|
||||
@ -110,7 +117,11 @@ Patch90: cross-avr-nesc-as.patch
|
||||
Patch92: cross-avr-omit_section_dynsym.patch
|
||||
Patch93: cross-avr-size.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
|
||||
%description
|
||||
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
|
||||
@ -122,7 +133,11 @@ Summary: The gold linker
|
||||
License: GPL-3.0-or-later
|
||||
Group: Development/Tools/Building
|
||||
Requires: binutils = %{version}-%{release}
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
%if 0%{!?cross:1}
|
||||
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
|
||||
%endif
|
||||
@ -395,12 +410,24 @@ if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
||||
else
|
||||
rm -f "%buildroot/%_bindir/ld";
|
||||
fi
|
||||
%if ! 0%{with libalternatives}
|
||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
||||
# Keep older versions of brp-symlink happy
|
||||
%if %{suse_version} < 1310
|
||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
||||
%endif
|
||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
||||
%else
|
||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||
binary=%{_bindir}/ld.gold
|
||||
EOF
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/2.conf <<EOF
|
||||
binary=%{_bindir}/ld.bfd
|
||||
EOF
|
||||
%endif
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
@ -472,35 +499,57 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
||||
%if 0%{!?cross:1}
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%if ! %{with libalternatives}
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.bfd" 2
|
||||
%endif
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%post gold
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.gold" 1
|
||||
%endif
|
||||
|
||||
%post -n libctf0 -p /sbin/ldconfig
|
||||
%post -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
|
||||
%if %{with libalternatives}
|
||||
%pre
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
|
||||
%pre gold
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
%if ! %{with libalternatives}
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%preun gold
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%postun -n libctf0 -p /sbin/ldconfig
|
||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
@ -519,7 +568,13 @@ fi;
|
||||
%dir %{_libdir}/bfd-plugins
|
||||
%{_libdir}/bfd-plugins/libdep.so
|
||||
%{_bindir}/*
|
||||
%if ! 0%{with libalternatives}
|
||||
%ghost %_sysconfdir/alternatives/ld
|
||||
%else
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/2.conf
|
||||
%endif
|
||||
%ifarch %gold_archs
|
||||
%exclude %{_bindir}/gold
|
||||
%exclude %{_bindir}/ld.gold
|
||||
@ -538,6 +593,11 @@ fi;
|
||||
%doc gold/NEWS gold/README
|
||||
%{_bindir}/gold
|
||||
%{_bindir}/ld.gold
|
||||
%if %{with libalternatives}
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/1.conf
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{!?cross:1}
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 10 23:16:12 CEST 2021 - Stefan Schubert schubi@suse.de
|
||||
|
||||
- Using libalternatives instead of update-alternatives.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 8 15:09:58 UTC 2021 - Michael Matz <matz@suse.com>
|
||||
|
||||
|
@ -39,6 +39,13 @@ BuildRequires: zlib-devel
|
||||
%endif
|
||||
Version: 2.37
|
||||
Release: 0
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
#
|
||||
# RUN_TESTS
|
||||
%define run_tests %(test ! -f %_sourcedir/RUN_TESTS ; echo $?)
|
||||
@ -110,7 +117,11 @@ Patch90: cross-avr-nesc-as.patch
|
||||
Patch92: cross-avr-omit_section_dynsym.patch
|
||||
Patch93: cross-avr-size.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
|
||||
%description
|
||||
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
|
||||
@ -122,7 +133,11 @@ Summary: The gold linker
|
||||
License: GPL-3.0-or-later
|
||||
Group: Development/Tools/Building
|
||||
Requires: binutils = %{version}-%{release}
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
%if 0%{!?cross:1}
|
||||
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
|
||||
%endif
|
||||
@ -395,12 +410,24 @@ if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
||||
else
|
||||
rm -f "%buildroot/%_bindir/ld";
|
||||
fi
|
||||
%if ! 0%{with libalternatives}
|
||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
||||
# Keep older versions of brp-symlink happy
|
||||
%if %{suse_version} < 1310
|
||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
||||
%endif
|
||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
||||
%else
|
||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||
binary=%{_bindir}/ld.gold
|
||||
EOF
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/2.conf <<EOF
|
||||
binary=%{_bindir}/ld.bfd
|
||||
EOF
|
||||
%endif
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
@ -472,35 +499,57 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
||||
%if 0%{!?cross:1}
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%if ! %{with libalternatives}
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.bfd" 2
|
||||
%endif
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%post gold
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.gold" 1
|
||||
%endif
|
||||
|
||||
%post -n libctf0 -p /sbin/ldconfig
|
||||
%post -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
|
||||
%if %{with libalternatives}
|
||||
%pre
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
|
||||
%pre gold
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
%if ! %{with libalternatives}
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%preun gold
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%postun -n libctf0 -p /sbin/ldconfig
|
||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
@ -519,7 +568,13 @@ fi;
|
||||
%dir %{_libdir}/bfd-plugins
|
||||
%{_libdir}/bfd-plugins/libdep.so
|
||||
%{_bindir}/*
|
||||
%if ! 0%{with libalternatives}
|
||||
%ghost %_sysconfdir/alternatives/ld
|
||||
%else
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/2.conf
|
||||
%endif
|
||||
%ifarch %gold_archs
|
||||
%exclude %{_bindir}/gold
|
||||
%exclude %{_bindir}/ld.gold
|
||||
@ -538,6 +593,11 @@ fi;
|
||||
%doc gold/NEWS gold/README
|
||||
%{_bindir}/gold
|
||||
%{_bindir}/ld.gold
|
||||
%if %{with libalternatives}
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/1.conf
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{!?cross:1}
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 10 23:16:12 CEST 2021 - Stefan Schubert schubi@suse.de
|
||||
|
||||
- Using libalternatives instead of update-alternatives.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 8 15:09:58 UTC 2021 - Michael Matz <matz@suse.com>
|
||||
|
||||
|
@ -39,6 +39,13 @@ BuildRequires: zlib-devel
|
||||
%endif
|
||||
Version: 2.37
|
||||
Release: 0
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
#
|
||||
# RUN_TESTS
|
||||
%define run_tests %(test ! -f %_sourcedir/RUN_TESTS ; echo $?)
|
||||
@ -110,7 +117,11 @@ Patch90: cross-avr-nesc-as.patch
|
||||
Patch92: cross-avr-omit_section_dynsym.patch
|
||||
Patch93: cross-avr-size.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
|
||||
%description
|
||||
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
|
||||
@ -122,7 +133,11 @@ Summary: The gold linker
|
||||
License: GPL-3.0-or-later
|
||||
Group: Development/Tools/Building
|
||||
Requires: binutils = %{version}-%{release}
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
%if 0%{!?cross:1}
|
||||
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
|
||||
%endif
|
||||
@ -395,12 +410,24 @@ if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
||||
else
|
||||
rm -f "%buildroot/%_bindir/ld";
|
||||
fi
|
||||
%if ! 0%{with libalternatives}
|
||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
||||
# Keep older versions of brp-symlink happy
|
||||
%if %{suse_version} < 1310
|
||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
||||
%endif
|
||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
||||
%else
|
||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||
binary=%{_bindir}/ld.gold
|
||||
EOF
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/2.conf <<EOF
|
||||
binary=%{_bindir}/ld.bfd
|
||||
EOF
|
||||
%endif
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
@ -472,35 +499,57 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
||||
%if 0%{!?cross:1}
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%if ! %{with libalternatives}
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.bfd" 2
|
||||
%endif
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%post gold
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.gold" 1
|
||||
%endif
|
||||
|
||||
%post -n libctf0 -p /sbin/ldconfig
|
||||
%post -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
|
||||
%if %{with libalternatives}
|
||||
%pre
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
|
||||
%pre gold
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
%if ! %{with libalternatives}
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%preun gold
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%postun -n libctf0 -p /sbin/ldconfig
|
||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
@ -519,7 +568,13 @@ fi;
|
||||
%dir %{_libdir}/bfd-plugins
|
||||
%{_libdir}/bfd-plugins/libdep.so
|
||||
%{_bindir}/*
|
||||
%if ! 0%{with libalternatives}
|
||||
%ghost %_sysconfdir/alternatives/ld
|
||||
%else
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/2.conf
|
||||
%endif
|
||||
%ifarch %gold_archs
|
||||
%exclude %{_bindir}/gold
|
||||
%exclude %{_bindir}/ld.gold
|
||||
@ -538,6 +593,11 @@ fi;
|
||||
%doc gold/NEWS gold/README
|
||||
%{_bindir}/gold
|
||||
%{_bindir}/ld.gold
|
||||
%if %{with libalternatives}
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/1.conf
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{!?cross:1}
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 10 23:16:12 CEST 2021 - Stefan Schubert schubi@suse.de
|
||||
|
||||
- Using libalternatives instead of update-alternatives.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 8 15:09:58 UTC 2021 - Michael Matz <matz@suse.com>
|
||||
|
||||
|
@ -39,6 +39,13 @@ BuildRequires: zlib-devel
|
||||
%endif
|
||||
Version: 2.37
|
||||
Release: 0
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
#
|
||||
# RUN_TESTS
|
||||
%define run_tests %(test ! -f %_sourcedir/RUN_TESTS ; echo $?)
|
||||
@ -110,7 +117,11 @@ Patch90: cross-avr-nesc-as.patch
|
||||
Patch92: cross-avr-omit_section_dynsym.patch
|
||||
Patch93: cross-avr-size.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
|
||||
%description
|
||||
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
|
||||
@ -122,7 +133,11 @@ Summary: The gold linker
|
||||
License: GPL-3.0-or-later
|
||||
Group: Development/Tools/Building
|
||||
Requires: binutils = %{version}-%{release}
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
%if 0%{!?cross:1}
|
||||
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
|
||||
%endif
|
||||
@ -395,12 +410,24 @@ if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
||||
else
|
||||
rm -f "%buildroot/%_bindir/ld";
|
||||
fi
|
||||
%if ! 0%{with libalternatives}
|
||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
||||
# Keep older versions of brp-symlink happy
|
||||
%if %{suse_version} < 1310
|
||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
||||
%endif
|
||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
||||
%else
|
||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||
binary=%{_bindir}/ld.gold
|
||||
EOF
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/2.conf <<EOF
|
||||
binary=%{_bindir}/ld.bfd
|
||||
EOF
|
||||
%endif
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
@ -472,35 +499,57 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
||||
%if 0%{!?cross:1}
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%if ! %{with libalternatives}
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.bfd" 2
|
||||
%endif
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%post gold
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.gold" 1
|
||||
%endif
|
||||
|
||||
%post -n libctf0 -p /sbin/ldconfig
|
||||
%post -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
|
||||
%if %{with libalternatives}
|
||||
%pre
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
|
||||
%pre gold
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
%if ! %{with libalternatives}
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%preun gold
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%postun -n libctf0 -p /sbin/ldconfig
|
||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
@ -519,7 +568,13 @@ fi;
|
||||
%dir %{_libdir}/bfd-plugins
|
||||
%{_libdir}/bfd-plugins/libdep.so
|
||||
%{_bindir}/*
|
||||
%if ! 0%{with libalternatives}
|
||||
%ghost %_sysconfdir/alternatives/ld
|
||||
%else
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/2.conf
|
||||
%endif
|
||||
%ifarch %gold_archs
|
||||
%exclude %{_bindir}/gold
|
||||
%exclude %{_bindir}/ld.gold
|
||||
@ -538,6 +593,11 @@ fi;
|
||||
%doc gold/NEWS gold/README
|
||||
%{_bindir}/gold
|
||||
%{_bindir}/ld.gold
|
||||
%if %{with libalternatives}
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/1.conf
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{!?cross:1}
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 10 23:16:12 CEST 2021 - Stefan Schubert schubi@suse.de
|
||||
|
||||
- Using libalternatives instead of update-alternatives.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 8 15:09:58 UTC 2021 - Michael Matz <matz@suse.com>
|
||||
|
||||
|
@ -39,6 +39,13 @@ BuildRequires: zlib-devel
|
||||
%endif
|
||||
Version: 2.37
|
||||
Release: 0
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
#
|
||||
# RUN_TESTS
|
||||
%define run_tests %(test ! -f %_sourcedir/RUN_TESTS ; echo $?)
|
||||
@ -110,7 +117,11 @@ Patch90: cross-avr-nesc-as.patch
|
||||
Patch92: cross-avr-omit_section_dynsym.patch
|
||||
Patch93: cross-avr-size.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
|
||||
%description
|
||||
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
|
||||
@ -122,7 +133,11 @@ Summary: The gold linker
|
||||
License: GPL-3.0-or-later
|
||||
Group: Development/Tools/Building
|
||||
Requires: binutils = %{version}-%{release}
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
%if 0%{!?cross:1}
|
||||
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
|
||||
%endif
|
||||
@ -395,12 +410,24 @@ if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
||||
else
|
||||
rm -f "%buildroot/%_bindir/ld";
|
||||
fi
|
||||
%if ! 0%{with libalternatives}
|
||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
||||
# Keep older versions of brp-symlink happy
|
||||
%if %{suse_version} < 1310
|
||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
||||
%endif
|
||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
||||
%else
|
||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||
binary=%{_bindir}/ld.gold
|
||||
EOF
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/2.conf <<EOF
|
||||
binary=%{_bindir}/ld.bfd
|
||||
EOF
|
||||
%endif
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
@ -472,35 +499,57 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
||||
%if 0%{!?cross:1}
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%if ! %{with libalternatives}
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.bfd" 2
|
||||
%endif
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%post gold
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.gold" 1
|
||||
%endif
|
||||
|
||||
%post -n libctf0 -p /sbin/ldconfig
|
||||
%post -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
|
||||
%if %{with libalternatives}
|
||||
%pre
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
|
||||
%pre gold
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
%if ! %{with libalternatives}
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%preun gold
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%postun -n libctf0 -p /sbin/ldconfig
|
||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
@ -519,7 +568,13 @@ fi;
|
||||
%dir %{_libdir}/bfd-plugins
|
||||
%{_libdir}/bfd-plugins/libdep.so
|
||||
%{_bindir}/*
|
||||
%if ! 0%{with libalternatives}
|
||||
%ghost %_sysconfdir/alternatives/ld
|
||||
%else
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/2.conf
|
||||
%endif
|
||||
%ifarch %gold_archs
|
||||
%exclude %{_bindir}/gold
|
||||
%exclude %{_bindir}/ld.gold
|
||||
@ -538,6 +593,11 @@ fi;
|
||||
%doc gold/NEWS gold/README
|
||||
%{_bindir}/gold
|
||||
%{_bindir}/ld.gold
|
||||
%if %{with libalternatives}
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/1.conf
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{!?cross:1}
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 10 23:16:12 CEST 2021 - Stefan Schubert schubi@suse.de
|
||||
|
||||
- Using libalternatives instead of update-alternatives.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 8 15:09:58 UTC 2021 - Michael Matz <matz@suse.com>
|
||||
|
||||
|
@ -39,6 +39,13 @@ BuildRequires: zlib-devel
|
||||
%endif
|
||||
Version: 2.37
|
||||
Release: 0
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
#
|
||||
# RUN_TESTS
|
||||
%define run_tests %(test ! -f %_sourcedir/RUN_TESTS ; echo $?)
|
||||
@ -110,7 +117,11 @@ Patch90: cross-avr-nesc-as.patch
|
||||
Patch92: cross-avr-omit_section_dynsym.patch
|
||||
Patch93: cross-avr-size.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
|
||||
%description
|
||||
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
|
||||
@ -122,7 +133,11 @@ Summary: The gold linker
|
||||
License: GPL-3.0-or-later
|
||||
Group: Development/Tools/Building
|
||||
Requires: binutils = %{version}-%{release}
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
%else
|
||||
PreReq: update-alternatives
|
||||
%endif
|
||||
%if 0%{!?cross:1}
|
||||
%define gold_archs %ix86 aarch64 %arm x86_64 ppc ppc64 ppc64le s390x %sparc
|
||||
%endif
|
||||
@ -395,12 +410,24 @@ if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
||||
else
|
||||
rm -f "%buildroot/%_bindir/ld";
|
||||
fi
|
||||
%if ! 0%{with libalternatives}
|
||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
||||
# Keep older versions of brp-symlink happy
|
||||
%if %{suse_version} < 1310
|
||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
||||
%endif
|
||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
||||
%else
|
||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||
binary=%{_bindir}/ld.gold
|
||||
EOF
|
||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/2.conf <<EOF
|
||||
binary=%{_bindir}/ld.bfd
|
||||
EOF
|
||||
%endif
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
||||
@ -472,35 +499,57 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
||||
%if 0%{!?cross:1}
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%if ! %{with libalternatives}
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.bfd" 2
|
||||
%endif
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%post gold
|
||||
"%_sbindir/update-alternatives" --install \
|
||||
"%_bindir/ld" ld "%_bindir/ld.gold" 1
|
||||
%endif
|
||||
|
||||
%post -n libctf0 -p /sbin/ldconfig
|
||||
%post -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
|
||||
%if %{with libalternatives}
|
||||
%pre
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
|
||||
%pre gold
|
||||
# removing old update-alternatives entries
|
||||
if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/as.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz
|
||||
%if ! %{with libalternatives}
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%if ! %{with libalternatives}
|
||||
%preun gold
|
||||
if [ "$1" = 0 ]; then
|
||||
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
|
||||
fi;
|
||||
%endif
|
||||
|
||||
%postun -n libctf0 -p /sbin/ldconfig
|
||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||
@ -519,7 +568,13 @@ fi;
|
||||
%dir %{_libdir}/bfd-plugins
|
||||
%{_libdir}/bfd-plugins/libdep.so
|
||||
%{_bindir}/*
|
||||
%if ! 0%{with libalternatives}
|
||||
%ghost %_sysconfdir/alternatives/ld
|
||||
%else
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/2.conf
|
||||
%endif
|
||||
%ifarch %gold_archs
|
||||
%exclude %{_bindir}/gold
|
||||
%exclude %{_bindir}/ld.gold
|
||||
@ -538,6 +593,11 @@ fi;
|
||||
%doc gold/NEWS gold/README
|
||||
%{_bindir}/gold
|
||||
%{_bindir}/ld.gold
|
||||
%if %{with libalternatives}
|
||||
%dir %{_datadir}/libalternatives
|
||||
%dir %{_datadir}/libalternatives/ld
|
||||
%{_datadir}/libalternatives/ld/1.conf
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if 0%{!?cross:1}
|
||||
|
Loading…
Reference in New Issue
Block a user