From 628ae5d647092cdb69de7b968bbb64d570335ec354e7751990a9265db4d2d0c7 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Mon, 20 Sep 2021 12:28:03 +0000 Subject: [PATCH] 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 --- binutils.changes | 5 +++ binutils.spec | 60 +++++++++++++++++++++++++++++++++ cross-aarch64-binutils.changes | 5 +++ cross-aarch64-binutils.spec | 60 +++++++++++++++++++++++++++++++++ cross-arm-binutils.changes | 5 +++ cross-arm-binutils.spec | 60 +++++++++++++++++++++++++++++++++ cross-avr-binutils.changes | 5 +++ cross-avr-binutils.spec | 60 +++++++++++++++++++++++++++++++++ cross-epiphany-binutils.changes | 5 +++ cross-epiphany-binutils.spec | 60 +++++++++++++++++++++++++++++++++ cross-hppa-binutils.changes | 5 +++ cross-hppa-binutils.spec | 60 +++++++++++++++++++++++++++++++++ cross-hppa64-binutils.changes | 5 +++ cross-hppa64-binutils.spec | 60 +++++++++++++++++++++++++++++++++ cross-i386-binutils.changes | 5 +++ cross-i386-binutils.spec | 60 +++++++++++++++++++++++++++++++++ cross-ia64-binutils.changes | 5 +++ cross-ia64-binutils.spec | 60 +++++++++++++++++++++++++++++++++ cross-m68k-binutils.changes | 5 +++ cross-m68k-binutils.spec | 60 +++++++++++++++++++++++++++++++++ cross-mips-binutils.changes | 5 +++ cross-mips-binutils.spec | 60 +++++++++++++++++++++++++++++++++ cross-ppc-binutils.changes | 5 +++ cross-ppc-binutils.spec | 60 +++++++++++++++++++++++++++++++++ cross-ppc64-binutils.changes | 5 +++ cross-ppc64-binutils.spec | 60 +++++++++++++++++++++++++++++++++ cross-ppc64le-binutils.changes | 5 +++ cross-ppc64le-binutils.spec | 60 +++++++++++++++++++++++++++++++++ cross-riscv64-binutils.changes | 5 +++ cross-riscv64-binutils.spec | 60 +++++++++++++++++++++++++++++++++ cross-rx-binutils.changes | 5 +++ cross-rx-binutils.spec | 60 +++++++++++++++++++++++++++++++++ cross-s390-binutils.changes | 5 +++ cross-s390-binutils.spec | 60 +++++++++++++++++++++++++++++++++ cross-s390x-binutils.changes | 5 +++ cross-s390x-binutils.spec | 60 +++++++++++++++++++++++++++++++++ cross-sparc-binutils.changes | 5 +++ cross-sparc-binutils.spec | 60 +++++++++++++++++++++++++++++++++ cross-sparc64-binutils.changes | 5 +++ cross-sparc64-binutils.spec | 60 +++++++++++++++++++++++++++++++++ cross-spu-binutils.changes | 5 +++ cross-spu-binutils.spec | 60 +++++++++++++++++++++++++++++++++ cross-x86_64-binutils.changes | 5 +++ cross-x86_64-binutils.spec | 60 +++++++++++++++++++++++++++++++++ cross-xtensa-binutils.changes | 5 +++ cross-xtensa-binutils.spec | 60 +++++++++++++++++++++++++++++++++ 46 files changed, 1495 insertions(+) diff --git a/binutils.changes b/binutils.changes index 55207d8..a84efdf 100644 --- a/binutils.changes +++ b/binutils.changes @@ -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 diff --git a/binutils.spec b/binutils.spec index 764a535..059aab0 100644 --- a/binutils.spec +++ b/binutils.spec @@ -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 < %{buildroot}%{_datadir}/libalternatives/ld/2.conf < diff --git a/cross-aarch64-binutils.spec b/cross-aarch64-binutils.spec index 8281ce8..f04d799 100644 --- a/cross-aarch64-binutils.spec +++ b/cross-aarch64-binutils.spec @@ -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 < %{buildroot}%{_datadir}/libalternatives/ld/2.conf < diff --git a/cross-arm-binutils.spec b/cross-arm-binutils.spec index 611756a..deebec9 100644 --- a/cross-arm-binutils.spec +++ b/cross-arm-binutils.spec @@ -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 < %{buildroot}%{_datadir}/libalternatives/ld/2.conf < diff --git a/cross-avr-binutils.spec b/cross-avr-binutils.spec index 7863b61..aedfb06 100644 --- a/cross-avr-binutils.spec +++ b/cross-avr-binutils.spec @@ -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 < %{buildroot}%{_datadir}/libalternatives/ld/2.conf < diff --git a/cross-epiphany-binutils.spec b/cross-epiphany-binutils.spec index c4dc222..5c0a0e6 100644 --- a/cross-epiphany-binutils.spec +++ b/cross-epiphany-binutils.spec @@ -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 < %{buildroot}%{_datadir}/libalternatives/ld/2.conf < diff --git a/cross-hppa-binutils.spec b/cross-hppa-binutils.spec index 6581bf2..aa591e0 100644 --- a/cross-hppa-binutils.spec +++ b/cross-hppa-binutils.spec @@ -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 < %{buildroot}%{_datadir}/libalternatives/ld/2.conf < diff --git a/cross-hppa64-binutils.spec b/cross-hppa64-binutils.spec index 74b60c3..bf798d2 100644 --- a/cross-hppa64-binutils.spec +++ b/cross-hppa64-binutils.spec @@ -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 < %{buildroot}%{_datadir}/libalternatives/ld/2.conf < diff --git a/cross-i386-binutils.spec b/cross-i386-binutils.spec index ca65215..478b3c3 100644 --- a/cross-i386-binutils.spec +++ b/cross-i386-binutils.spec @@ -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 < %{buildroot}%{_datadir}/libalternatives/ld/2.conf < diff --git a/cross-ia64-binutils.spec b/cross-ia64-binutils.spec index 246a48c..c9228f2 100644 --- a/cross-ia64-binutils.spec +++ b/cross-ia64-binutils.spec @@ -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 < %{buildroot}%{_datadir}/libalternatives/ld/2.conf < diff --git a/cross-m68k-binutils.spec b/cross-m68k-binutils.spec index df3d2b2..c7bf3c4 100644 --- a/cross-m68k-binutils.spec +++ b/cross-m68k-binutils.spec @@ -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 < %{buildroot}%{_datadir}/libalternatives/ld/2.conf < diff --git a/cross-mips-binutils.spec b/cross-mips-binutils.spec index 8715002..50d8436 100644 --- a/cross-mips-binutils.spec +++ b/cross-mips-binutils.spec @@ -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 < %{buildroot}%{_datadir}/libalternatives/ld/2.conf < diff --git a/cross-ppc-binutils.spec b/cross-ppc-binutils.spec index 56a0ffa..a4b8bf8 100644 --- a/cross-ppc-binutils.spec +++ b/cross-ppc-binutils.spec @@ -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 < %{buildroot}%{_datadir}/libalternatives/ld/2.conf < diff --git a/cross-ppc64-binutils.spec b/cross-ppc64-binutils.spec index 1772aaa..97eae35 100644 --- a/cross-ppc64-binutils.spec +++ b/cross-ppc64-binutils.spec @@ -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 < %{buildroot}%{_datadir}/libalternatives/ld/2.conf < diff --git a/cross-ppc64le-binutils.spec b/cross-ppc64le-binutils.spec index 72015dc..dcbd3fb 100644 --- a/cross-ppc64le-binutils.spec +++ b/cross-ppc64le-binutils.spec @@ -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 < %{buildroot}%{_datadir}/libalternatives/ld/2.conf < diff --git a/cross-riscv64-binutils.spec b/cross-riscv64-binutils.spec index 586dc8b..7f80418 100644 --- a/cross-riscv64-binutils.spec +++ b/cross-riscv64-binutils.spec @@ -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 < %{buildroot}%{_datadir}/libalternatives/ld/2.conf < diff --git a/cross-rx-binutils.spec b/cross-rx-binutils.spec index 50bcbf0..ba9a8ae 100644 --- a/cross-rx-binutils.spec +++ b/cross-rx-binutils.spec @@ -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 < %{buildroot}%{_datadir}/libalternatives/ld/2.conf < diff --git a/cross-s390-binutils.spec b/cross-s390-binutils.spec index 61f3e3e..2fce6b7 100644 --- a/cross-s390-binutils.spec +++ b/cross-s390-binutils.spec @@ -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 < %{buildroot}%{_datadir}/libalternatives/ld/2.conf < diff --git a/cross-s390x-binutils.spec b/cross-s390x-binutils.spec index b219951..692a329 100644 --- a/cross-s390x-binutils.spec +++ b/cross-s390x-binutils.spec @@ -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 < %{buildroot}%{_datadir}/libalternatives/ld/2.conf < diff --git a/cross-sparc-binutils.spec b/cross-sparc-binutils.spec index c535591..ebbc3ba 100644 --- a/cross-sparc-binutils.spec +++ b/cross-sparc-binutils.spec @@ -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 < %{buildroot}%{_datadir}/libalternatives/ld/2.conf < diff --git a/cross-sparc64-binutils.spec b/cross-sparc64-binutils.spec index 9c2a453..7f1cb41 100644 --- a/cross-sparc64-binutils.spec +++ b/cross-sparc64-binutils.spec @@ -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 < %{buildroot}%{_datadir}/libalternatives/ld/2.conf < diff --git a/cross-spu-binutils.spec b/cross-spu-binutils.spec index 57caf5e..e0134ee 100644 --- a/cross-spu-binutils.spec +++ b/cross-spu-binutils.spec @@ -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 < %{buildroot}%{_datadir}/libalternatives/ld/2.conf < diff --git a/cross-x86_64-binutils.spec b/cross-x86_64-binutils.spec index 2c4adf0..faf49e4 100644 --- a/cross-x86_64-binutils.spec +++ b/cross-x86_64-binutils.spec @@ -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 < %{buildroot}%{_datadir}/libalternatives/ld/2.conf < diff --git a/cross-xtensa-binutils.spec b/cross-xtensa-binutils.spec index 8f770e3..6310d73 100644 --- a/cross-xtensa-binutils.spec +++ b/cross-xtensa-binutils.spec @@ -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 < %{buildroot}%{_datadir}/libalternatives/ld/2.conf <