SHA256
1
0
forked from pool/binutils

Accepting request 143264 from home:jengelh:branches:devel:gcc

- Implement update-alternatives service for gold

OBS-URL: https://build.opensuse.org/request/show/143264
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/binutils?expand=0&rev=116
This commit is contained in:
Richard Biener 2012-11-28 10:59:15 +00:00 committed by Git OBS Bridge
parent fed834d5d6
commit abf4a23f3d
36 changed files with 576 additions and 126 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Nov 27 15:30:41 UTC 2012 - jengelh@inai.de
- Implement update-alternatives service for gold
-------------------------------------------------------------------
Tue Nov 27 12:44:19 UTC 2012 - adrian@suse.de

View File

@ -98,6 +98,7 @@ Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch101: aarch64-biarch.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: update-alternatives
%description
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
@ -110,6 +111,7 @@ Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
PreReq: update-alternatives
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
@ -121,7 +123,6 @@ gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
@ -312,10 +313,14 @@ make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
# we could eventually use alternatives for /usr/bin/ld
if test -f $RPM_BUILD_ROOT%{_bindir}/ld.bfd; then
rm $RPM_BUILD_ROOT%{_bindir}/ld
ln -sf ld.bfd $RPM_BUILD_ROOT%{_bindir}/ld;
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
fi
mkdir -p "%buildroot/%_sysconfdir/alternatives";
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld";
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
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
@ -368,23 +373,37 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%if 0%{!?cross:1}
%post
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.bfd" 1
%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
%post gold
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.gold" 2
%postun
%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
%preun
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
fi;
%preun gold
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
fi;
%endif
%files -f binutils.lang
@ -395,6 +414,7 @@ rm -rf $RPM_BUILD_ROOT
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ghost %_sysconfdir/alternatives/ld
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Nov 27 15:30:41 UTC 2012 - jengelh@inai.de
- Implement update-alternatives service for gold
-------------------------------------------------------------------
Tue Nov 27 12:44:19 UTC 2012 - adrian@suse.de

View File

@ -101,6 +101,7 @@ Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch101: aarch64-biarch.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: update-alternatives
%description
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
@ -113,6 +114,7 @@ Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
PreReq: update-alternatives
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
@ -124,7 +126,6 @@ gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
@ -315,10 +316,14 @@ make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
# we could eventually use alternatives for /usr/bin/ld
if test -f $RPM_BUILD_ROOT%{_bindir}/ld.bfd; then
rm $RPM_BUILD_ROOT%{_bindir}/ld
ln -sf ld.bfd $RPM_BUILD_ROOT%{_bindir}/ld;
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
fi
mkdir -p "%buildroot/%_sysconfdir/alternatives";
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld";
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
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
@ -371,23 +376,37 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%if 0%{!?cross:1}
%post
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.bfd" 1
%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
%post gold
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.gold" 2
%postun
%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
%preun
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
fi;
%preun gold
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
fi;
%endif
%files -f binutils.lang
@ -398,6 +417,7 @@ rm -rf $RPM_BUILD_ROOT
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ghost %_sysconfdir/alternatives/ld
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Nov 27 15:30:41 UTC 2012 - jengelh@inai.de
- Implement update-alternatives service for gold
-------------------------------------------------------------------
Tue Nov 27 12:44:19 UTC 2012 - adrian@suse.de

View File

@ -101,6 +101,7 @@ Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch101: aarch64-biarch.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: update-alternatives
%description
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
@ -113,6 +114,7 @@ Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
PreReq: update-alternatives
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
@ -124,7 +126,6 @@ gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
@ -315,10 +316,14 @@ make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
# we could eventually use alternatives for /usr/bin/ld
if test -f $RPM_BUILD_ROOT%{_bindir}/ld.bfd; then
rm $RPM_BUILD_ROOT%{_bindir}/ld
ln -sf ld.bfd $RPM_BUILD_ROOT%{_bindir}/ld;
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
fi
mkdir -p "%buildroot/%_sysconfdir/alternatives";
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld";
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
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
@ -371,23 +376,37 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%if 0%{!?cross:1}
%post
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.bfd" 1
%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
%post gold
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.gold" 2
%postun
%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
%preun
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
fi;
%preun gold
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
fi;
%endif
%files -f binutils.lang
@ -398,6 +417,7 @@ rm -rf $RPM_BUILD_ROOT
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ghost %_sysconfdir/alternatives/ld
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Nov 27 15:30:41 UTC 2012 - jengelh@inai.de
- Implement update-alternatives service for gold
-------------------------------------------------------------------
Tue Nov 27 12:44:19 UTC 2012 - adrian@suse.de

View File

@ -101,6 +101,7 @@ Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch101: aarch64-biarch.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: update-alternatives
%description
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
@ -113,6 +114,7 @@ Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
PreReq: update-alternatives
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
@ -124,7 +126,6 @@ gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
@ -315,10 +316,14 @@ make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
# we could eventually use alternatives for /usr/bin/ld
if test -f $RPM_BUILD_ROOT%{_bindir}/ld.bfd; then
rm $RPM_BUILD_ROOT%{_bindir}/ld
ln -sf ld.bfd $RPM_BUILD_ROOT%{_bindir}/ld;
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
fi
mkdir -p "%buildroot/%_sysconfdir/alternatives";
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld";
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
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
@ -371,23 +376,37 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%if 0%{!?cross:1}
%post
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.bfd" 1
%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
%post gold
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.gold" 2
%postun
%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
%preun
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
fi;
%preun gold
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
fi;
%endif
%files -f binutils.lang
@ -398,6 +417,7 @@ rm -rf $RPM_BUILD_ROOT
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ghost %_sysconfdir/alternatives/ld
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Nov 27 15:30:41 UTC 2012 - jengelh@inai.de
- Implement update-alternatives service for gold
-------------------------------------------------------------------
Tue Nov 27 12:44:19 UTC 2012 - adrian@suse.de

View File

@ -101,6 +101,7 @@ Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch101: aarch64-biarch.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: update-alternatives
%description
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
@ -113,6 +114,7 @@ Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
PreReq: update-alternatives
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
@ -124,7 +126,6 @@ gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
@ -315,10 +316,14 @@ make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
# we could eventually use alternatives for /usr/bin/ld
if test -f $RPM_BUILD_ROOT%{_bindir}/ld.bfd; then
rm $RPM_BUILD_ROOT%{_bindir}/ld
ln -sf ld.bfd $RPM_BUILD_ROOT%{_bindir}/ld;
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
fi
mkdir -p "%buildroot/%_sysconfdir/alternatives";
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld";
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
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
@ -371,23 +376,37 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%if 0%{!?cross:1}
%post
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.bfd" 1
%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
%post gold
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.gold" 2
%postun
%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
%preun
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
fi;
%preun gold
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
fi;
%endif
%files -f binutils.lang
@ -398,6 +417,7 @@ rm -rf $RPM_BUILD_ROOT
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ghost %_sysconfdir/alternatives/ld
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Nov 27 15:30:41 UTC 2012 - jengelh@inai.de
- Implement update-alternatives service for gold
-------------------------------------------------------------------
Tue Nov 27 12:44:19 UTC 2012 - adrian@suse.de

View File

@ -101,6 +101,7 @@ Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch101: aarch64-biarch.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: update-alternatives
%description
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
@ -113,6 +114,7 @@ Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
PreReq: update-alternatives
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
@ -124,7 +126,6 @@ gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
@ -315,10 +316,14 @@ make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
# we could eventually use alternatives for /usr/bin/ld
if test -f $RPM_BUILD_ROOT%{_bindir}/ld.bfd; then
rm $RPM_BUILD_ROOT%{_bindir}/ld
ln -sf ld.bfd $RPM_BUILD_ROOT%{_bindir}/ld;
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
fi
mkdir -p "%buildroot/%_sysconfdir/alternatives";
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld";
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
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
@ -371,23 +376,37 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%if 0%{!?cross:1}
%post
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.bfd" 1
%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
%post gold
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.gold" 2
%postun
%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
%preun
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
fi;
%preun gold
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
fi;
%endif
%files -f binutils.lang
@ -398,6 +417,7 @@ rm -rf $RPM_BUILD_ROOT
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ghost %_sysconfdir/alternatives/ld
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Nov 27 15:30:41 UTC 2012 - jengelh@inai.de
- Implement update-alternatives service for gold
-------------------------------------------------------------------
Tue Nov 27 12:44:19 UTC 2012 - adrian@suse.de

View File

@ -101,6 +101,7 @@ Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch101: aarch64-biarch.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: update-alternatives
%description
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
@ -113,6 +114,7 @@ Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
PreReq: update-alternatives
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
@ -124,7 +126,6 @@ gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
@ -315,10 +316,14 @@ make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
# we could eventually use alternatives for /usr/bin/ld
if test -f $RPM_BUILD_ROOT%{_bindir}/ld.bfd; then
rm $RPM_BUILD_ROOT%{_bindir}/ld
ln -sf ld.bfd $RPM_BUILD_ROOT%{_bindir}/ld;
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
fi
mkdir -p "%buildroot/%_sysconfdir/alternatives";
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld";
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
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
@ -371,23 +376,37 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%if 0%{!?cross:1}
%post
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.bfd" 1
%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
%post gold
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.gold" 2
%postun
%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
%preun
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
fi;
%preun gold
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
fi;
%endif
%files -f binutils.lang
@ -398,6 +417,7 @@ rm -rf $RPM_BUILD_ROOT
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ghost %_sysconfdir/alternatives/ld
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Nov 27 15:30:41 UTC 2012 - jengelh@inai.de
- Implement update-alternatives service for gold
-------------------------------------------------------------------
Tue Nov 27 12:44:19 UTC 2012 - adrian@suse.de

View File

@ -101,6 +101,7 @@ Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch101: aarch64-biarch.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: update-alternatives
%description
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
@ -113,6 +114,7 @@ Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
PreReq: update-alternatives
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
@ -124,7 +126,6 @@ gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
@ -315,10 +316,14 @@ make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
# we could eventually use alternatives for /usr/bin/ld
if test -f $RPM_BUILD_ROOT%{_bindir}/ld.bfd; then
rm $RPM_BUILD_ROOT%{_bindir}/ld
ln -sf ld.bfd $RPM_BUILD_ROOT%{_bindir}/ld;
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
fi
mkdir -p "%buildroot/%_sysconfdir/alternatives";
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld";
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
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
@ -371,23 +376,37 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%if 0%{!?cross:1}
%post
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.bfd" 1
%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
%post gold
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.gold" 2
%postun
%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
%preun
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
fi;
%preun gold
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
fi;
%endif
%files -f binutils.lang
@ -398,6 +417,7 @@ rm -rf $RPM_BUILD_ROOT
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ghost %_sysconfdir/alternatives/ld
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Nov 27 15:30:41 UTC 2012 - jengelh@inai.de
- Implement update-alternatives service for gold
-------------------------------------------------------------------
Tue Nov 27 12:44:19 UTC 2012 - adrian@suse.de

View File

@ -101,6 +101,7 @@ Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch101: aarch64-biarch.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: update-alternatives
%description
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
@ -113,6 +114,7 @@ Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
PreReq: update-alternatives
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
@ -124,7 +126,6 @@ gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
@ -315,10 +316,14 @@ make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
# we could eventually use alternatives for /usr/bin/ld
if test -f $RPM_BUILD_ROOT%{_bindir}/ld.bfd; then
rm $RPM_BUILD_ROOT%{_bindir}/ld
ln -sf ld.bfd $RPM_BUILD_ROOT%{_bindir}/ld;
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
fi
mkdir -p "%buildroot/%_sysconfdir/alternatives";
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld";
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
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
@ -371,23 +376,37 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%if 0%{!?cross:1}
%post
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.bfd" 1
%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
%post gold
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.gold" 2
%postun
%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
%preun
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
fi;
%preun gold
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
fi;
%endif
%files -f binutils.lang
@ -398,6 +417,7 @@ rm -rf $RPM_BUILD_ROOT
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ghost %_sysconfdir/alternatives/ld
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Nov 27 15:30:41 UTC 2012 - jengelh@inai.de
- Implement update-alternatives service for gold
-------------------------------------------------------------------
Tue Nov 27 12:44:19 UTC 2012 - adrian@suse.de

View File

@ -101,6 +101,7 @@ Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch101: aarch64-biarch.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: update-alternatives
%description
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
@ -113,6 +114,7 @@ Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
PreReq: update-alternatives
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
@ -124,7 +126,6 @@ gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
@ -315,10 +316,14 @@ make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
# we could eventually use alternatives for /usr/bin/ld
if test -f $RPM_BUILD_ROOT%{_bindir}/ld.bfd; then
rm $RPM_BUILD_ROOT%{_bindir}/ld
ln -sf ld.bfd $RPM_BUILD_ROOT%{_bindir}/ld;
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
fi
mkdir -p "%buildroot/%_sysconfdir/alternatives";
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld";
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
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
@ -371,23 +376,37 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%if 0%{!?cross:1}
%post
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.bfd" 1
%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
%post gold
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.gold" 2
%postun
%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
%preun
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
fi;
%preun gold
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
fi;
%endif
%files -f binutils.lang
@ -398,6 +417,7 @@ rm -rf $RPM_BUILD_ROOT
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ghost %_sysconfdir/alternatives/ld
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Nov 27 15:30:41 UTC 2012 - jengelh@inai.de
- Implement update-alternatives service for gold
-------------------------------------------------------------------
Tue Nov 27 12:44:19 UTC 2012 - adrian@suse.de

View File

@ -101,6 +101,7 @@ Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch101: aarch64-biarch.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: update-alternatives
%description
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
@ -113,6 +114,7 @@ Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
PreReq: update-alternatives
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
@ -124,7 +126,6 @@ gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
@ -315,10 +316,14 @@ make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
# we could eventually use alternatives for /usr/bin/ld
if test -f $RPM_BUILD_ROOT%{_bindir}/ld.bfd; then
rm $RPM_BUILD_ROOT%{_bindir}/ld
ln -sf ld.bfd $RPM_BUILD_ROOT%{_bindir}/ld;
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
fi
mkdir -p "%buildroot/%_sysconfdir/alternatives";
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld";
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
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
@ -371,23 +376,37 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%if 0%{!?cross:1}
%post
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.bfd" 1
%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
%post gold
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.gold" 2
%postun
%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
%preun
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
fi;
%preun gold
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
fi;
%endif
%files -f binutils.lang
@ -398,6 +417,7 @@ rm -rf $RPM_BUILD_ROOT
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ghost %_sysconfdir/alternatives/ld
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Nov 27 15:30:41 UTC 2012 - jengelh@inai.de
- Implement update-alternatives service for gold
-------------------------------------------------------------------
Tue Nov 27 12:44:19 UTC 2012 - adrian@suse.de

View File

@ -101,6 +101,7 @@ Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch101: aarch64-biarch.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: update-alternatives
%description
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
@ -113,6 +114,7 @@ Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
PreReq: update-alternatives
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
@ -124,7 +126,6 @@ gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
@ -315,10 +316,14 @@ make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
# we could eventually use alternatives for /usr/bin/ld
if test -f $RPM_BUILD_ROOT%{_bindir}/ld.bfd; then
rm $RPM_BUILD_ROOT%{_bindir}/ld
ln -sf ld.bfd $RPM_BUILD_ROOT%{_bindir}/ld;
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
fi
mkdir -p "%buildroot/%_sysconfdir/alternatives";
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld";
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
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
@ -371,23 +376,37 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%if 0%{!?cross:1}
%post
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.bfd" 1
%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
%post gold
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.gold" 2
%postun
%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
%preun
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
fi;
%preun gold
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
fi;
%endif
%files -f binutils.lang
@ -398,6 +417,7 @@ rm -rf $RPM_BUILD_ROOT
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ghost %_sysconfdir/alternatives/ld
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Nov 27 15:30:41 UTC 2012 - jengelh@inai.de
- Implement update-alternatives service for gold
-------------------------------------------------------------------
Tue Nov 27 12:44:19 UTC 2012 - adrian@suse.de

View File

@ -101,6 +101,7 @@ Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch101: aarch64-biarch.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: update-alternatives
%description
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
@ -113,6 +114,7 @@ Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
PreReq: update-alternatives
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
@ -124,7 +126,6 @@ gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
@ -315,10 +316,14 @@ make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
# we could eventually use alternatives for /usr/bin/ld
if test -f $RPM_BUILD_ROOT%{_bindir}/ld.bfd; then
rm $RPM_BUILD_ROOT%{_bindir}/ld
ln -sf ld.bfd $RPM_BUILD_ROOT%{_bindir}/ld;
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
fi
mkdir -p "%buildroot/%_sysconfdir/alternatives";
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld";
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
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
@ -371,23 +376,37 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%if 0%{!?cross:1}
%post
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.bfd" 1
%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
%post gold
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.gold" 2
%postun
%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
%preun
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
fi;
%preun gold
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
fi;
%endif
%files -f binutils.lang
@ -398,6 +417,7 @@ rm -rf $RPM_BUILD_ROOT
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ghost %_sysconfdir/alternatives/ld
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Nov 27 15:30:41 UTC 2012 - jengelh@inai.de
- Implement update-alternatives service for gold
-------------------------------------------------------------------
Tue Nov 27 12:44:19 UTC 2012 - adrian@suse.de

View File

@ -101,6 +101,7 @@ Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch101: aarch64-biarch.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: update-alternatives
%description
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
@ -113,6 +114,7 @@ Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
PreReq: update-alternatives
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
@ -124,7 +126,6 @@ gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
@ -315,10 +316,14 @@ make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
# we could eventually use alternatives for /usr/bin/ld
if test -f $RPM_BUILD_ROOT%{_bindir}/ld.bfd; then
rm $RPM_BUILD_ROOT%{_bindir}/ld
ln -sf ld.bfd $RPM_BUILD_ROOT%{_bindir}/ld;
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
fi
mkdir -p "%buildroot/%_sysconfdir/alternatives";
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld";
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
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
@ -371,23 +376,37 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%if 0%{!?cross:1}
%post
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.bfd" 1
%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
%post gold
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.gold" 2
%postun
%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
%preun
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
fi;
%preun gold
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
fi;
%endif
%files -f binutils.lang
@ -398,6 +417,7 @@ rm -rf $RPM_BUILD_ROOT
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ghost %_sysconfdir/alternatives/ld
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Nov 27 15:30:41 UTC 2012 - jengelh@inai.de
- Implement update-alternatives service for gold
-------------------------------------------------------------------
Tue Nov 27 12:44:19 UTC 2012 - adrian@suse.de

View File

@ -101,6 +101,7 @@ Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch101: aarch64-biarch.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: update-alternatives
%description
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
@ -113,6 +114,7 @@ Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
PreReq: update-alternatives
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
@ -124,7 +126,6 @@ gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
@ -315,10 +316,14 @@ make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
# we could eventually use alternatives for /usr/bin/ld
if test -f $RPM_BUILD_ROOT%{_bindir}/ld.bfd; then
rm $RPM_BUILD_ROOT%{_bindir}/ld
ln -sf ld.bfd $RPM_BUILD_ROOT%{_bindir}/ld;
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
fi
mkdir -p "%buildroot/%_sysconfdir/alternatives";
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld";
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
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
@ -371,23 +376,37 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%if 0%{!?cross:1}
%post
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.bfd" 1
%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
%post gold
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.gold" 2
%postun
%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
%preun
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
fi;
%preun gold
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
fi;
%endif
%files -f binutils.lang
@ -398,6 +417,7 @@ rm -rf $RPM_BUILD_ROOT
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ghost %_sysconfdir/alternatives/ld
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Nov 27 15:30:41 UTC 2012 - jengelh@inai.de
- Implement update-alternatives service for gold
-------------------------------------------------------------------
Tue Nov 27 12:44:19 UTC 2012 - adrian@suse.de

View File

@ -101,6 +101,7 @@ Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch101: aarch64-biarch.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: update-alternatives
%description
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
@ -113,6 +114,7 @@ Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
PreReq: update-alternatives
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
@ -124,7 +126,6 @@ gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
@ -315,10 +316,14 @@ make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
# we could eventually use alternatives for /usr/bin/ld
if test -f $RPM_BUILD_ROOT%{_bindir}/ld.bfd; then
rm $RPM_BUILD_ROOT%{_bindir}/ld
ln -sf ld.bfd $RPM_BUILD_ROOT%{_bindir}/ld;
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
fi
mkdir -p "%buildroot/%_sysconfdir/alternatives";
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld";
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
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
@ -371,23 +376,37 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%if 0%{!?cross:1}
%post
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.bfd" 1
%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
%post gold
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.gold" 2
%postun
%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
%preun
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
fi;
%preun gold
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
fi;
%endif
%files -f binutils.lang
@ -398,6 +417,7 @@ rm -rf $RPM_BUILD_ROOT
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ghost %_sysconfdir/alternatives/ld
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Nov 27 15:30:41 UTC 2012 - jengelh@inai.de
- Implement update-alternatives service for gold
-------------------------------------------------------------------
Tue Nov 27 12:44:19 UTC 2012 - adrian@suse.de

View File

@ -101,6 +101,7 @@ Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch101: aarch64-biarch.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: update-alternatives
%description
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
@ -113,6 +114,7 @@ Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
PreReq: update-alternatives
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
@ -124,7 +126,6 @@ gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
@ -315,10 +316,14 @@ make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
# we could eventually use alternatives for /usr/bin/ld
if test -f $RPM_BUILD_ROOT%{_bindir}/ld.bfd; then
rm $RPM_BUILD_ROOT%{_bindir}/ld
ln -sf ld.bfd $RPM_BUILD_ROOT%{_bindir}/ld;
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
fi
mkdir -p "%buildroot/%_sysconfdir/alternatives";
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld";
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
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
@ -371,23 +376,37 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%if 0%{!?cross:1}
%post
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.bfd" 1
%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
%post gold
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.gold" 2
%postun
%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
%preun
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
fi;
%preun gold
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
fi;
%endif
%files -f binutils.lang
@ -398,6 +417,7 @@ rm -rf $RPM_BUILD_ROOT
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ghost %_sysconfdir/alternatives/ld
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Nov 27 15:30:41 UTC 2012 - jengelh@inai.de
- Implement update-alternatives service for gold
-------------------------------------------------------------------
Tue Nov 27 12:44:19 UTC 2012 - adrian@suse.de

View File

@ -101,6 +101,7 @@ Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch101: aarch64-biarch.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: update-alternatives
%description
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
@ -113,6 +114,7 @@ Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
PreReq: update-alternatives
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
@ -124,7 +126,6 @@ gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
@ -315,10 +316,14 @@ make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
# we could eventually use alternatives for /usr/bin/ld
if test -f $RPM_BUILD_ROOT%{_bindir}/ld.bfd; then
rm $RPM_BUILD_ROOT%{_bindir}/ld
ln -sf ld.bfd $RPM_BUILD_ROOT%{_bindir}/ld;
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
mv "%buildroot/%_bindir"/{ld,ld.bfd};
else
rm -f "%buildroot/%_bindir/ld";
fi
mkdir -p "%buildroot/%_sysconfdir/alternatives";
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld";
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
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
@ -371,23 +376,37 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%if 0%{!?cross:1}
%post
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.bfd" 1
%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
%post gold
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.gold" 2
%postun
%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
%preun
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.bfd";
fi;
%preun gold
if [ "$1" = 0 ]; then
"%_sbindir/update-alternatives" --remove ld "%_bindir/ld.gold";
fi;
%endif
%files -f binutils.lang
@ -398,6 +417,7 @@ rm -rf $RPM_BUILD_ROOT
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ghost %_sysconfdir/alternatives/ld
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold