forked from pool/binutils
Accepting request 949605 from home:dirkmueller:Factory
- use fdupes on datadir - remove RPM_BUILD_ROOT usage and other cleanups - use fdupes on datadir - remove RPM_BUILD_ROOT usage and other cleanups - use fdupes on datadir - remove RPM_BUILD_ROOT usage and other cleanups - use fdupes on datadir - remove RPM_BUILD_ROOT usage and other cleanups - use fdupes on datadir - remove RPM_BUILD_ROOT usage and other cleanups - use fdupes on datadir - remove RPM_BUILD_ROOT usage and other cleanups - use fdupes on datadir - remove RPM_BUILD_ROOT usage and other cleanups - use fdupes on datadir - remove RPM_BUILD_ROOT usage and other cleanups - use fdupes on datadir - remove RPM_BUILD_ROOT usage and other cleanups - use fdupes on datadir - remove RPM_BUILD_ROOT usage and other cleanups OBS-URL: https://build.opensuse.org/request/show/949605 OBS-URL: https://build.opensuse.org/package/show/devel:gcc/binutils?expand=0&rev=385
This commit is contained in:
parent
8ced92b0cb
commit
145240cbab
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- use fdupes on datadir
|
||||||
|
- remove RPM_BUILD_ROOT usage and other cleanups
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package binutils
|
# spec file for package binutils
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -20,6 +20,7 @@ Name: binutils
|
|||||||
BuildRequires: bc
|
BuildRequires: bc
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: dejagnu
|
BuildRequires: dejagnu
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
# for the testsuite
|
# for the testsuite
|
||||||
@ -428,26 +429,26 @@ cd build-dir
|
|||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
# installing native binutils
|
# installing native binutils
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-gold
|
make DESTDIR=%{buildroot} install-gold
|
||||||
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
|
ln -sf ld.gold %{buildroot}%{_bindir}/gold
|
||||||
%endif
|
%endif
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-info install
|
make DESTDIR=%{buildroot} install-info install
|
||||||
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
|
make -C gas/doc DESTDIR=%{buildroot} install-info-am install-am
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
|
make DESTDIR=%{buildroot} install-bfd install-opcodes
|
||||||
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
|
||||||
mv "%buildroot/%_bindir"/{ld,ld.bfd};
|
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
|
||||||
else
|
else
|
||||||
rm -f "%buildroot/%_bindir/ld";
|
rm -f "%{buildroot}/%_bindir/ld";
|
||||||
fi
|
fi
|
||||||
%if ! 0%{with libalternatives}
|
%if ! 0%{with libalternatives}
|
||||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
|
||||||
# Keep older versions of brp-symlink happy
|
# Keep older versions of brp-symlink happy
|
||||||
%if %{suse_version} < 1310
|
%if %{suse_version} < 1310
|
||||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
|
||||||
%endif
|
%endif
|
||||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
|
||||||
%else
|
%else
|
||||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
|
||||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||||
binary=%{_bindir}/ld.gold
|
binary=%{_bindir}/ld.gold
|
||||||
@ -457,24 +458,24 @@ binary=%{_bindir}/ld.bfd
|
|||||||
EOF
|
EOF
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
||||||
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
|
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
|
||||||
# Install header files
|
# Install header files
|
||||||
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
|
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
|
||||||
# We want the PIC libiberty.a
|
# We want the PIC libiberty.a
|
||||||
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
|
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
|
||||||
#
|
#
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
|
chmod a+x %{buildroot}%{_libdir}/libbfd-*
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
|
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
|
||||||
# No shared linking outside binutils
|
# No shared linking outside binutils
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.la
|
||||||
# Remove unwanted files to shut up rpm
|
# Remove unwanted files to shut up rpm
|
||||||
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
||||||
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
||||||
cd ..
|
cd ..
|
||||||
%find_lang binutils
|
%find_lang binutils
|
||||||
%find_lang bfd binutils.lang
|
%find_lang bfd binutils.lang
|
||||||
@ -485,45 +486,46 @@ cd ..
|
|||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%find_lang gold binutils-gold.lang
|
%find_lang gold binutils-gold.lang
|
||||||
%endif
|
%endif
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||||
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
|
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
|
||||||
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
|
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
|
||||||
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
|
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
|
||||||
%else
|
%else
|
||||||
# installing cross-TARGET-binutils and TARGET-binutils
|
# installing cross-TARGET-binutils and TARGET-binutils
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
make DESTDIR=%{buildroot} install
|
||||||
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
||||||
T=$(basename %buildroot/usr/%{TARGET_OS})
|
T=$(basename %{buildroot}/usr/%{TARGET_OS})
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
ln -sf /usr/bin/$T-$(basename $f) $f
|
ln -sf /usr/bin/$T-$(basename $f) $f
|
||||||
done
|
done
|
||||||
%if "%{TARGET}" == "arm"
|
%if "%{TARGET}" == "arm"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in arm-none-eabi; do
|
for p in arm-none-eabi; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "riscv64"
|
%if "%{TARGET}" == "riscv64"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in riscv64-elf; do
|
for p in riscv64-elf; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "avr"
|
%if "%{TARGET}" == "avr"
|
||||||
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
||||||
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
||||||
%endif
|
%endif
|
||||||
rm -rf $RPM_BUILD_ROOT%{_mandir}
|
rm -rf %{buildroot}%{_mandir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_infodir}
|
rm -rf %{buildroot}%{_infodir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
|
rm -rf %{buildroot}%{_prefix}/lib*
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
|
rm -rf %{buildroot}%{_prefix}/include
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
|
||||||
> ../binutils.lang
|
> ../binutils.lang
|
||||||
%endif
|
%endif
|
||||||
|
%fdupes %{buildroot}%{_prefix}
|
||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%post
|
%post
|
||||||
@ -583,12 +585,10 @@ fi;
|
|||||||
%postun -n libctf0 -p /sbin/ldconfig
|
%postun -n libctf0 -p /sbin/ldconfig
|
||||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun
|
%postun -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -f binutils.lang
|
%files -f binutils.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%{_docdir}/%{name}
|
%{_docdir}/%{name}
|
||||||
%{_prefix}/%{HOST}/bin/*
|
%{_prefix}/%{HOST}/bin/*
|
||||||
@ -618,7 +618,6 @@ fi;
|
|||||||
|
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%files gold -f binutils-gold.lang
|
%files gold -f binutils-gold.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc gold/NEWS gold/README
|
%doc gold/NEWS gold/README
|
||||||
%{_bindir}/gold
|
%{_bindir}/gold
|
||||||
%{_bindir}/ld.gold
|
%{_bindir}/ld.gold
|
||||||
@ -631,7 +630,6 @@ fi;
|
|||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_prefix}/include/*.h
|
%{_prefix}/include/*.h
|
||||||
%{_libdir}/lib*.*a
|
%{_libdir}/lib*.*a
|
||||||
%{_libdir}/libctf.so
|
%{_libdir}/libctf.so
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- use fdupes on datadir
|
||||||
|
- remove RPM_BUILD_ROOT usage and other cleanups
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package cross-aarch64-binutils
|
# spec file for package cross-aarch64-binutils
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -23,6 +23,7 @@ ExcludeArch: aarch64
|
|||||||
BuildRequires: bc
|
BuildRequires: bc
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: dejagnu
|
BuildRequires: dejagnu
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
# for the testsuite
|
# for the testsuite
|
||||||
@ -431,26 +432,26 @@ cd build-dir
|
|||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
# installing native binutils
|
# installing native binutils
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-gold
|
make DESTDIR=%{buildroot} install-gold
|
||||||
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
|
ln -sf ld.gold %{buildroot}%{_bindir}/gold
|
||||||
%endif
|
%endif
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-info install
|
make DESTDIR=%{buildroot} install-info install
|
||||||
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
|
make -C gas/doc DESTDIR=%{buildroot} install-info-am install-am
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
|
make DESTDIR=%{buildroot} install-bfd install-opcodes
|
||||||
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
|
||||||
mv "%buildroot/%_bindir"/{ld,ld.bfd};
|
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
|
||||||
else
|
else
|
||||||
rm -f "%buildroot/%_bindir/ld";
|
rm -f "%{buildroot}/%_bindir/ld";
|
||||||
fi
|
fi
|
||||||
%if ! 0%{with libalternatives}
|
%if ! 0%{with libalternatives}
|
||||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
|
||||||
# Keep older versions of brp-symlink happy
|
# Keep older versions of brp-symlink happy
|
||||||
%if %{suse_version} < 1310
|
%if %{suse_version} < 1310
|
||||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
|
||||||
%endif
|
%endif
|
||||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
|
||||||
%else
|
%else
|
||||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
|
||||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||||
binary=%{_bindir}/ld.gold
|
binary=%{_bindir}/ld.gold
|
||||||
@ -460,24 +461,24 @@ binary=%{_bindir}/ld.bfd
|
|||||||
EOF
|
EOF
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
||||||
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
|
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
|
||||||
# Install header files
|
# Install header files
|
||||||
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
|
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
|
||||||
# We want the PIC libiberty.a
|
# We want the PIC libiberty.a
|
||||||
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
|
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
|
||||||
#
|
#
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
|
chmod a+x %{buildroot}%{_libdir}/libbfd-*
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
|
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
|
||||||
# No shared linking outside binutils
|
# No shared linking outside binutils
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.la
|
||||||
# Remove unwanted files to shut up rpm
|
# Remove unwanted files to shut up rpm
|
||||||
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
||||||
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
||||||
cd ..
|
cd ..
|
||||||
%find_lang binutils
|
%find_lang binutils
|
||||||
%find_lang bfd binutils.lang
|
%find_lang bfd binutils.lang
|
||||||
@ -488,45 +489,46 @@ cd ..
|
|||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%find_lang gold binutils-gold.lang
|
%find_lang gold binutils-gold.lang
|
||||||
%endif
|
%endif
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||||
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
|
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
|
||||||
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
|
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
|
||||||
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
|
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
|
||||||
%else
|
%else
|
||||||
# installing cross-TARGET-binutils and TARGET-binutils
|
# installing cross-TARGET-binutils and TARGET-binutils
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
make DESTDIR=%{buildroot} install
|
||||||
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
||||||
T=$(basename %buildroot/usr/%{TARGET_OS})
|
T=$(basename %{buildroot}/usr/%{TARGET_OS})
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
ln -sf /usr/bin/$T-$(basename $f) $f
|
ln -sf /usr/bin/$T-$(basename $f) $f
|
||||||
done
|
done
|
||||||
%if "%{TARGET}" == "arm"
|
%if "%{TARGET}" == "arm"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in arm-none-eabi; do
|
for p in arm-none-eabi; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "riscv64"
|
%if "%{TARGET}" == "riscv64"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in riscv64-elf; do
|
for p in riscv64-elf; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "avr"
|
%if "%{TARGET}" == "avr"
|
||||||
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
||||||
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
||||||
%endif
|
%endif
|
||||||
rm -rf $RPM_BUILD_ROOT%{_mandir}
|
rm -rf %{buildroot}%{_mandir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_infodir}
|
rm -rf %{buildroot}%{_infodir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
|
rm -rf %{buildroot}%{_prefix}/lib*
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
|
rm -rf %{buildroot}%{_prefix}/include
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
|
||||||
> ../binutils.lang
|
> ../binutils.lang
|
||||||
%endif
|
%endif
|
||||||
|
%fdupes %{buildroot}%{_prefix}
|
||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%post
|
%post
|
||||||
@ -586,12 +588,10 @@ fi;
|
|||||||
%postun -n libctf0 -p /sbin/ldconfig
|
%postun -n libctf0 -p /sbin/ldconfig
|
||||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun
|
%postun -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -f binutils.lang
|
%files -f binutils.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%{_docdir}/%{name}
|
%{_docdir}/%{name}
|
||||||
%{_prefix}/%{HOST}/bin/*
|
%{_prefix}/%{HOST}/bin/*
|
||||||
@ -621,7 +621,6 @@ fi;
|
|||||||
|
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%files gold -f binutils-gold.lang
|
%files gold -f binutils-gold.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc gold/NEWS gold/README
|
%doc gold/NEWS gold/README
|
||||||
%{_bindir}/gold
|
%{_bindir}/gold
|
||||||
%{_bindir}/ld.gold
|
%{_bindir}/ld.gold
|
||||||
@ -634,7 +633,6 @@ fi;
|
|||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_prefix}/include/*.h
|
%{_prefix}/include/*.h
|
||||||
%{_libdir}/lib*.*a
|
%{_libdir}/lib*.*a
|
||||||
%{_libdir}/libctf.so
|
%{_libdir}/libctf.so
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- use fdupes on datadir
|
||||||
|
- remove RPM_BUILD_ROOT usage and other cleanups
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package cross-arm-binutils
|
# spec file for package cross-arm-binutils
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -23,6 +23,7 @@ ExcludeArch: %arm
|
|||||||
BuildRequires: bc
|
BuildRequires: bc
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: dejagnu
|
BuildRequires: dejagnu
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
# for the testsuite
|
# for the testsuite
|
||||||
@ -431,26 +432,26 @@ cd build-dir
|
|||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
# installing native binutils
|
# installing native binutils
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-gold
|
make DESTDIR=%{buildroot} install-gold
|
||||||
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
|
ln -sf ld.gold %{buildroot}%{_bindir}/gold
|
||||||
%endif
|
%endif
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-info install
|
make DESTDIR=%{buildroot} install-info install
|
||||||
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
|
make -C gas/doc DESTDIR=%{buildroot} install-info-am install-am
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
|
make DESTDIR=%{buildroot} install-bfd install-opcodes
|
||||||
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
|
||||||
mv "%buildroot/%_bindir"/{ld,ld.bfd};
|
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
|
||||||
else
|
else
|
||||||
rm -f "%buildroot/%_bindir/ld";
|
rm -f "%{buildroot}/%_bindir/ld";
|
||||||
fi
|
fi
|
||||||
%if ! 0%{with libalternatives}
|
%if ! 0%{with libalternatives}
|
||||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
|
||||||
# Keep older versions of brp-symlink happy
|
# Keep older versions of brp-symlink happy
|
||||||
%if %{suse_version} < 1310
|
%if %{suse_version} < 1310
|
||||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
|
||||||
%endif
|
%endif
|
||||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
|
||||||
%else
|
%else
|
||||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
|
||||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||||
binary=%{_bindir}/ld.gold
|
binary=%{_bindir}/ld.gold
|
||||||
@ -460,24 +461,24 @@ binary=%{_bindir}/ld.bfd
|
|||||||
EOF
|
EOF
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
||||||
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
|
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
|
||||||
# Install header files
|
# Install header files
|
||||||
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
|
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
|
||||||
# We want the PIC libiberty.a
|
# We want the PIC libiberty.a
|
||||||
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
|
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
|
||||||
#
|
#
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
|
chmod a+x %{buildroot}%{_libdir}/libbfd-*
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
|
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
|
||||||
# No shared linking outside binutils
|
# No shared linking outside binutils
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.la
|
||||||
# Remove unwanted files to shut up rpm
|
# Remove unwanted files to shut up rpm
|
||||||
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
||||||
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
||||||
cd ..
|
cd ..
|
||||||
%find_lang binutils
|
%find_lang binutils
|
||||||
%find_lang bfd binutils.lang
|
%find_lang bfd binutils.lang
|
||||||
@ -488,45 +489,46 @@ cd ..
|
|||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%find_lang gold binutils-gold.lang
|
%find_lang gold binutils-gold.lang
|
||||||
%endif
|
%endif
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||||
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
|
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
|
||||||
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
|
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
|
||||||
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
|
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
|
||||||
%else
|
%else
|
||||||
# installing cross-TARGET-binutils and TARGET-binutils
|
# installing cross-TARGET-binutils and TARGET-binutils
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
make DESTDIR=%{buildroot} install
|
||||||
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
||||||
T=$(basename %buildroot/usr/%{TARGET_OS})
|
T=$(basename %{buildroot}/usr/%{TARGET_OS})
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
ln -sf /usr/bin/$T-$(basename $f) $f
|
ln -sf /usr/bin/$T-$(basename $f) $f
|
||||||
done
|
done
|
||||||
%if "%{TARGET}" == "arm"
|
%if "%{TARGET}" == "arm"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in arm-none-eabi; do
|
for p in arm-none-eabi; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "riscv64"
|
%if "%{TARGET}" == "riscv64"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in riscv64-elf; do
|
for p in riscv64-elf; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "avr"
|
%if "%{TARGET}" == "avr"
|
||||||
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
||||||
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
||||||
%endif
|
%endif
|
||||||
rm -rf $RPM_BUILD_ROOT%{_mandir}
|
rm -rf %{buildroot}%{_mandir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_infodir}
|
rm -rf %{buildroot}%{_infodir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
|
rm -rf %{buildroot}%{_prefix}/lib*
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
|
rm -rf %{buildroot}%{_prefix}/include
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
|
||||||
> ../binutils.lang
|
> ../binutils.lang
|
||||||
%endif
|
%endif
|
||||||
|
%fdupes %{buildroot}%{_prefix}
|
||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%post
|
%post
|
||||||
@ -586,12 +588,10 @@ fi;
|
|||||||
%postun -n libctf0 -p /sbin/ldconfig
|
%postun -n libctf0 -p /sbin/ldconfig
|
||||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun
|
%postun -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -f binutils.lang
|
%files -f binutils.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%{_docdir}/%{name}
|
%{_docdir}/%{name}
|
||||||
%{_prefix}/%{HOST}/bin/*
|
%{_prefix}/%{HOST}/bin/*
|
||||||
@ -621,7 +621,6 @@ fi;
|
|||||||
|
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%files gold -f binutils-gold.lang
|
%files gold -f binutils-gold.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc gold/NEWS gold/README
|
%doc gold/NEWS gold/README
|
||||||
%{_bindir}/gold
|
%{_bindir}/gold
|
||||||
%{_bindir}/ld.gold
|
%{_bindir}/ld.gold
|
||||||
@ -634,7 +633,6 @@ fi;
|
|||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_prefix}/include/*.h
|
%{_prefix}/include/*.h
|
||||||
%{_libdir}/lib*.*a
|
%{_libdir}/lib*.*a
|
||||||
%{_libdir}/libctf.so
|
%{_libdir}/libctf.so
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- use fdupes on datadir
|
||||||
|
- remove RPM_BUILD_ROOT usage and other cleanups
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package cross-avr-binutils
|
# spec file for package cross-avr-binutils
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -23,6 +23,7 @@ ExcludeArch: avr
|
|||||||
BuildRequires: bc
|
BuildRequires: bc
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: dejagnu
|
BuildRequires: dejagnu
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
# for the testsuite
|
# for the testsuite
|
||||||
@ -431,26 +432,26 @@ cd build-dir
|
|||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
# installing native binutils
|
# installing native binutils
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-gold
|
make DESTDIR=%{buildroot} install-gold
|
||||||
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
|
ln -sf ld.gold %{buildroot}%{_bindir}/gold
|
||||||
%endif
|
%endif
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-info install
|
make DESTDIR=%{buildroot} install-info install
|
||||||
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
|
make -C gas/doc DESTDIR=%{buildroot} install-info-am install-am
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
|
make DESTDIR=%{buildroot} install-bfd install-opcodes
|
||||||
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
|
||||||
mv "%buildroot/%_bindir"/{ld,ld.bfd};
|
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
|
||||||
else
|
else
|
||||||
rm -f "%buildroot/%_bindir/ld";
|
rm -f "%{buildroot}/%_bindir/ld";
|
||||||
fi
|
fi
|
||||||
%if ! 0%{with libalternatives}
|
%if ! 0%{with libalternatives}
|
||||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
|
||||||
# Keep older versions of brp-symlink happy
|
# Keep older versions of brp-symlink happy
|
||||||
%if %{suse_version} < 1310
|
%if %{suse_version} < 1310
|
||||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
|
||||||
%endif
|
%endif
|
||||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
|
||||||
%else
|
%else
|
||||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
|
||||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||||
binary=%{_bindir}/ld.gold
|
binary=%{_bindir}/ld.gold
|
||||||
@ -460,24 +461,24 @@ binary=%{_bindir}/ld.bfd
|
|||||||
EOF
|
EOF
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
||||||
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
|
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
|
||||||
# Install header files
|
# Install header files
|
||||||
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
|
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
|
||||||
# We want the PIC libiberty.a
|
# We want the PIC libiberty.a
|
||||||
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
|
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
|
||||||
#
|
#
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
|
chmod a+x %{buildroot}%{_libdir}/libbfd-*
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
|
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
|
||||||
# No shared linking outside binutils
|
# No shared linking outside binutils
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.la
|
||||||
# Remove unwanted files to shut up rpm
|
# Remove unwanted files to shut up rpm
|
||||||
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
||||||
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
||||||
cd ..
|
cd ..
|
||||||
%find_lang binutils
|
%find_lang binutils
|
||||||
%find_lang bfd binutils.lang
|
%find_lang bfd binutils.lang
|
||||||
@ -488,45 +489,46 @@ cd ..
|
|||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%find_lang gold binutils-gold.lang
|
%find_lang gold binutils-gold.lang
|
||||||
%endif
|
%endif
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||||
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
|
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
|
||||||
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
|
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
|
||||||
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
|
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
|
||||||
%else
|
%else
|
||||||
# installing cross-TARGET-binutils and TARGET-binutils
|
# installing cross-TARGET-binutils and TARGET-binutils
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
make DESTDIR=%{buildroot} install
|
||||||
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
||||||
T=$(basename %buildroot/usr/%{TARGET_OS})
|
T=$(basename %{buildroot}/usr/%{TARGET_OS})
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
ln -sf /usr/bin/$T-$(basename $f) $f
|
ln -sf /usr/bin/$T-$(basename $f) $f
|
||||||
done
|
done
|
||||||
%if "%{TARGET}" == "arm"
|
%if "%{TARGET}" == "arm"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in arm-none-eabi; do
|
for p in arm-none-eabi; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "riscv64"
|
%if "%{TARGET}" == "riscv64"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in riscv64-elf; do
|
for p in riscv64-elf; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "avr"
|
%if "%{TARGET}" == "avr"
|
||||||
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
||||||
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
||||||
%endif
|
%endif
|
||||||
rm -rf $RPM_BUILD_ROOT%{_mandir}
|
rm -rf %{buildroot}%{_mandir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_infodir}
|
rm -rf %{buildroot}%{_infodir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
|
rm -rf %{buildroot}%{_prefix}/lib*
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
|
rm -rf %{buildroot}%{_prefix}/include
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
|
||||||
> ../binutils.lang
|
> ../binutils.lang
|
||||||
%endif
|
%endif
|
||||||
|
%fdupes %{buildroot}%{_prefix}
|
||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%post
|
%post
|
||||||
@ -586,12 +588,10 @@ fi;
|
|||||||
%postun -n libctf0 -p /sbin/ldconfig
|
%postun -n libctf0 -p /sbin/ldconfig
|
||||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun
|
%postun -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -f binutils.lang
|
%files -f binutils.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%{_docdir}/%{name}
|
%{_docdir}/%{name}
|
||||||
%{_prefix}/%{HOST}/bin/*
|
%{_prefix}/%{HOST}/bin/*
|
||||||
@ -621,7 +621,6 @@ fi;
|
|||||||
|
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%files gold -f binutils-gold.lang
|
%files gold -f binutils-gold.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc gold/NEWS gold/README
|
%doc gold/NEWS gold/README
|
||||||
%{_bindir}/gold
|
%{_bindir}/gold
|
||||||
%{_bindir}/ld.gold
|
%{_bindir}/ld.gold
|
||||||
@ -634,7 +633,6 @@ fi;
|
|||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_prefix}/include/*.h
|
%{_prefix}/include/*.h
|
||||||
%{_libdir}/lib*.*a
|
%{_libdir}/lib*.*a
|
||||||
%{_libdir}/libctf.so
|
%{_libdir}/libctf.so
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- use fdupes on datadir
|
||||||
|
- remove RPM_BUILD_ROOT usage and other cleanups
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package cross-epiphany-binutils
|
# spec file for package cross-epiphany-binutils
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -23,6 +23,7 @@ ExcludeArch: epiphany
|
|||||||
BuildRequires: bc
|
BuildRequires: bc
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: dejagnu
|
BuildRequires: dejagnu
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
# for the testsuite
|
# for the testsuite
|
||||||
@ -431,26 +432,26 @@ cd build-dir
|
|||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
# installing native binutils
|
# installing native binutils
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-gold
|
make DESTDIR=%{buildroot} install-gold
|
||||||
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
|
ln -sf ld.gold %{buildroot}%{_bindir}/gold
|
||||||
%endif
|
%endif
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-info install
|
make DESTDIR=%{buildroot} install-info install
|
||||||
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
|
make -C gas/doc DESTDIR=%{buildroot} install-info-am install-am
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
|
make DESTDIR=%{buildroot} install-bfd install-opcodes
|
||||||
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
|
||||||
mv "%buildroot/%_bindir"/{ld,ld.bfd};
|
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
|
||||||
else
|
else
|
||||||
rm -f "%buildroot/%_bindir/ld";
|
rm -f "%{buildroot}/%_bindir/ld";
|
||||||
fi
|
fi
|
||||||
%if ! 0%{with libalternatives}
|
%if ! 0%{with libalternatives}
|
||||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
|
||||||
# Keep older versions of brp-symlink happy
|
# Keep older versions of brp-symlink happy
|
||||||
%if %{suse_version} < 1310
|
%if %{suse_version} < 1310
|
||||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
|
||||||
%endif
|
%endif
|
||||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
|
||||||
%else
|
%else
|
||||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
|
||||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||||
binary=%{_bindir}/ld.gold
|
binary=%{_bindir}/ld.gold
|
||||||
@ -460,24 +461,24 @@ binary=%{_bindir}/ld.bfd
|
|||||||
EOF
|
EOF
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
||||||
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
|
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
|
||||||
# Install header files
|
# Install header files
|
||||||
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
|
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
|
||||||
# We want the PIC libiberty.a
|
# We want the PIC libiberty.a
|
||||||
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
|
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
|
||||||
#
|
#
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
|
chmod a+x %{buildroot}%{_libdir}/libbfd-*
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
|
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
|
||||||
# No shared linking outside binutils
|
# No shared linking outside binutils
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.la
|
||||||
# Remove unwanted files to shut up rpm
|
# Remove unwanted files to shut up rpm
|
||||||
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
||||||
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
||||||
cd ..
|
cd ..
|
||||||
%find_lang binutils
|
%find_lang binutils
|
||||||
%find_lang bfd binutils.lang
|
%find_lang bfd binutils.lang
|
||||||
@ -488,45 +489,46 @@ cd ..
|
|||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%find_lang gold binutils-gold.lang
|
%find_lang gold binutils-gold.lang
|
||||||
%endif
|
%endif
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||||
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
|
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
|
||||||
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
|
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
|
||||||
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
|
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
|
||||||
%else
|
%else
|
||||||
# installing cross-TARGET-binutils and TARGET-binutils
|
# installing cross-TARGET-binutils and TARGET-binutils
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
make DESTDIR=%{buildroot} install
|
||||||
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
||||||
T=$(basename %buildroot/usr/%{TARGET_OS})
|
T=$(basename %{buildroot}/usr/%{TARGET_OS})
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
ln -sf /usr/bin/$T-$(basename $f) $f
|
ln -sf /usr/bin/$T-$(basename $f) $f
|
||||||
done
|
done
|
||||||
%if "%{TARGET}" == "arm"
|
%if "%{TARGET}" == "arm"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in arm-none-eabi; do
|
for p in arm-none-eabi; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "riscv64"
|
%if "%{TARGET}" == "riscv64"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in riscv64-elf; do
|
for p in riscv64-elf; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "avr"
|
%if "%{TARGET}" == "avr"
|
||||||
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
||||||
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
||||||
%endif
|
%endif
|
||||||
rm -rf $RPM_BUILD_ROOT%{_mandir}
|
rm -rf %{buildroot}%{_mandir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_infodir}
|
rm -rf %{buildroot}%{_infodir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
|
rm -rf %{buildroot}%{_prefix}/lib*
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
|
rm -rf %{buildroot}%{_prefix}/include
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
|
||||||
> ../binutils.lang
|
> ../binutils.lang
|
||||||
%endif
|
%endif
|
||||||
|
%fdupes %{buildroot}%{_prefix}
|
||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%post
|
%post
|
||||||
@ -586,12 +588,10 @@ fi;
|
|||||||
%postun -n libctf0 -p /sbin/ldconfig
|
%postun -n libctf0 -p /sbin/ldconfig
|
||||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun
|
%postun -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -f binutils.lang
|
%files -f binutils.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%{_docdir}/%{name}
|
%{_docdir}/%{name}
|
||||||
%{_prefix}/%{HOST}/bin/*
|
%{_prefix}/%{HOST}/bin/*
|
||||||
@ -621,7 +621,6 @@ fi;
|
|||||||
|
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%files gold -f binutils-gold.lang
|
%files gold -f binutils-gold.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc gold/NEWS gold/README
|
%doc gold/NEWS gold/README
|
||||||
%{_bindir}/gold
|
%{_bindir}/gold
|
||||||
%{_bindir}/ld.gold
|
%{_bindir}/ld.gold
|
||||||
@ -634,7 +633,6 @@ fi;
|
|||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_prefix}/include/*.h
|
%{_prefix}/include/*.h
|
||||||
%{_libdir}/lib*.*a
|
%{_libdir}/lib*.*a
|
||||||
%{_libdir}/libctf.so
|
%{_libdir}/libctf.so
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- use fdupes on datadir
|
||||||
|
- remove RPM_BUILD_ROOT usage and other cleanups
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package cross-hppa-binutils
|
# spec file for package cross-hppa-binutils
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -23,6 +23,7 @@ ExcludeArch: hppa
|
|||||||
BuildRequires: bc
|
BuildRequires: bc
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: dejagnu
|
BuildRequires: dejagnu
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
# for the testsuite
|
# for the testsuite
|
||||||
@ -431,26 +432,26 @@ cd build-dir
|
|||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
# installing native binutils
|
# installing native binutils
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-gold
|
make DESTDIR=%{buildroot} install-gold
|
||||||
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
|
ln -sf ld.gold %{buildroot}%{_bindir}/gold
|
||||||
%endif
|
%endif
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-info install
|
make DESTDIR=%{buildroot} install-info install
|
||||||
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
|
make -C gas/doc DESTDIR=%{buildroot} install-info-am install-am
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
|
make DESTDIR=%{buildroot} install-bfd install-opcodes
|
||||||
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
|
||||||
mv "%buildroot/%_bindir"/{ld,ld.bfd};
|
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
|
||||||
else
|
else
|
||||||
rm -f "%buildroot/%_bindir/ld";
|
rm -f "%{buildroot}/%_bindir/ld";
|
||||||
fi
|
fi
|
||||||
%if ! 0%{with libalternatives}
|
%if ! 0%{with libalternatives}
|
||||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
|
||||||
# Keep older versions of brp-symlink happy
|
# Keep older versions of brp-symlink happy
|
||||||
%if %{suse_version} < 1310
|
%if %{suse_version} < 1310
|
||||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
|
||||||
%endif
|
%endif
|
||||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
|
||||||
%else
|
%else
|
||||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
|
||||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||||
binary=%{_bindir}/ld.gold
|
binary=%{_bindir}/ld.gold
|
||||||
@ -460,24 +461,24 @@ binary=%{_bindir}/ld.bfd
|
|||||||
EOF
|
EOF
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
||||||
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
|
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
|
||||||
# Install header files
|
# Install header files
|
||||||
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
|
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
|
||||||
# We want the PIC libiberty.a
|
# We want the PIC libiberty.a
|
||||||
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
|
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
|
||||||
#
|
#
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
|
chmod a+x %{buildroot}%{_libdir}/libbfd-*
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
|
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
|
||||||
# No shared linking outside binutils
|
# No shared linking outside binutils
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.la
|
||||||
# Remove unwanted files to shut up rpm
|
# Remove unwanted files to shut up rpm
|
||||||
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
||||||
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
||||||
cd ..
|
cd ..
|
||||||
%find_lang binutils
|
%find_lang binutils
|
||||||
%find_lang bfd binutils.lang
|
%find_lang bfd binutils.lang
|
||||||
@ -488,45 +489,46 @@ cd ..
|
|||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%find_lang gold binutils-gold.lang
|
%find_lang gold binutils-gold.lang
|
||||||
%endif
|
%endif
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||||
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
|
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
|
||||||
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
|
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
|
||||||
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
|
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
|
||||||
%else
|
%else
|
||||||
# installing cross-TARGET-binutils and TARGET-binutils
|
# installing cross-TARGET-binutils and TARGET-binutils
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
make DESTDIR=%{buildroot} install
|
||||||
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
||||||
T=$(basename %buildroot/usr/%{TARGET_OS})
|
T=$(basename %{buildroot}/usr/%{TARGET_OS})
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
ln -sf /usr/bin/$T-$(basename $f) $f
|
ln -sf /usr/bin/$T-$(basename $f) $f
|
||||||
done
|
done
|
||||||
%if "%{TARGET}" == "arm"
|
%if "%{TARGET}" == "arm"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in arm-none-eabi; do
|
for p in arm-none-eabi; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "riscv64"
|
%if "%{TARGET}" == "riscv64"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in riscv64-elf; do
|
for p in riscv64-elf; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "avr"
|
%if "%{TARGET}" == "avr"
|
||||||
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
||||||
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
||||||
%endif
|
%endif
|
||||||
rm -rf $RPM_BUILD_ROOT%{_mandir}
|
rm -rf %{buildroot}%{_mandir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_infodir}
|
rm -rf %{buildroot}%{_infodir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
|
rm -rf %{buildroot}%{_prefix}/lib*
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
|
rm -rf %{buildroot}%{_prefix}/include
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
|
||||||
> ../binutils.lang
|
> ../binutils.lang
|
||||||
%endif
|
%endif
|
||||||
|
%fdupes %{buildroot}%{_prefix}
|
||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%post
|
%post
|
||||||
@ -586,12 +588,10 @@ fi;
|
|||||||
%postun -n libctf0 -p /sbin/ldconfig
|
%postun -n libctf0 -p /sbin/ldconfig
|
||||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun
|
%postun -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -f binutils.lang
|
%files -f binutils.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%{_docdir}/%{name}
|
%{_docdir}/%{name}
|
||||||
%{_prefix}/%{HOST}/bin/*
|
%{_prefix}/%{HOST}/bin/*
|
||||||
@ -621,7 +621,6 @@ fi;
|
|||||||
|
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%files gold -f binutils-gold.lang
|
%files gold -f binutils-gold.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc gold/NEWS gold/README
|
%doc gold/NEWS gold/README
|
||||||
%{_bindir}/gold
|
%{_bindir}/gold
|
||||||
%{_bindir}/ld.gold
|
%{_bindir}/ld.gold
|
||||||
@ -634,7 +633,6 @@ fi;
|
|||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_prefix}/include/*.h
|
%{_prefix}/include/*.h
|
||||||
%{_libdir}/lib*.*a
|
%{_libdir}/lib*.*a
|
||||||
%{_libdir}/libctf.so
|
%{_libdir}/libctf.so
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- use fdupes on datadir
|
||||||
|
- remove RPM_BUILD_ROOT usage and other cleanups
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package cross-hppa64-binutils
|
# spec file for package cross-hppa64-binutils
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -23,6 +23,7 @@ ExcludeArch: hppa64
|
|||||||
BuildRequires: bc
|
BuildRequires: bc
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: dejagnu
|
BuildRequires: dejagnu
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
# for the testsuite
|
# for the testsuite
|
||||||
@ -431,26 +432,26 @@ cd build-dir
|
|||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
# installing native binutils
|
# installing native binutils
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-gold
|
make DESTDIR=%{buildroot} install-gold
|
||||||
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
|
ln -sf ld.gold %{buildroot}%{_bindir}/gold
|
||||||
%endif
|
%endif
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-info install
|
make DESTDIR=%{buildroot} install-info install
|
||||||
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
|
make -C gas/doc DESTDIR=%{buildroot} install-info-am install-am
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
|
make DESTDIR=%{buildroot} install-bfd install-opcodes
|
||||||
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
|
||||||
mv "%buildroot/%_bindir"/{ld,ld.bfd};
|
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
|
||||||
else
|
else
|
||||||
rm -f "%buildroot/%_bindir/ld";
|
rm -f "%{buildroot}/%_bindir/ld";
|
||||||
fi
|
fi
|
||||||
%if ! 0%{with libalternatives}
|
%if ! 0%{with libalternatives}
|
||||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
|
||||||
# Keep older versions of brp-symlink happy
|
# Keep older versions of brp-symlink happy
|
||||||
%if %{suse_version} < 1310
|
%if %{suse_version} < 1310
|
||||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
|
||||||
%endif
|
%endif
|
||||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
|
||||||
%else
|
%else
|
||||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
|
||||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||||
binary=%{_bindir}/ld.gold
|
binary=%{_bindir}/ld.gold
|
||||||
@ -460,24 +461,24 @@ binary=%{_bindir}/ld.bfd
|
|||||||
EOF
|
EOF
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
||||||
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
|
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
|
||||||
# Install header files
|
# Install header files
|
||||||
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
|
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
|
||||||
# We want the PIC libiberty.a
|
# We want the PIC libiberty.a
|
||||||
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
|
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
|
||||||
#
|
#
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
|
chmod a+x %{buildroot}%{_libdir}/libbfd-*
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
|
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
|
||||||
# No shared linking outside binutils
|
# No shared linking outside binutils
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.la
|
||||||
# Remove unwanted files to shut up rpm
|
# Remove unwanted files to shut up rpm
|
||||||
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
||||||
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
||||||
cd ..
|
cd ..
|
||||||
%find_lang binutils
|
%find_lang binutils
|
||||||
%find_lang bfd binutils.lang
|
%find_lang bfd binutils.lang
|
||||||
@ -488,45 +489,46 @@ cd ..
|
|||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%find_lang gold binutils-gold.lang
|
%find_lang gold binutils-gold.lang
|
||||||
%endif
|
%endif
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||||
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
|
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
|
||||||
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
|
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
|
||||||
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
|
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
|
||||||
%else
|
%else
|
||||||
# installing cross-TARGET-binutils and TARGET-binutils
|
# installing cross-TARGET-binutils and TARGET-binutils
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
make DESTDIR=%{buildroot} install
|
||||||
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
||||||
T=$(basename %buildroot/usr/%{TARGET_OS})
|
T=$(basename %{buildroot}/usr/%{TARGET_OS})
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
ln -sf /usr/bin/$T-$(basename $f) $f
|
ln -sf /usr/bin/$T-$(basename $f) $f
|
||||||
done
|
done
|
||||||
%if "%{TARGET}" == "arm"
|
%if "%{TARGET}" == "arm"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in arm-none-eabi; do
|
for p in arm-none-eabi; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "riscv64"
|
%if "%{TARGET}" == "riscv64"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in riscv64-elf; do
|
for p in riscv64-elf; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "avr"
|
%if "%{TARGET}" == "avr"
|
||||||
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
||||||
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
||||||
%endif
|
%endif
|
||||||
rm -rf $RPM_BUILD_ROOT%{_mandir}
|
rm -rf %{buildroot}%{_mandir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_infodir}
|
rm -rf %{buildroot}%{_infodir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
|
rm -rf %{buildroot}%{_prefix}/lib*
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
|
rm -rf %{buildroot}%{_prefix}/include
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
|
||||||
> ../binutils.lang
|
> ../binutils.lang
|
||||||
%endif
|
%endif
|
||||||
|
%fdupes %{buildroot}%{_prefix}
|
||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%post
|
%post
|
||||||
@ -586,12 +588,10 @@ fi;
|
|||||||
%postun -n libctf0 -p /sbin/ldconfig
|
%postun -n libctf0 -p /sbin/ldconfig
|
||||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun
|
%postun -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -f binutils.lang
|
%files -f binutils.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%{_docdir}/%{name}
|
%{_docdir}/%{name}
|
||||||
%{_prefix}/%{HOST}/bin/*
|
%{_prefix}/%{HOST}/bin/*
|
||||||
@ -621,7 +621,6 @@ fi;
|
|||||||
|
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%files gold -f binutils-gold.lang
|
%files gold -f binutils-gold.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc gold/NEWS gold/README
|
%doc gold/NEWS gold/README
|
||||||
%{_bindir}/gold
|
%{_bindir}/gold
|
||||||
%{_bindir}/ld.gold
|
%{_bindir}/ld.gold
|
||||||
@ -634,7 +633,6 @@ fi;
|
|||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_prefix}/include/*.h
|
%{_prefix}/include/*.h
|
||||||
%{_libdir}/lib*.*a
|
%{_libdir}/lib*.*a
|
||||||
%{_libdir}/libctf.so
|
%{_libdir}/libctf.so
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- use fdupes on datadir
|
||||||
|
- remove RPM_BUILD_ROOT usage and other cleanups
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package cross-i386-binutils
|
# spec file for package cross-i386-binutils
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -23,6 +23,7 @@ ExcludeArch: %ix86
|
|||||||
BuildRequires: bc
|
BuildRequires: bc
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: dejagnu
|
BuildRequires: dejagnu
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
# for the testsuite
|
# for the testsuite
|
||||||
@ -431,26 +432,26 @@ cd build-dir
|
|||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
# installing native binutils
|
# installing native binutils
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-gold
|
make DESTDIR=%{buildroot} install-gold
|
||||||
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
|
ln -sf ld.gold %{buildroot}%{_bindir}/gold
|
||||||
%endif
|
%endif
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-info install
|
make DESTDIR=%{buildroot} install-info install
|
||||||
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
|
make -C gas/doc DESTDIR=%{buildroot} install-info-am install-am
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
|
make DESTDIR=%{buildroot} install-bfd install-opcodes
|
||||||
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
|
||||||
mv "%buildroot/%_bindir"/{ld,ld.bfd};
|
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
|
||||||
else
|
else
|
||||||
rm -f "%buildroot/%_bindir/ld";
|
rm -f "%{buildroot}/%_bindir/ld";
|
||||||
fi
|
fi
|
||||||
%if ! 0%{with libalternatives}
|
%if ! 0%{with libalternatives}
|
||||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
|
||||||
# Keep older versions of brp-symlink happy
|
# Keep older versions of brp-symlink happy
|
||||||
%if %{suse_version} < 1310
|
%if %{suse_version} < 1310
|
||||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
|
||||||
%endif
|
%endif
|
||||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
|
||||||
%else
|
%else
|
||||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
|
||||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||||
binary=%{_bindir}/ld.gold
|
binary=%{_bindir}/ld.gold
|
||||||
@ -460,24 +461,24 @@ binary=%{_bindir}/ld.bfd
|
|||||||
EOF
|
EOF
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
||||||
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
|
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
|
||||||
# Install header files
|
# Install header files
|
||||||
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
|
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
|
||||||
# We want the PIC libiberty.a
|
# We want the PIC libiberty.a
|
||||||
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
|
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
|
||||||
#
|
#
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
|
chmod a+x %{buildroot}%{_libdir}/libbfd-*
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
|
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
|
||||||
# No shared linking outside binutils
|
# No shared linking outside binutils
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.la
|
||||||
# Remove unwanted files to shut up rpm
|
# Remove unwanted files to shut up rpm
|
||||||
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
||||||
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
||||||
cd ..
|
cd ..
|
||||||
%find_lang binutils
|
%find_lang binutils
|
||||||
%find_lang bfd binutils.lang
|
%find_lang bfd binutils.lang
|
||||||
@ -488,45 +489,46 @@ cd ..
|
|||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%find_lang gold binutils-gold.lang
|
%find_lang gold binutils-gold.lang
|
||||||
%endif
|
%endif
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||||
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
|
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
|
||||||
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
|
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
|
||||||
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
|
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
|
||||||
%else
|
%else
|
||||||
# installing cross-TARGET-binutils and TARGET-binutils
|
# installing cross-TARGET-binutils and TARGET-binutils
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
make DESTDIR=%{buildroot} install
|
||||||
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
||||||
T=$(basename %buildroot/usr/%{TARGET_OS})
|
T=$(basename %{buildroot}/usr/%{TARGET_OS})
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
ln -sf /usr/bin/$T-$(basename $f) $f
|
ln -sf /usr/bin/$T-$(basename $f) $f
|
||||||
done
|
done
|
||||||
%if "%{TARGET}" == "arm"
|
%if "%{TARGET}" == "arm"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in arm-none-eabi; do
|
for p in arm-none-eabi; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "riscv64"
|
%if "%{TARGET}" == "riscv64"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in riscv64-elf; do
|
for p in riscv64-elf; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "avr"
|
%if "%{TARGET}" == "avr"
|
||||||
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
||||||
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
||||||
%endif
|
%endif
|
||||||
rm -rf $RPM_BUILD_ROOT%{_mandir}
|
rm -rf %{buildroot}%{_mandir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_infodir}
|
rm -rf %{buildroot}%{_infodir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
|
rm -rf %{buildroot}%{_prefix}/lib*
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
|
rm -rf %{buildroot}%{_prefix}/include
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
|
||||||
> ../binutils.lang
|
> ../binutils.lang
|
||||||
%endif
|
%endif
|
||||||
|
%fdupes %{buildroot}%{_prefix}
|
||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%post
|
%post
|
||||||
@ -586,12 +588,10 @@ fi;
|
|||||||
%postun -n libctf0 -p /sbin/ldconfig
|
%postun -n libctf0 -p /sbin/ldconfig
|
||||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun
|
%postun -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -f binutils.lang
|
%files -f binutils.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%{_docdir}/%{name}
|
%{_docdir}/%{name}
|
||||||
%{_prefix}/%{HOST}/bin/*
|
%{_prefix}/%{HOST}/bin/*
|
||||||
@ -621,7 +621,6 @@ fi;
|
|||||||
|
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%files gold -f binutils-gold.lang
|
%files gold -f binutils-gold.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc gold/NEWS gold/README
|
%doc gold/NEWS gold/README
|
||||||
%{_bindir}/gold
|
%{_bindir}/gold
|
||||||
%{_bindir}/ld.gold
|
%{_bindir}/ld.gold
|
||||||
@ -634,7 +633,6 @@ fi;
|
|||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_prefix}/include/*.h
|
%{_prefix}/include/*.h
|
||||||
%{_libdir}/lib*.*a
|
%{_libdir}/lib*.*a
|
||||||
%{_libdir}/libctf.so
|
%{_libdir}/libctf.so
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- use fdupes on datadir
|
||||||
|
- remove RPM_BUILD_ROOT usage and other cleanups
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package cross-ia64-binutils
|
# spec file for package cross-ia64-binutils
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -23,6 +23,7 @@ ExcludeArch: ia64
|
|||||||
BuildRequires: bc
|
BuildRequires: bc
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: dejagnu
|
BuildRequires: dejagnu
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
# for the testsuite
|
# for the testsuite
|
||||||
@ -431,26 +432,26 @@ cd build-dir
|
|||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
# installing native binutils
|
# installing native binutils
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-gold
|
make DESTDIR=%{buildroot} install-gold
|
||||||
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
|
ln -sf ld.gold %{buildroot}%{_bindir}/gold
|
||||||
%endif
|
%endif
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-info install
|
make DESTDIR=%{buildroot} install-info install
|
||||||
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
|
make -C gas/doc DESTDIR=%{buildroot} install-info-am install-am
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
|
make DESTDIR=%{buildroot} install-bfd install-opcodes
|
||||||
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
|
||||||
mv "%buildroot/%_bindir"/{ld,ld.bfd};
|
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
|
||||||
else
|
else
|
||||||
rm -f "%buildroot/%_bindir/ld";
|
rm -f "%{buildroot}/%_bindir/ld";
|
||||||
fi
|
fi
|
||||||
%if ! 0%{with libalternatives}
|
%if ! 0%{with libalternatives}
|
||||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
|
||||||
# Keep older versions of brp-symlink happy
|
# Keep older versions of brp-symlink happy
|
||||||
%if %{suse_version} < 1310
|
%if %{suse_version} < 1310
|
||||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
|
||||||
%endif
|
%endif
|
||||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
|
||||||
%else
|
%else
|
||||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
|
||||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||||
binary=%{_bindir}/ld.gold
|
binary=%{_bindir}/ld.gold
|
||||||
@ -460,24 +461,24 @@ binary=%{_bindir}/ld.bfd
|
|||||||
EOF
|
EOF
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
||||||
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
|
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
|
||||||
# Install header files
|
# Install header files
|
||||||
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
|
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
|
||||||
# We want the PIC libiberty.a
|
# We want the PIC libiberty.a
|
||||||
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
|
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
|
||||||
#
|
#
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
|
chmod a+x %{buildroot}%{_libdir}/libbfd-*
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
|
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
|
||||||
# No shared linking outside binutils
|
# No shared linking outside binutils
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.la
|
||||||
# Remove unwanted files to shut up rpm
|
# Remove unwanted files to shut up rpm
|
||||||
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
||||||
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
||||||
cd ..
|
cd ..
|
||||||
%find_lang binutils
|
%find_lang binutils
|
||||||
%find_lang bfd binutils.lang
|
%find_lang bfd binutils.lang
|
||||||
@ -488,45 +489,46 @@ cd ..
|
|||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%find_lang gold binutils-gold.lang
|
%find_lang gold binutils-gold.lang
|
||||||
%endif
|
%endif
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||||
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
|
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
|
||||||
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
|
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
|
||||||
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
|
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
|
||||||
%else
|
%else
|
||||||
# installing cross-TARGET-binutils and TARGET-binutils
|
# installing cross-TARGET-binutils and TARGET-binutils
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
make DESTDIR=%{buildroot} install
|
||||||
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
||||||
T=$(basename %buildroot/usr/%{TARGET_OS})
|
T=$(basename %{buildroot}/usr/%{TARGET_OS})
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
ln -sf /usr/bin/$T-$(basename $f) $f
|
ln -sf /usr/bin/$T-$(basename $f) $f
|
||||||
done
|
done
|
||||||
%if "%{TARGET}" == "arm"
|
%if "%{TARGET}" == "arm"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in arm-none-eabi; do
|
for p in arm-none-eabi; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "riscv64"
|
%if "%{TARGET}" == "riscv64"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in riscv64-elf; do
|
for p in riscv64-elf; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "avr"
|
%if "%{TARGET}" == "avr"
|
||||||
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
||||||
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
||||||
%endif
|
%endif
|
||||||
rm -rf $RPM_BUILD_ROOT%{_mandir}
|
rm -rf %{buildroot}%{_mandir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_infodir}
|
rm -rf %{buildroot}%{_infodir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
|
rm -rf %{buildroot}%{_prefix}/lib*
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
|
rm -rf %{buildroot}%{_prefix}/include
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
|
||||||
> ../binutils.lang
|
> ../binutils.lang
|
||||||
%endif
|
%endif
|
||||||
|
%fdupes %{buildroot}%{_prefix}
|
||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%post
|
%post
|
||||||
@ -586,12 +588,10 @@ fi;
|
|||||||
%postun -n libctf0 -p /sbin/ldconfig
|
%postun -n libctf0 -p /sbin/ldconfig
|
||||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun
|
%postun -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -f binutils.lang
|
%files -f binutils.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%{_docdir}/%{name}
|
%{_docdir}/%{name}
|
||||||
%{_prefix}/%{HOST}/bin/*
|
%{_prefix}/%{HOST}/bin/*
|
||||||
@ -621,7 +621,6 @@ fi;
|
|||||||
|
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%files gold -f binutils-gold.lang
|
%files gold -f binutils-gold.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc gold/NEWS gold/README
|
%doc gold/NEWS gold/README
|
||||||
%{_bindir}/gold
|
%{_bindir}/gold
|
||||||
%{_bindir}/ld.gold
|
%{_bindir}/ld.gold
|
||||||
@ -634,7 +633,6 @@ fi;
|
|||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_prefix}/include/*.h
|
%{_prefix}/include/*.h
|
||||||
%{_libdir}/lib*.*a
|
%{_libdir}/lib*.*a
|
||||||
%{_libdir}/libctf.so
|
%{_libdir}/libctf.so
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- use fdupes on datadir
|
||||||
|
- remove RPM_BUILD_ROOT usage and other cleanups
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package cross-m68k-binutils
|
# spec file for package cross-m68k-binutils
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -23,6 +23,7 @@ ExcludeArch: m68k
|
|||||||
BuildRequires: bc
|
BuildRequires: bc
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: dejagnu
|
BuildRequires: dejagnu
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
# for the testsuite
|
# for the testsuite
|
||||||
@ -431,26 +432,26 @@ cd build-dir
|
|||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
# installing native binutils
|
# installing native binutils
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-gold
|
make DESTDIR=%{buildroot} install-gold
|
||||||
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
|
ln -sf ld.gold %{buildroot}%{_bindir}/gold
|
||||||
%endif
|
%endif
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-info install
|
make DESTDIR=%{buildroot} install-info install
|
||||||
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
|
make -C gas/doc DESTDIR=%{buildroot} install-info-am install-am
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
|
make DESTDIR=%{buildroot} install-bfd install-opcodes
|
||||||
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
|
||||||
mv "%buildroot/%_bindir"/{ld,ld.bfd};
|
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
|
||||||
else
|
else
|
||||||
rm -f "%buildroot/%_bindir/ld";
|
rm -f "%{buildroot}/%_bindir/ld";
|
||||||
fi
|
fi
|
||||||
%if ! 0%{with libalternatives}
|
%if ! 0%{with libalternatives}
|
||||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
|
||||||
# Keep older versions of brp-symlink happy
|
# Keep older versions of brp-symlink happy
|
||||||
%if %{suse_version} < 1310
|
%if %{suse_version} < 1310
|
||||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
|
||||||
%endif
|
%endif
|
||||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
|
||||||
%else
|
%else
|
||||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
|
||||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||||
binary=%{_bindir}/ld.gold
|
binary=%{_bindir}/ld.gold
|
||||||
@ -460,24 +461,24 @@ binary=%{_bindir}/ld.bfd
|
|||||||
EOF
|
EOF
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
||||||
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
|
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
|
||||||
# Install header files
|
# Install header files
|
||||||
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
|
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
|
||||||
# We want the PIC libiberty.a
|
# We want the PIC libiberty.a
|
||||||
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
|
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
|
||||||
#
|
#
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
|
chmod a+x %{buildroot}%{_libdir}/libbfd-*
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
|
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
|
||||||
# No shared linking outside binutils
|
# No shared linking outside binutils
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.la
|
||||||
# Remove unwanted files to shut up rpm
|
# Remove unwanted files to shut up rpm
|
||||||
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
||||||
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
||||||
cd ..
|
cd ..
|
||||||
%find_lang binutils
|
%find_lang binutils
|
||||||
%find_lang bfd binutils.lang
|
%find_lang bfd binutils.lang
|
||||||
@ -488,45 +489,46 @@ cd ..
|
|||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%find_lang gold binutils-gold.lang
|
%find_lang gold binutils-gold.lang
|
||||||
%endif
|
%endif
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||||
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
|
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
|
||||||
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
|
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
|
||||||
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
|
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
|
||||||
%else
|
%else
|
||||||
# installing cross-TARGET-binutils and TARGET-binutils
|
# installing cross-TARGET-binutils and TARGET-binutils
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
make DESTDIR=%{buildroot} install
|
||||||
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
||||||
T=$(basename %buildroot/usr/%{TARGET_OS})
|
T=$(basename %{buildroot}/usr/%{TARGET_OS})
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
ln -sf /usr/bin/$T-$(basename $f) $f
|
ln -sf /usr/bin/$T-$(basename $f) $f
|
||||||
done
|
done
|
||||||
%if "%{TARGET}" == "arm"
|
%if "%{TARGET}" == "arm"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in arm-none-eabi; do
|
for p in arm-none-eabi; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "riscv64"
|
%if "%{TARGET}" == "riscv64"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in riscv64-elf; do
|
for p in riscv64-elf; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "avr"
|
%if "%{TARGET}" == "avr"
|
||||||
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
||||||
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
||||||
%endif
|
%endif
|
||||||
rm -rf $RPM_BUILD_ROOT%{_mandir}
|
rm -rf %{buildroot}%{_mandir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_infodir}
|
rm -rf %{buildroot}%{_infodir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
|
rm -rf %{buildroot}%{_prefix}/lib*
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
|
rm -rf %{buildroot}%{_prefix}/include
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
|
||||||
> ../binutils.lang
|
> ../binutils.lang
|
||||||
%endif
|
%endif
|
||||||
|
%fdupes %{buildroot}%{_prefix}
|
||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%post
|
%post
|
||||||
@ -586,12 +588,10 @@ fi;
|
|||||||
%postun -n libctf0 -p /sbin/ldconfig
|
%postun -n libctf0 -p /sbin/ldconfig
|
||||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun
|
%postun -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -f binutils.lang
|
%files -f binutils.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%{_docdir}/%{name}
|
%{_docdir}/%{name}
|
||||||
%{_prefix}/%{HOST}/bin/*
|
%{_prefix}/%{HOST}/bin/*
|
||||||
@ -621,7 +621,6 @@ fi;
|
|||||||
|
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%files gold -f binutils-gold.lang
|
%files gold -f binutils-gold.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc gold/NEWS gold/README
|
%doc gold/NEWS gold/README
|
||||||
%{_bindir}/gold
|
%{_bindir}/gold
|
||||||
%{_bindir}/ld.gold
|
%{_bindir}/ld.gold
|
||||||
@ -634,7 +633,6 @@ fi;
|
|||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_prefix}/include/*.h
|
%{_prefix}/include/*.h
|
||||||
%{_libdir}/lib*.*a
|
%{_libdir}/lib*.*a
|
||||||
%{_libdir}/libctf.so
|
%{_libdir}/libctf.so
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- use fdupes on datadir
|
||||||
|
- remove RPM_BUILD_ROOT usage and other cleanups
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package cross-mips-binutils
|
# spec file for package cross-mips-binutils
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -23,6 +23,7 @@ ExcludeArch: mips
|
|||||||
BuildRequires: bc
|
BuildRequires: bc
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: dejagnu
|
BuildRequires: dejagnu
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
# for the testsuite
|
# for the testsuite
|
||||||
@ -431,26 +432,26 @@ cd build-dir
|
|||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
# installing native binutils
|
# installing native binutils
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-gold
|
make DESTDIR=%{buildroot} install-gold
|
||||||
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
|
ln -sf ld.gold %{buildroot}%{_bindir}/gold
|
||||||
%endif
|
%endif
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-info install
|
make DESTDIR=%{buildroot} install-info install
|
||||||
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
|
make -C gas/doc DESTDIR=%{buildroot} install-info-am install-am
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
|
make DESTDIR=%{buildroot} install-bfd install-opcodes
|
||||||
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
|
||||||
mv "%buildroot/%_bindir"/{ld,ld.bfd};
|
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
|
||||||
else
|
else
|
||||||
rm -f "%buildroot/%_bindir/ld";
|
rm -f "%{buildroot}/%_bindir/ld";
|
||||||
fi
|
fi
|
||||||
%if ! 0%{with libalternatives}
|
%if ! 0%{with libalternatives}
|
||||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
|
||||||
# Keep older versions of brp-symlink happy
|
# Keep older versions of brp-symlink happy
|
||||||
%if %{suse_version} < 1310
|
%if %{suse_version} < 1310
|
||||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
|
||||||
%endif
|
%endif
|
||||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
|
||||||
%else
|
%else
|
||||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
|
||||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||||
binary=%{_bindir}/ld.gold
|
binary=%{_bindir}/ld.gold
|
||||||
@ -460,24 +461,24 @@ binary=%{_bindir}/ld.bfd
|
|||||||
EOF
|
EOF
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
||||||
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
|
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
|
||||||
# Install header files
|
# Install header files
|
||||||
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
|
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
|
||||||
# We want the PIC libiberty.a
|
# We want the PIC libiberty.a
|
||||||
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
|
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
|
||||||
#
|
#
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
|
chmod a+x %{buildroot}%{_libdir}/libbfd-*
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
|
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
|
||||||
# No shared linking outside binutils
|
# No shared linking outside binutils
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.la
|
||||||
# Remove unwanted files to shut up rpm
|
# Remove unwanted files to shut up rpm
|
||||||
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
||||||
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
||||||
cd ..
|
cd ..
|
||||||
%find_lang binutils
|
%find_lang binutils
|
||||||
%find_lang bfd binutils.lang
|
%find_lang bfd binutils.lang
|
||||||
@ -488,45 +489,46 @@ cd ..
|
|||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%find_lang gold binutils-gold.lang
|
%find_lang gold binutils-gold.lang
|
||||||
%endif
|
%endif
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||||
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
|
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
|
||||||
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
|
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
|
||||||
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
|
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
|
||||||
%else
|
%else
|
||||||
# installing cross-TARGET-binutils and TARGET-binutils
|
# installing cross-TARGET-binutils and TARGET-binutils
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
make DESTDIR=%{buildroot} install
|
||||||
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
||||||
T=$(basename %buildroot/usr/%{TARGET_OS})
|
T=$(basename %{buildroot}/usr/%{TARGET_OS})
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
ln -sf /usr/bin/$T-$(basename $f) $f
|
ln -sf /usr/bin/$T-$(basename $f) $f
|
||||||
done
|
done
|
||||||
%if "%{TARGET}" == "arm"
|
%if "%{TARGET}" == "arm"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in arm-none-eabi; do
|
for p in arm-none-eabi; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "riscv64"
|
%if "%{TARGET}" == "riscv64"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in riscv64-elf; do
|
for p in riscv64-elf; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "avr"
|
%if "%{TARGET}" == "avr"
|
||||||
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
||||||
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
||||||
%endif
|
%endif
|
||||||
rm -rf $RPM_BUILD_ROOT%{_mandir}
|
rm -rf %{buildroot}%{_mandir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_infodir}
|
rm -rf %{buildroot}%{_infodir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
|
rm -rf %{buildroot}%{_prefix}/lib*
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
|
rm -rf %{buildroot}%{_prefix}/include
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
|
||||||
> ../binutils.lang
|
> ../binutils.lang
|
||||||
%endif
|
%endif
|
||||||
|
%fdupes %{buildroot}%{_prefix}
|
||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%post
|
%post
|
||||||
@ -586,12 +588,10 @@ fi;
|
|||||||
%postun -n libctf0 -p /sbin/ldconfig
|
%postun -n libctf0 -p /sbin/ldconfig
|
||||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun
|
%postun -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -f binutils.lang
|
%files -f binutils.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%{_docdir}/%{name}
|
%{_docdir}/%{name}
|
||||||
%{_prefix}/%{HOST}/bin/*
|
%{_prefix}/%{HOST}/bin/*
|
||||||
@ -621,7 +621,6 @@ fi;
|
|||||||
|
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%files gold -f binutils-gold.lang
|
%files gold -f binutils-gold.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc gold/NEWS gold/README
|
%doc gold/NEWS gold/README
|
||||||
%{_bindir}/gold
|
%{_bindir}/gold
|
||||||
%{_bindir}/ld.gold
|
%{_bindir}/ld.gold
|
||||||
@ -634,7 +633,6 @@ fi;
|
|||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_prefix}/include/*.h
|
%{_prefix}/include/*.h
|
||||||
%{_libdir}/lib*.*a
|
%{_libdir}/lib*.*a
|
||||||
%{_libdir}/libctf.so
|
%{_libdir}/libctf.so
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- use fdupes on datadir
|
||||||
|
- remove RPM_BUILD_ROOT usage and other cleanups
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package cross-ppc-binutils
|
# spec file for package cross-ppc-binutils
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -23,6 +23,7 @@ ExcludeArch: ppc
|
|||||||
BuildRequires: bc
|
BuildRequires: bc
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: dejagnu
|
BuildRequires: dejagnu
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
# for the testsuite
|
# for the testsuite
|
||||||
@ -431,26 +432,26 @@ cd build-dir
|
|||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
# installing native binutils
|
# installing native binutils
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-gold
|
make DESTDIR=%{buildroot} install-gold
|
||||||
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
|
ln -sf ld.gold %{buildroot}%{_bindir}/gold
|
||||||
%endif
|
%endif
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-info install
|
make DESTDIR=%{buildroot} install-info install
|
||||||
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
|
make -C gas/doc DESTDIR=%{buildroot} install-info-am install-am
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
|
make DESTDIR=%{buildroot} install-bfd install-opcodes
|
||||||
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
|
||||||
mv "%buildroot/%_bindir"/{ld,ld.bfd};
|
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
|
||||||
else
|
else
|
||||||
rm -f "%buildroot/%_bindir/ld";
|
rm -f "%{buildroot}/%_bindir/ld";
|
||||||
fi
|
fi
|
||||||
%if ! 0%{with libalternatives}
|
%if ! 0%{with libalternatives}
|
||||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
|
||||||
# Keep older versions of brp-symlink happy
|
# Keep older versions of brp-symlink happy
|
||||||
%if %{suse_version} < 1310
|
%if %{suse_version} < 1310
|
||||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
|
||||||
%endif
|
%endif
|
||||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
|
||||||
%else
|
%else
|
||||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
|
||||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||||
binary=%{_bindir}/ld.gold
|
binary=%{_bindir}/ld.gold
|
||||||
@ -460,24 +461,24 @@ binary=%{_bindir}/ld.bfd
|
|||||||
EOF
|
EOF
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
||||||
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
|
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
|
||||||
# Install header files
|
# Install header files
|
||||||
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
|
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
|
||||||
# We want the PIC libiberty.a
|
# We want the PIC libiberty.a
|
||||||
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
|
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
|
||||||
#
|
#
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
|
chmod a+x %{buildroot}%{_libdir}/libbfd-*
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
|
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
|
||||||
# No shared linking outside binutils
|
# No shared linking outside binutils
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.la
|
||||||
# Remove unwanted files to shut up rpm
|
# Remove unwanted files to shut up rpm
|
||||||
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
||||||
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
||||||
cd ..
|
cd ..
|
||||||
%find_lang binutils
|
%find_lang binutils
|
||||||
%find_lang bfd binutils.lang
|
%find_lang bfd binutils.lang
|
||||||
@ -488,45 +489,46 @@ cd ..
|
|||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%find_lang gold binutils-gold.lang
|
%find_lang gold binutils-gold.lang
|
||||||
%endif
|
%endif
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||||
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
|
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
|
||||||
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
|
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
|
||||||
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
|
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
|
||||||
%else
|
%else
|
||||||
# installing cross-TARGET-binutils and TARGET-binutils
|
# installing cross-TARGET-binutils and TARGET-binutils
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
make DESTDIR=%{buildroot} install
|
||||||
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
||||||
T=$(basename %buildroot/usr/%{TARGET_OS})
|
T=$(basename %{buildroot}/usr/%{TARGET_OS})
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
ln -sf /usr/bin/$T-$(basename $f) $f
|
ln -sf /usr/bin/$T-$(basename $f) $f
|
||||||
done
|
done
|
||||||
%if "%{TARGET}" == "arm"
|
%if "%{TARGET}" == "arm"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in arm-none-eabi; do
|
for p in arm-none-eabi; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "riscv64"
|
%if "%{TARGET}" == "riscv64"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in riscv64-elf; do
|
for p in riscv64-elf; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "avr"
|
%if "%{TARGET}" == "avr"
|
||||||
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
||||||
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
||||||
%endif
|
%endif
|
||||||
rm -rf $RPM_BUILD_ROOT%{_mandir}
|
rm -rf %{buildroot}%{_mandir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_infodir}
|
rm -rf %{buildroot}%{_infodir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
|
rm -rf %{buildroot}%{_prefix}/lib*
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
|
rm -rf %{buildroot}%{_prefix}/include
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
|
||||||
> ../binutils.lang
|
> ../binutils.lang
|
||||||
%endif
|
%endif
|
||||||
|
%fdupes %{buildroot}%{_prefix}
|
||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%post
|
%post
|
||||||
@ -586,12 +588,10 @@ fi;
|
|||||||
%postun -n libctf0 -p /sbin/ldconfig
|
%postun -n libctf0 -p /sbin/ldconfig
|
||||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun
|
%postun -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -f binutils.lang
|
%files -f binutils.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%{_docdir}/%{name}
|
%{_docdir}/%{name}
|
||||||
%{_prefix}/%{HOST}/bin/*
|
%{_prefix}/%{HOST}/bin/*
|
||||||
@ -621,7 +621,6 @@ fi;
|
|||||||
|
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%files gold -f binutils-gold.lang
|
%files gold -f binutils-gold.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc gold/NEWS gold/README
|
%doc gold/NEWS gold/README
|
||||||
%{_bindir}/gold
|
%{_bindir}/gold
|
||||||
%{_bindir}/ld.gold
|
%{_bindir}/ld.gold
|
||||||
@ -634,7 +633,6 @@ fi;
|
|||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_prefix}/include/*.h
|
%{_prefix}/include/*.h
|
||||||
%{_libdir}/lib*.*a
|
%{_libdir}/lib*.*a
|
||||||
%{_libdir}/libctf.so
|
%{_libdir}/libctf.so
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- use fdupes on datadir
|
||||||
|
- remove RPM_BUILD_ROOT usage and other cleanups
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package cross-ppc64-binutils
|
# spec file for package cross-ppc64-binutils
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -23,6 +23,7 @@ ExcludeArch: ppc64
|
|||||||
BuildRequires: bc
|
BuildRequires: bc
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: dejagnu
|
BuildRequires: dejagnu
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
# for the testsuite
|
# for the testsuite
|
||||||
@ -431,26 +432,26 @@ cd build-dir
|
|||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
# installing native binutils
|
# installing native binutils
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-gold
|
make DESTDIR=%{buildroot} install-gold
|
||||||
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
|
ln -sf ld.gold %{buildroot}%{_bindir}/gold
|
||||||
%endif
|
%endif
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-info install
|
make DESTDIR=%{buildroot} install-info install
|
||||||
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
|
make -C gas/doc DESTDIR=%{buildroot} install-info-am install-am
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
|
make DESTDIR=%{buildroot} install-bfd install-opcodes
|
||||||
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
|
||||||
mv "%buildroot/%_bindir"/{ld,ld.bfd};
|
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
|
||||||
else
|
else
|
||||||
rm -f "%buildroot/%_bindir/ld";
|
rm -f "%{buildroot}/%_bindir/ld";
|
||||||
fi
|
fi
|
||||||
%if ! 0%{with libalternatives}
|
%if ! 0%{with libalternatives}
|
||||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
|
||||||
# Keep older versions of brp-symlink happy
|
# Keep older versions of brp-symlink happy
|
||||||
%if %{suse_version} < 1310
|
%if %{suse_version} < 1310
|
||||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
|
||||||
%endif
|
%endif
|
||||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
|
||||||
%else
|
%else
|
||||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
|
||||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||||
binary=%{_bindir}/ld.gold
|
binary=%{_bindir}/ld.gold
|
||||||
@ -460,24 +461,24 @@ binary=%{_bindir}/ld.bfd
|
|||||||
EOF
|
EOF
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
||||||
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
|
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
|
||||||
# Install header files
|
# Install header files
|
||||||
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
|
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
|
||||||
# We want the PIC libiberty.a
|
# We want the PIC libiberty.a
|
||||||
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
|
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
|
||||||
#
|
#
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
|
chmod a+x %{buildroot}%{_libdir}/libbfd-*
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
|
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
|
||||||
# No shared linking outside binutils
|
# No shared linking outside binutils
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.la
|
||||||
# Remove unwanted files to shut up rpm
|
# Remove unwanted files to shut up rpm
|
||||||
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
||||||
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
||||||
cd ..
|
cd ..
|
||||||
%find_lang binutils
|
%find_lang binutils
|
||||||
%find_lang bfd binutils.lang
|
%find_lang bfd binutils.lang
|
||||||
@ -488,45 +489,46 @@ cd ..
|
|||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%find_lang gold binutils-gold.lang
|
%find_lang gold binutils-gold.lang
|
||||||
%endif
|
%endif
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||||
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
|
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
|
||||||
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
|
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
|
||||||
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
|
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
|
||||||
%else
|
%else
|
||||||
# installing cross-TARGET-binutils and TARGET-binutils
|
# installing cross-TARGET-binutils and TARGET-binutils
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
make DESTDIR=%{buildroot} install
|
||||||
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
||||||
T=$(basename %buildroot/usr/%{TARGET_OS})
|
T=$(basename %{buildroot}/usr/%{TARGET_OS})
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
ln -sf /usr/bin/$T-$(basename $f) $f
|
ln -sf /usr/bin/$T-$(basename $f) $f
|
||||||
done
|
done
|
||||||
%if "%{TARGET}" == "arm"
|
%if "%{TARGET}" == "arm"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in arm-none-eabi; do
|
for p in arm-none-eabi; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "riscv64"
|
%if "%{TARGET}" == "riscv64"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in riscv64-elf; do
|
for p in riscv64-elf; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "avr"
|
%if "%{TARGET}" == "avr"
|
||||||
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
||||||
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
||||||
%endif
|
%endif
|
||||||
rm -rf $RPM_BUILD_ROOT%{_mandir}
|
rm -rf %{buildroot}%{_mandir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_infodir}
|
rm -rf %{buildroot}%{_infodir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
|
rm -rf %{buildroot}%{_prefix}/lib*
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
|
rm -rf %{buildroot}%{_prefix}/include
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
|
||||||
> ../binutils.lang
|
> ../binutils.lang
|
||||||
%endif
|
%endif
|
||||||
|
%fdupes %{buildroot}%{_prefix}
|
||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%post
|
%post
|
||||||
@ -586,12 +588,10 @@ fi;
|
|||||||
%postun -n libctf0 -p /sbin/ldconfig
|
%postun -n libctf0 -p /sbin/ldconfig
|
||||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun
|
%postun -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -f binutils.lang
|
%files -f binutils.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%{_docdir}/%{name}
|
%{_docdir}/%{name}
|
||||||
%{_prefix}/%{HOST}/bin/*
|
%{_prefix}/%{HOST}/bin/*
|
||||||
@ -621,7 +621,6 @@ fi;
|
|||||||
|
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%files gold -f binutils-gold.lang
|
%files gold -f binutils-gold.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc gold/NEWS gold/README
|
%doc gold/NEWS gold/README
|
||||||
%{_bindir}/gold
|
%{_bindir}/gold
|
||||||
%{_bindir}/ld.gold
|
%{_bindir}/ld.gold
|
||||||
@ -634,7 +633,6 @@ fi;
|
|||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_prefix}/include/*.h
|
%{_prefix}/include/*.h
|
||||||
%{_libdir}/lib*.*a
|
%{_libdir}/lib*.*a
|
||||||
%{_libdir}/libctf.so
|
%{_libdir}/libctf.so
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- use fdupes on datadir
|
||||||
|
- remove RPM_BUILD_ROOT usage and other cleanups
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package cross-ppc64le-binutils
|
# spec file for package cross-ppc64le-binutils
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -23,6 +23,7 @@ ExcludeArch: ppc64le
|
|||||||
BuildRequires: bc
|
BuildRequires: bc
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: dejagnu
|
BuildRequires: dejagnu
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
# for the testsuite
|
# for the testsuite
|
||||||
@ -431,26 +432,26 @@ cd build-dir
|
|||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
# installing native binutils
|
# installing native binutils
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-gold
|
make DESTDIR=%{buildroot} install-gold
|
||||||
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
|
ln -sf ld.gold %{buildroot}%{_bindir}/gold
|
||||||
%endif
|
%endif
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-info install
|
make DESTDIR=%{buildroot} install-info install
|
||||||
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
|
make -C gas/doc DESTDIR=%{buildroot} install-info-am install-am
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
|
make DESTDIR=%{buildroot} install-bfd install-opcodes
|
||||||
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
|
||||||
mv "%buildroot/%_bindir"/{ld,ld.bfd};
|
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
|
||||||
else
|
else
|
||||||
rm -f "%buildroot/%_bindir/ld";
|
rm -f "%{buildroot}/%_bindir/ld";
|
||||||
fi
|
fi
|
||||||
%if ! 0%{with libalternatives}
|
%if ! 0%{with libalternatives}
|
||||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
|
||||||
# Keep older versions of brp-symlink happy
|
# Keep older versions of brp-symlink happy
|
||||||
%if %{suse_version} < 1310
|
%if %{suse_version} < 1310
|
||||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
|
||||||
%endif
|
%endif
|
||||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
|
||||||
%else
|
%else
|
||||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
|
||||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||||
binary=%{_bindir}/ld.gold
|
binary=%{_bindir}/ld.gold
|
||||||
@ -460,24 +461,24 @@ binary=%{_bindir}/ld.bfd
|
|||||||
EOF
|
EOF
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
||||||
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
|
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
|
||||||
# Install header files
|
# Install header files
|
||||||
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
|
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
|
||||||
# We want the PIC libiberty.a
|
# We want the PIC libiberty.a
|
||||||
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
|
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
|
||||||
#
|
#
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
|
chmod a+x %{buildroot}%{_libdir}/libbfd-*
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
|
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
|
||||||
# No shared linking outside binutils
|
# No shared linking outside binutils
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.la
|
||||||
# Remove unwanted files to shut up rpm
|
# Remove unwanted files to shut up rpm
|
||||||
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
||||||
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
||||||
cd ..
|
cd ..
|
||||||
%find_lang binutils
|
%find_lang binutils
|
||||||
%find_lang bfd binutils.lang
|
%find_lang bfd binutils.lang
|
||||||
@ -488,45 +489,46 @@ cd ..
|
|||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%find_lang gold binutils-gold.lang
|
%find_lang gold binutils-gold.lang
|
||||||
%endif
|
%endif
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||||
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
|
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
|
||||||
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
|
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
|
||||||
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
|
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
|
||||||
%else
|
%else
|
||||||
# installing cross-TARGET-binutils and TARGET-binutils
|
# installing cross-TARGET-binutils and TARGET-binutils
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
make DESTDIR=%{buildroot} install
|
||||||
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
||||||
T=$(basename %buildroot/usr/%{TARGET_OS})
|
T=$(basename %{buildroot}/usr/%{TARGET_OS})
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
ln -sf /usr/bin/$T-$(basename $f) $f
|
ln -sf /usr/bin/$T-$(basename $f) $f
|
||||||
done
|
done
|
||||||
%if "%{TARGET}" == "arm"
|
%if "%{TARGET}" == "arm"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in arm-none-eabi; do
|
for p in arm-none-eabi; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "riscv64"
|
%if "%{TARGET}" == "riscv64"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in riscv64-elf; do
|
for p in riscv64-elf; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "avr"
|
%if "%{TARGET}" == "avr"
|
||||||
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
||||||
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
||||||
%endif
|
%endif
|
||||||
rm -rf $RPM_BUILD_ROOT%{_mandir}
|
rm -rf %{buildroot}%{_mandir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_infodir}
|
rm -rf %{buildroot}%{_infodir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
|
rm -rf %{buildroot}%{_prefix}/lib*
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
|
rm -rf %{buildroot}%{_prefix}/include
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
|
||||||
> ../binutils.lang
|
> ../binutils.lang
|
||||||
%endif
|
%endif
|
||||||
|
%fdupes %{buildroot}%{_prefix}
|
||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%post
|
%post
|
||||||
@ -586,12 +588,10 @@ fi;
|
|||||||
%postun -n libctf0 -p /sbin/ldconfig
|
%postun -n libctf0 -p /sbin/ldconfig
|
||||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun
|
%postun -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -f binutils.lang
|
%files -f binutils.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%{_docdir}/%{name}
|
%{_docdir}/%{name}
|
||||||
%{_prefix}/%{HOST}/bin/*
|
%{_prefix}/%{HOST}/bin/*
|
||||||
@ -621,7 +621,6 @@ fi;
|
|||||||
|
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%files gold -f binutils-gold.lang
|
%files gold -f binutils-gold.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc gold/NEWS gold/README
|
%doc gold/NEWS gold/README
|
||||||
%{_bindir}/gold
|
%{_bindir}/gold
|
||||||
%{_bindir}/ld.gold
|
%{_bindir}/ld.gold
|
||||||
@ -634,7 +633,6 @@ fi;
|
|||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_prefix}/include/*.h
|
%{_prefix}/include/*.h
|
||||||
%{_libdir}/lib*.*a
|
%{_libdir}/lib*.*a
|
||||||
%{_libdir}/libctf.so
|
%{_libdir}/libctf.so
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- use fdupes on datadir
|
||||||
|
- remove RPM_BUILD_ROOT usage and other cleanups
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package cross-riscv64-binutils
|
# spec file for package cross-riscv64-binutils
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -23,6 +23,7 @@ ExcludeArch: riscv64
|
|||||||
BuildRequires: bc
|
BuildRequires: bc
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: dejagnu
|
BuildRequires: dejagnu
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
# for the testsuite
|
# for the testsuite
|
||||||
@ -431,26 +432,26 @@ cd build-dir
|
|||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
# installing native binutils
|
# installing native binutils
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-gold
|
make DESTDIR=%{buildroot} install-gold
|
||||||
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
|
ln -sf ld.gold %{buildroot}%{_bindir}/gold
|
||||||
%endif
|
%endif
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-info install
|
make DESTDIR=%{buildroot} install-info install
|
||||||
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
|
make -C gas/doc DESTDIR=%{buildroot} install-info-am install-am
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
|
make DESTDIR=%{buildroot} install-bfd install-opcodes
|
||||||
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
|
||||||
mv "%buildroot/%_bindir"/{ld,ld.bfd};
|
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
|
||||||
else
|
else
|
||||||
rm -f "%buildroot/%_bindir/ld";
|
rm -f "%{buildroot}/%_bindir/ld";
|
||||||
fi
|
fi
|
||||||
%if ! 0%{with libalternatives}
|
%if ! 0%{with libalternatives}
|
||||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
|
||||||
# Keep older versions of brp-symlink happy
|
# Keep older versions of brp-symlink happy
|
||||||
%if %{suse_version} < 1310
|
%if %{suse_version} < 1310
|
||||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
|
||||||
%endif
|
%endif
|
||||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
|
||||||
%else
|
%else
|
||||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
|
||||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||||
binary=%{_bindir}/ld.gold
|
binary=%{_bindir}/ld.gold
|
||||||
@ -460,24 +461,24 @@ binary=%{_bindir}/ld.bfd
|
|||||||
EOF
|
EOF
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
||||||
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
|
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
|
||||||
# Install header files
|
# Install header files
|
||||||
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
|
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
|
||||||
# We want the PIC libiberty.a
|
# We want the PIC libiberty.a
|
||||||
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
|
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
|
||||||
#
|
#
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
|
chmod a+x %{buildroot}%{_libdir}/libbfd-*
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
|
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
|
||||||
# No shared linking outside binutils
|
# No shared linking outside binutils
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.la
|
||||||
# Remove unwanted files to shut up rpm
|
# Remove unwanted files to shut up rpm
|
||||||
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
||||||
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
||||||
cd ..
|
cd ..
|
||||||
%find_lang binutils
|
%find_lang binutils
|
||||||
%find_lang bfd binutils.lang
|
%find_lang bfd binutils.lang
|
||||||
@ -488,45 +489,46 @@ cd ..
|
|||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%find_lang gold binutils-gold.lang
|
%find_lang gold binutils-gold.lang
|
||||||
%endif
|
%endif
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||||
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
|
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
|
||||||
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
|
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
|
||||||
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
|
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
|
||||||
%else
|
%else
|
||||||
# installing cross-TARGET-binutils and TARGET-binutils
|
# installing cross-TARGET-binutils and TARGET-binutils
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
make DESTDIR=%{buildroot} install
|
||||||
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
||||||
T=$(basename %buildroot/usr/%{TARGET_OS})
|
T=$(basename %{buildroot}/usr/%{TARGET_OS})
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
ln -sf /usr/bin/$T-$(basename $f) $f
|
ln -sf /usr/bin/$T-$(basename $f) $f
|
||||||
done
|
done
|
||||||
%if "%{TARGET}" == "arm"
|
%if "%{TARGET}" == "arm"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in arm-none-eabi; do
|
for p in arm-none-eabi; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "riscv64"
|
%if "%{TARGET}" == "riscv64"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in riscv64-elf; do
|
for p in riscv64-elf; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "avr"
|
%if "%{TARGET}" == "avr"
|
||||||
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
||||||
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
||||||
%endif
|
%endif
|
||||||
rm -rf $RPM_BUILD_ROOT%{_mandir}
|
rm -rf %{buildroot}%{_mandir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_infodir}
|
rm -rf %{buildroot}%{_infodir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
|
rm -rf %{buildroot}%{_prefix}/lib*
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
|
rm -rf %{buildroot}%{_prefix}/include
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
|
||||||
> ../binutils.lang
|
> ../binutils.lang
|
||||||
%endif
|
%endif
|
||||||
|
%fdupes %{buildroot}%{_prefix}
|
||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%post
|
%post
|
||||||
@ -586,12 +588,10 @@ fi;
|
|||||||
%postun -n libctf0 -p /sbin/ldconfig
|
%postun -n libctf0 -p /sbin/ldconfig
|
||||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun
|
%postun -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -f binutils.lang
|
%files -f binutils.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%{_docdir}/%{name}
|
%{_docdir}/%{name}
|
||||||
%{_prefix}/%{HOST}/bin/*
|
%{_prefix}/%{HOST}/bin/*
|
||||||
@ -621,7 +621,6 @@ fi;
|
|||||||
|
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%files gold -f binutils-gold.lang
|
%files gold -f binutils-gold.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc gold/NEWS gold/README
|
%doc gold/NEWS gold/README
|
||||||
%{_bindir}/gold
|
%{_bindir}/gold
|
||||||
%{_bindir}/ld.gold
|
%{_bindir}/ld.gold
|
||||||
@ -634,7 +633,6 @@ fi;
|
|||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_prefix}/include/*.h
|
%{_prefix}/include/*.h
|
||||||
%{_libdir}/lib*.*a
|
%{_libdir}/lib*.*a
|
||||||
%{_libdir}/libctf.so
|
%{_libdir}/libctf.so
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- use fdupes on datadir
|
||||||
|
- remove RPM_BUILD_ROOT usage and other cleanups
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package cross-rx-binutils
|
# spec file for package cross-rx-binutils
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -23,6 +23,7 @@ ExcludeArch: rx
|
|||||||
BuildRequires: bc
|
BuildRequires: bc
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: dejagnu
|
BuildRequires: dejagnu
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
# for the testsuite
|
# for the testsuite
|
||||||
@ -431,26 +432,26 @@ cd build-dir
|
|||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
# installing native binutils
|
# installing native binutils
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-gold
|
make DESTDIR=%{buildroot} install-gold
|
||||||
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
|
ln -sf ld.gold %{buildroot}%{_bindir}/gold
|
||||||
%endif
|
%endif
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-info install
|
make DESTDIR=%{buildroot} install-info install
|
||||||
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
|
make -C gas/doc DESTDIR=%{buildroot} install-info-am install-am
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
|
make DESTDIR=%{buildroot} install-bfd install-opcodes
|
||||||
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
|
||||||
mv "%buildroot/%_bindir"/{ld,ld.bfd};
|
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
|
||||||
else
|
else
|
||||||
rm -f "%buildroot/%_bindir/ld";
|
rm -f "%{buildroot}/%_bindir/ld";
|
||||||
fi
|
fi
|
||||||
%if ! 0%{with libalternatives}
|
%if ! 0%{with libalternatives}
|
||||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
|
||||||
# Keep older versions of brp-symlink happy
|
# Keep older versions of brp-symlink happy
|
||||||
%if %{suse_version} < 1310
|
%if %{suse_version} < 1310
|
||||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
|
||||||
%endif
|
%endif
|
||||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
|
||||||
%else
|
%else
|
||||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
|
||||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||||
binary=%{_bindir}/ld.gold
|
binary=%{_bindir}/ld.gold
|
||||||
@ -460,24 +461,24 @@ binary=%{_bindir}/ld.bfd
|
|||||||
EOF
|
EOF
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
||||||
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
|
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
|
||||||
# Install header files
|
# Install header files
|
||||||
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
|
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
|
||||||
# We want the PIC libiberty.a
|
# We want the PIC libiberty.a
|
||||||
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
|
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
|
||||||
#
|
#
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
|
chmod a+x %{buildroot}%{_libdir}/libbfd-*
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
|
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
|
||||||
# No shared linking outside binutils
|
# No shared linking outside binutils
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.la
|
||||||
# Remove unwanted files to shut up rpm
|
# Remove unwanted files to shut up rpm
|
||||||
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
||||||
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
||||||
cd ..
|
cd ..
|
||||||
%find_lang binutils
|
%find_lang binutils
|
||||||
%find_lang bfd binutils.lang
|
%find_lang bfd binutils.lang
|
||||||
@ -488,45 +489,46 @@ cd ..
|
|||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%find_lang gold binutils-gold.lang
|
%find_lang gold binutils-gold.lang
|
||||||
%endif
|
%endif
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||||
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
|
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
|
||||||
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
|
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
|
||||||
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
|
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
|
||||||
%else
|
%else
|
||||||
# installing cross-TARGET-binutils and TARGET-binutils
|
# installing cross-TARGET-binutils and TARGET-binutils
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
make DESTDIR=%{buildroot} install
|
||||||
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
||||||
T=$(basename %buildroot/usr/%{TARGET_OS})
|
T=$(basename %{buildroot}/usr/%{TARGET_OS})
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
ln -sf /usr/bin/$T-$(basename $f) $f
|
ln -sf /usr/bin/$T-$(basename $f) $f
|
||||||
done
|
done
|
||||||
%if "%{TARGET}" == "arm"
|
%if "%{TARGET}" == "arm"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in arm-none-eabi; do
|
for p in arm-none-eabi; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "riscv64"
|
%if "%{TARGET}" == "riscv64"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in riscv64-elf; do
|
for p in riscv64-elf; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "avr"
|
%if "%{TARGET}" == "avr"
|
||||||
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
||||||
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
||||||
%endif
|
%endif
|
||||||
rm -rf $RPM_BUILD_ROOT%{_mandir}
|
rm -rf %{buildroot}%{_mandir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_infodir}
|
rm -rf %{buildroot}%{_infodir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
|
rm -rf %{buildroot}%{_prefix}/lib*
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
|
rm -rf %{buildroot}%{_prefix}/include
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
|
||||||
> ../binutils.lang
|
> ../binutils.lang
|
||||||
%endif
|
%endif
|
||||||
|
%fdupes %{buildroot}%{_prefix}
|
||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%post
|
%post
|
||||||
@ -586,12 +588,10 @@ fi;
|
|||||||
%postun -n libctf0 -p /sbin/ldconfig
|
%postun -n libctf0 -p /sbin/ldconfig
|
||||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun
|
%postun -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -f binutils.lang
|
%files -f binutils.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%{_docdir}/%{name}
|
%{_docdir}/%{name}
|
||||||
%{_prefix}/%{HOST}/bin/*
|
%{_prefix}/%{HOST}/bin/*
|
||||||
@ -621,7 +621,6 @@ fi;
|
|||||||
|
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%files gold -f binutils-gold.lang
|
%files gold -f binutils-gold.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc gold/NEWS gold/README
|
%doc gold/NEWS gold/README
|
||||||
%{_bindir}/gold
|
%{_bindir}/gold
|
||||||
%{_bindir}/ld.gold
|
%{_bindir}/ld.gold
|
||||||
@ -634,7 +633,6 @@ fi;
|
|||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_prefix}/include/*.h
|
%{_prefix}/include/*.h
|
||||||
%{_libdir}/lib*.*a
|
%{_libdir}/lib*.*a
|
||||||
%{_libdir}/libctf.so
|
%{_libdir}/libctf.so
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- use fdupes on datadir
|
||||||
|
- remove RPM_BUILD_ROOT usage and other cleanups
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package cross-s390-binutils
|
# spec file for package cross-s390-binutils
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -23,6 +23,7 @@ ExcludeArch: s390
|
|||||||
BuildRequires: bc
|
BuildRequires: bc
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: dejagnu
|
BuildRequires: dejagnu
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
# for the testsuite
|
# for the testsuite
|
||||||
@ -431,26 +432,26 @@ cd build-dir
|
|||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
# installing native binutils
|
# installing native binutils
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-gold
|
make DESTDIR=%{buildroot} install-gold
|
||||||
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
|
ln -sf ld.gold %{buildroot}%{_bindir}/gold
|
||||||
%endif
|
%endif
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-info install
|
make DESTDIR=%{buildroot} install-info install
|
||||||
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
|
make -C gas/doc DESTDIR=%{buildroot} install-info-am install-am
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
|
make DESTDIR=%{buildroot} install-bfd install-opcodes
|
||||||
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
|
||||||
mv "%buildroot/%_bindir"/{ld,ld.bfd};
|
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
|
||||||
else
|
else
|
||||||
rm -f "%buildroot/%_bindir/ld";
|
rm -f "%{buildroot}/%_bindir/ld";
|
||||||
fi
|
fi
|
||||||
%if ! 0%{with libalternatives}
|
%if ! 0%{with libalternatives}
|
||||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
|
||||||
# Keep older versions of brp-symlink happy
|
# Keep older versions of brp-symlink happy
|
||||||
%if %{suse_version} < 1310
|
%if %{suse_version} < 1310
|
||||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
|
||||||
%endif
|
%endif
|
||||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
|
||||||
%else
|
%else
|
||||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
|
||||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||||
binary=%{_bindir}/ld.gold
|
binary=%{_bindir}/ld.gold
|
||||||
@ -460,24 +461,24 @@ binary=%{_bindir}/ld.bfd
|
|||||||
EOF
|
EOF
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
||||||
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
|
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
|
||||||
# Install header files
|
# Install header files
|
||||||
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
|
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
|
||||||
# We want the PIC libiberty.a
|
# We want the PIC libiberty.a
|
||||||
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
|
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
|
||||||
#
|
#
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
|
chmod a+x %{buildroot}%{_libdir}/libbfd-*
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
|
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
|
||||||
# No shared linking outside binutils
|
# No shared linking outside binutils
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.la
|
||||||
# Remove unwanted files to shut up rpm
|
# Remove unwanted files to shut up rpm
|
||||||
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
||||||
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
||||||
cd ..
|
cd ..
|
||||||
%find_lang binutils
|
%find_lang binutils
|
||||||
%find_lang bfd binutils.lang
|
%find_lang bfd binutils.lang
|
||||||
@ -488,45 +489,46 @@ cd ..
|
|||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%find_lang gold binutils-gold.lang
|
%find_lang gold binutils-gold.lang
|
||||||
%endif
|
%endif
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||||
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
|
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
|
||||||
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
|
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
|
||||||
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
|
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
|
||||||
%else
|
%else
|
||||||
# installing cross-TARGET-binutils and TARGET-binutils
|
# installing cross-TARGET-binutils and TARGET-binutils
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
make DESTDIR=%{buildroot} install
|
||||||
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
||||||
T=$(basename %buildroot/usr/%{TARGET_OS})
|
T=$(basename %{buildroot}/usr/%{TARGET_OS})
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
ln -sf /usr/bin/$T-$(basename $f) $f
|
ln -sf /usr/bin/$T-$(basename $f) $f
|
||||||
done
|
done
|
||||||
%if "%{TARGET}" == "arm"
|
%if "%{TARGET}" == "arm"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in arm-none-eabi; do
|
for p in arm-none-eabi; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "riscv64"
|
%if "%{TARGET}" == "riscv64"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in riscv64-elf; do
|
for p in riscv64-elf; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "avr"
|
%if "%{TARGET}" == "avr"
|
||||||
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
||||||
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
||||||
%endif
|
%endif
|
||||||
rm -rf $RPM_BUILD_ROOT%{_mandir}
|
rm -rf %{buildroot}%{_mandir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_infodir}
|
rm -rf %{buildroot}%{_infodir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
|
rm -rf %{buildroot}%{_prefix}/lib*
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
|
rm -rf %{buildroot}%{_prefix}/include
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
|
||||||
> ../binutils.lang
|
> ../binutils.lang
|
||||||
%endif
|
%endif
|
||||||
|
%fdupes %{buildroot}%{_prefix}
|
||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%post
|
%post
|
||||||
@ -586,12 +588,10 @@ fi;
|
|||||||
%postun -n libctf0 -p /sbin/ldconfig
|
%postun -n libctf0 -p /sbin/ldconfig
|
||||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun
|
%postun -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -f binutils.lang
|
%files -f binutils.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%{_docdir}/%{name}
|
%{_docdir}/%{name}
|
||||||
%{_prefix}/%{HOST}/bin/*
|
%{_prefix}/%{HOST}/bin/*
|
||||||
@ -621,7 +621,6 @@ fi;
|
|||||||
|
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%files gold -f binutils-gold.lang
|
%files gold -f binutils-gold.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc gold/NEWS gold/README
|
%doc gold/NEWS gold/README
|
||||||
%{_bindir}/gold
|
%{_bindir}/gold
|
||||||
%{_bindir}/ld.gold
|
%{_bindir}/ld.gold
|
||||||
@ -634,7 +633,6 @@ fi;
|
|||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_prefix}/include/*.h
|
%{_prefix}/include/*.h
|
||||||
%{_libdir}/lib*.*a
|
%{_libdir}/lib*.*a
|
||||||
%{_libdir}/libctf.so
|
%{_libdir}/libctf.so
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- use fdupes on datadir
|
||||||
|
- remove RPM_BUILD_ROOT usage and other cleanups
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package cross-s390x-binutils
|
# spec file for package cross-s390x-binutils
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -23,6 +23,7 @@ ExcludeArch: s390x
|
|||||||
BuildRequires: bc
|
BuildRequires: bc
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: dejagnu
|
BuildRequires: dejagnu
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
# for the testsuite
|
# for the testsuite
|
||||||
@ -431,26 +432,26 @@ cd build-dir
|
|||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
# installing native binutils
|
# installing native binutils
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-gold
|
make DESTDIR=%{buildroot} install-gold
|
||||||
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
|
ln -sf ld.gold %{buildroot}%{_bindir}/gold
|
||||||
%endif
|
%endif
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-info install
|
make DESTDIR=%{buildroot} install-info install
|
||||||
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
|
make -C gas/doc DESTDIR=%{buildroot} install-info-am install-am
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
|
make DESTDIR=%{buildroot} install-bfd install-opcodes
|
||||||
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
|
||||||
mv "%buildroot/%_bindir"/{ld,ld.bfd};
|
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
|
||||||
else
|
else
|
||||||
rm -f "%buildroot/%_bindir/ld";
|
rm -f "%{buildroot}/%_bindir/ld";
|
||||||
fi
|
fi
|
||||||
%if ! 0%{with libalternatives}
|
%if ! 0%{with libalternatives}
|
||||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
|
||||||
# Keep older versions of brp-symlink happy
|
# Keep older versions of brp-symlink happy
|
||||||
%if %{suse_version} < 1310
|
%if %{suse_version} < 1310
|
||||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
|
||||||
%endif
|
%endif
|
||||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
|
||||||
%else
|
%else
|
||||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
|
||||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||||
binary=%{_bindir}/ld.gold
|
binary=%{_bindir}/ld.gold
|
||||||
@ -460,24 +461,24 @@ binary=%{_bindir}/ld.bfd
|
|||||||
EOF
|
EOF
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
||||||
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
|
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
|
||||||
# Install header files
|
# Install header files
|
||||||
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
|
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
|
||||||
# We want the PIC libiberty.a
|
# We want the PIC libiberty.a
|
||||||
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
|
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
|
||||||
#
|
#
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
|
chmod a+x %{buildroot}%{_libdir}/libbfd-*
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
|
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
|
||||||
# No shared linking outside binutils
|
# No shared linking outside binutils
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.la
|
||||||
# Remove unwanted files to shut up rpm
|
# Remove unwanted files to shut up rpm
|
||||||
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
||||||
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
||||||
cd ..
|
cd ..
|
||||||
%find_lang binutils
|
%find_lang binutils
|
||||||
%find_lang bfd binutils.lang
|
%find_lang bfd binutils.lang
|
||||||
@ -488,45 +489,46 @@ cd ..
|
|||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%find_lang gold binutils-gold.lang
|
%find_lang gold binutils-gold.lang
|
||||||
%endif
|
%endif
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||||
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
|
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
|
||||||
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
|
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
|
||||||
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
|
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
|
||||||
%else
|
%else
|
||||||
# installing cross-TARGET-binutils and TARGET-binutils
|
# installing cross-TARGET-binutils and TARGET-binutils
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
make DESTDIR=%{buildroot} install
|
||||||
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
||||||
T=$(basename %buildroot/usr/%{TARGET_OS})
|
T=$(basename %{buildroot}/usr/%{TARGET_OS})
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
ln -sf /usr/bin/$T-$(basename $f) $f
|
ln -sf /usr/bin/$T-$(basename $f) $f
|
||||||
done
|
done
|
||||||
%if "%{TARGET}" == "arm"
|
%if "%{TARGET}" == "arm"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in arm-none-eabi; do
|
for p in arm-none-eabi; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "riscv64"
|
%if "%{TARGET}" == "riscv64"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in riscv64-elf; do
|
for p in riscv64-elf; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "avr"
|
%if "%{TARGET}" == "avr"
|
||||||
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
||||||
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
||||||
%endif
|
%endif
|
||||||
rm -rf $RPM_BUILD_ROOT%{_mandir}
|
rm -rf %{buildroot}%{_mandir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_infodir}
|
rm -rf %{buildroot}%{_infodir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
|
rm -rf %{buildroot}%{_prefix}/lib*
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
|
rm -rf %{buildroot}%{_prefix}/include
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
|
||||||
> ../binutils.lang
|
> ../binutils.lang
|
||||||
%endif
|
%endif
|
||||||
|
%fdupes %{buildroot}%{_prefix}
|
||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%post
|
%post
|
||||||
@ -586,12 +588,10 @@ fi;
|
|||||||
%postun -n libctf0 -p /sbin/ldconfig
|
%postun -n libctf0 -p /sbin/ldconfig
|
||||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun
|
%postun -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -f binutils.lang
|
%files -f binutils.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%{_docdir}/%{name}
|
%{_docdir}/%{name}
|
||||||
%{_prefix}/%{HOST}/bin/*
|
%{_prefix}/%{HOST}/bin/*
|
||||||
@ -621,7 +621,6 @@ fi;
|
|||||||
|
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%files gold -f binutils-gold.lang
|
%files gold -f binutils-gold.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc gold/NEWS gold/README
|
%doc gold/NEWS gold/README
|
||||||
%{_bindir}/gold
|
%{_bindir}/gold
|
||||||
%{_bindir}/ld.gold
|
%{_bindir}/ld.gold
|
||||||
@ -634,7 +633,6 @@ fi;
|
|||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_prefix}/include/*.h
|
%{_prefix}/include/*.h
|
||||||
%{_libdir}/lib*.*a
|
%{_libdir}/lib*.*a
|
||||||
%{_libdir}/libctf.so
|
%{_libdir}/libctf.so
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- use fdupes on datadir
|
||||||
|
- remove RPM_BUILD_ROOT usage and other cleanups
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package cross-sparc-binutils
|
# spec file for package cross-sparc-binutils
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -23,6 +23,7 @@ ExcludeArch: sparc
|
|||||||
BuildRequires: bc
|
BuildRequires: bc
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: dejagnu
|
BuildRequires: dejagnu
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
# for the testsuite
|
# for the testsuite
|
||||||
@ -431,26 +432,26 @@ cd build-dir
|
|||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
# installing native binutils
|
# installing native binutils
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-gold
|
make DESTDIR=%{buildroot} install-gold
|
||||||
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
|
ln -sf ld.gold %{buildroot}%{_bindir}/gold
|
||||||
%endif
|
%endif
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-info install
|
make DESTDIR=%{buildroot} install-info install
|
||||||
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
|
make -C gas/doc DESTDIR=%{buildroot} install-info-am install-am
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
|
make DESTDIR=%{buildroot} install-bfd install-opcodes
|
||||||
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
|
||||||
mv "%buildroot/%_bindir"/{ld,ld.bfd};
|
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
|
||||||
else
|
else
|
||||||
rm -f "%buildroot/%_bindir/ld";
|
rm -f "%{buildroot}/%_bindir/ld";
|
||||||
fi
|
fi
|
||||||
%if ! 0%{with libalternatives}
|
%if ! 0%{with libalternatives}
|
||||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
|
||||||
# Keep older versions of brp-symlink happy
|
# Keep older versions of brp-symlink happy
|
||||||
%if %{suse_version} < 1310
|
%if %{suse_version} < 1310
|
||||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
|
||||||
%endif
|
%endif
|
||||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
|
||||||
%else
|
%else
|
||||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
|
||||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||||
binary=%{_bindir}/ld.gold
|
binary=%{_bindir}/ld.gold
|
||||||
@ -460,24 +461,24 @@ binary=%{_bindir}/ld.bfd
|
|||||||
EOF
|
EOF
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
||||||
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
|
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
|
||||||
# Install header files
|
# Install header files
|
||||||
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
|
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
|
||||||
# We want the PIC libiberty.a
|
# We want the PIC libiberty.a
|
||||||
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
|
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
|
||||||
#
|
#
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
|
chmod a+x %{buildroot}%{_libdir}/libbfd-*
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
|
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
|
||||||
# No shared linking outside binutils
|
# No shared linking outside binutils
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.la
|
||||||
# Remove unwanted files to shut up rpm
|
# Remove unwanted files to shut up rpm
|
||||||
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
||||||
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
||||||
cd ..
|
cd ..
|
||||||
%find_lang binutils
|
%find_lang binutils
|
||||||
%find_lang bfd binutils.lang
|
%find_lang bfd binutils.lang
|
||||||
@ -488,45 +489,46 @@ cd ..
|
|||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%find_lang gold binutils-gold.lang
|
%find_lang gold binutils-gold.lang
|
||||||
%endif
|
%endif
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||||
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
|
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
|
||||||
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
|
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
|
||||||
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
|
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
|
||||||
%else
|
%else
|
||||||
# installing cross-TARGET-binutils and TARGET-binutils
|
# installing cross-TARGET-binutils and TARGET-binutils
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
make DESTDIR=%{buildroot} install
|
||||||
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
||||||
T=$(basename %buildroot/usr/%{TARGET_OS})
|
T=$(basename %{buildroot}/usr/%{TARGET_OS})
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
ln -sf /usr/bin/$T-$(basename $f) $f
|
ln -sf /usr/bin/$T-$(basename $f) $f
|
||||||
done
|
done
|
||||||
%if "%{TARGET}" == "arm"
|
%if "%{TARGET}" == "arm"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in arm-none-eabi; do
|
for p in arm-none-eabi; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "riscv64"
|
%if "%{TARGET}" == "riscv64"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in riscv64-elf; do
|
for p in riscv64-elf; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "avr"
|
%if "%{TARGET}" == "avr"
|
||||||
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
||||||
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
||||||
%endif
|
%endif
|
||||||
rm -rf $RPM_BUILD_ROOT%{_mandir}
|
rm -rf %{buildroot}%{_mandir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_infodir}
|
rm -rf %{buildroot}%{_infodir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
|
rm -rf %{buildroot}%{_prefix}/lib*
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
|
rm -rf %{buildroot}%{_prefix}/include
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
|
||||||
> ../binutils.lang
|
> ../binutils.lang
|
||||||
%endif
|
%endif
|
||||||
|
%fdupes %{buildroot}%{_prefix}
|
||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%post
|
%post
|
||||||
@ -586,12 +588,10 @@ fi;
|
|||||||
%postun -n libctf0 -p /sbin/ldconfig
|
%postun -n libctf0 -p /sbin/ldconfig
|
||||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun
|
%postun -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -f binutils.lang
|
%files -f binutils.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%{_docdir}/%{name}
|
%{_docdir}/%{name}
|
||||||
%{_prefix}/%{HOST}/bin/*
|
%{_prefix}/%{HOST}/bin/*
|
||||||
@ -621,7 +621,6 @@ fi;
|
|||||||
|
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%files gold -f binutils-gold.lang
|
%files gold -f binutils-gold.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc gold/NEWS gold/README
|
%doc gold/NEWS gold/README
|
||||||
%{_bindir}/gold
|
%{_bindir}/gold
|
||||||
%{_bindir}/ld.gold
|
%{_bindir}/ld.gold
|
||||||
@ -634,7 +633,6 @@ fi;
|
|||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_prefix}/include/*.h
|
%{_prefix}/include/*.h
|
||||||
%{_libdir}/lib*.*a
|
%{_libdir}/lib*.*a
|
||||||
%{_libdir}/libctf.so
|
%{_libdir}/libctf.so
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- use fdupes on datadir
|
||||||
|
- remove RPM_BUILD_ROOT usage and other cleanups
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package cross-sparc64-binutils
|
# spec file for package cross-sparc64-binutils
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -23,6 +23,7 @@ ExcludeArch: sparc64
|
|||||||
BuildRequires: bc
|
BuildRequires: bc
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: dejagnu
|
BuildRequires: dejagnu
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
# for the testsuite
|
# for the testsuite
|
||||||
@ -431,26 +432,26 @@ cd build-dir
|
|||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
# installing native binutils
|
# installing native binutils
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-gold
|
make DESTDIR=%{buildroot} install-gold
|
||||||
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
|
ln -sf ld.gold %{buildroot}%{_bindir}/gold
|
||||||
%endif
|
%endif
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-info install
|
make DESTDIR=%{buildroot} install-info install
|
||||||
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
|
make -C gas/doc DESTDIR=%{buildroot} install-info-am install-am
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
|
make DESTDIR=%{buildroot} install-bfd install-opcodes
|
||||||
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
|
||||||
mv "%buildroot/%_bindir"/{ld,ld.bfd};
|
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
|
||||||
else
|
else
|
||||||
rm -f "%buildroot/%_bindir/ld";
|
rm -f "%{buildroot}/%_bindir/ld";
|
||||||
fi
|
fi
|
||||||
%if ! 0%{with libalternatives}
|
%if ! 0%{with libalternatives}
|
||||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
|
||||||
# Keep older versions of brp-symlink happy
|
# Keep older versions of brp-symlink happy
|
||||||
%if %{suse_version} < 1310
|
%if %{suse_version} < 1310
|
||||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
|
||||||
%endif
|
%endif
|
||||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
|
||||||
%else
|
%else
|
||||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
|
||||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||||
binary=%{_bindir}/ld.gold
|
binary=%{_bindir}/ld.gold
|
||||||
@ -460,24 +461,24 @@ binary=%{_bindir}/ld.bfd
|
|||||||
EOF
|
EOF
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
||||||
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
|
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
|
||||||
# Install header files
|
# Install header files
|
||||||
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
|
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
|
||||||
# We want the PIC libiberty.a
|
# We want the PIC libiberty.a
|
||||||
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
|
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
|
||||||
#
|
#
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
|
chmod a+x %{buildroot}%{_libdir}/libbfd-*
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
|
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
|
||||||
# No shared linking outside binutils
|
# No shared linking outside binutils
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.la
|
||||||
# Remove unwanted files to shut up rpm
|
# Remove unwanted files to shut up rpm
|
||||||
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
||||||
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
||||||
cd ..
|
cd ..
|
||||||
%find_lang binutils
|
%find_lang binutils
|
||||||
%find_lang bfd binutils.lang
|
%find_lang bfd binutils.lang
|
||||||
@ -488,45 +489,46 @@ cd ..
|
|||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%find_lang gold binutils-gold.lang
|
%find_lang gold binutils-gold.lang
|
||||||
%endif
|
%endif
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||||
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
|
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
|
||||||
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
|
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
|
||||||
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
|
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
|
||||||
%else
|
%else
|
||||||
# installing cross-TARGET-binutils and TARGET-binutils
|
# installing cross-TARGET-binutils and TARGET-binutils
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
make DESTDIR=%{buildroot} install
|
||||||
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
||||||
T=$(basename %buildroot/usr/%{TARGET_OS})
|
T=$(basename %{buildroot}/usr/%{TARGET_OS})
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
ln -sf /usr/bin/$T-$(basename $f) $f
|
ln -sf /usr/bin/$T-$(basename $f) $f
|
||||||
done
|
done
|
||||||
%if "%{TARGET}" == "arm"
|
%if "%{TARGET}" == "arm"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in arm-none-eabi; do
|
for p in arm-none-eabi; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "riscv64"
|
%if "%{TARGET}" == "riscv64"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in riscv64-elf; do
|
for p in riscv64-elf; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "avr"
|
%if "%{TARGET}" == "avr"
|
||||||
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
||||||
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
||||||
%endif
|
%endif
|
||||||
rm -rf $RPM_BUILD_ROOT%{_mandir}
|
rm -rf %{buildroot}%{_mandir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_infodir}
|
rm -rf %{buildroot}%{_infodir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
|
rm -rf %{buildroot}%{_prefix}/lib*
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
|
rm -rf %{buildroot}%{_prefix}/include
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
|
||||||
> ../binutils.lang
|
> ../binutils.lang
|
||||||
%endif
|
%endif
|
||||||
|
%fdupes %{buildroot}%{_prefix}
|
||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%post
|
%post
|
||||||
@ -586,12 +588,10 @@ fi;
|
|||||||
%postun -n libctf0 -p /sbin/ldconfig
|
%postun -n libctf0 -p /sbin/ldconfig
|
||||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun
|
%postun -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -f binutils.lang
|
%files -f binutils.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%{_docdir}/%{name}
|
%{_docdir}/%{name}
|
||||||
%{_prefix}/%{HOST}/bin/*
|
%{_prefix}/%{HOST}/bin/*
|
||||||
@ -621,7 +621,6 @@ fi;
|
|||||||
|
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%files gold -f binutils-gold.lang
|
%files gold -f binutils-gold.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc gold/NEWS gold/README
|
%doc gold/NEWS gold/README
|
||||||
%{_bindir}/gold
|
%{_bindir}/gold
|
||||||
%{_bindir}/ld.gold
|
%{_bindir}/ld.gold
|
||||||
@ -634,7 +633,6 @@ fi;
|
|||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_prefix}/include/*.h
|
%{_prefix}/include/*.h
|
||||||
%{_libdir}/lib*.*a
|
%{_libdir}/lib*.*a
|
||||||
%{_libdir}/libctf.so
|
%{_libdir}/libctf.so
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- use fdupes on datadir
|
||||||
|
- remove RPM_BUILD_ROOT usage and other cleanups
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package cross-spu-binutils
|
# spec file for package cross-spu-binutils
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -23,6 +23,7 @@ ExcludeArch: spu
|
|||||||
BuildRequires: bc
|
BuildRequires: bc
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: dejagnu
|
BuildRequires: dejagnu
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
# for the testsuite
|
# for the testsuite
|
||||||
@ -431,26 +432,26 @@ cd build-dir
|
|||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
# installing native binutils
|
# installing native binutils
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-gold
|
make DESTDIR=%{buildroot} install-gold
|
||||||
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
|
ln -sf ld.gold %{buildroot}%{_bindir}/gold
|
||||||
%endif
|
%endif
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-info install
|
make DESTDIR=%{buildroot} install-info install
|
||||||
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
|
make -C gas/doc DESTDIR=%{buildroot} install-info-am install-am
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
|
make DESTDIR=%{buildroot} install-bfd install-opcodes
|
||||||
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
|
||||||
mv "%buildroot/%_bindir"/{ld,ld.bfd};
|
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
|
||||||
else
|
else
|
||||||
rm -f "%buildroot/%_bindir/ld";
|
rm -f "%{buildroot}/%_bindir/ld";
|
||||||
fi
|
fi
|
||||||
%if ! 0%{with libalternatives}
|
%if ! 0%{with libalternatives}
|
||||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
|
||||||
# Keep older versions of brp-symlink happy
|
# Keep older versions of brp-symlink happy
|
||||||
%if %{suse_version} < 1310
|
%if %{suse_version} < 1310
|
||||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
|
||||||
%endif
|
%endif
|
||||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
|
||||||
%else
|
%else
|
||||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
|
||||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||||
binary=%{_bindir}/ld.gold
|
binary=%{_bindir}/ld.gold
|
||||||
@ -460,24 +461,24 @@ binary=%{_bindir}/ld.bfd
|
|||||||
EOF
|
EOF
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
||||||
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
|
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
|
||||||
# Install header files
|
# Install header files
|
||||||
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
|
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
|
||||||
# We want the PIC libiberty.a
|
# We want the PIC libiberty.a
|
||||||
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
|
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
|
||||||
#
|
#
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
|
chmod a+x %{buildroot}%{_libdir}/libbfd-*
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
|
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
|
||||||
# No shared linking outside binutils
|
# No shared linking outside binutils
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.la
|
||||||
# Remove unwanted files to shut up rpm
|
# Remove unwanted files to shut up rpm
|
||||||
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
||||||
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
||||||
cd ..
|
cd ..
|
||||||
%find_lang binutils
|
%find_lang binutils
|
||||||
%find_lang bfd binutils.lang
|
%find_lang bfd binutils.lang
|
||||||
@ -488,45 +489,46 @@ cd ..
|
|||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%find_lang gold binutils-gold.lang
|
%find_lang gold binutils-gold.lang
|
||||||
%endif
|
%endif
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||||
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
|
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
|
||||||
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
|
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
|
||||||
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
|
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
|
||||||
%else
|
%else
|
||||||
# installing cross-TARGET-binutils and TARGET-binutils
|
# installing cross-TARGET-binutils and TARGET-binutils
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
make DESTDIR=%{buildroot} install
|
||||||
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
||||||
T=$(basename %buildroot/usr/%{TARGET_OS})
|
T=$(basename %{buildroot}/usr/%{TARGET_OS})
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
ln -sf /usr/bin/$T-$(basename $f) $f
|
ln -sf /usr/bin/$T-$(basename $f) $f
|
||||||
done
|
done
|
||||||
%if "%{TARGET}" == "arm"
|
%if "%{TARGET}" == "arm"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in arm-none-eabi; do
|
for p in arm-none-eabi; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "riscv64"
|
%if "%{TARGET}" == "riscv64"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in riscv64-elf; do
|
for p in riscv64-elf; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "avr"
|
%if "%{TARGET}" == "avr"
|
||||||
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
||||||
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
||||||
%endif
|
%endif
|
||||||
rm -rf $RPM_BUILD_ROOT%{_mandir}
|
rm -rf %{buildroot}%{_mandir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_infodir}
|
rm -rf %{buildroot}%{_infodir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
|
rm -rf %{buildroot}%{_prefix}/lib*
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
|
rm -rf %{buildroot}%{_prefix}/include
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
|
||||||
> ../binutils.lang
|
> ../binutils.lang
|
||||||
%endif
|
%endif
|
||||||
|
%fdupes %{buildroot}%{_prefix}
|
||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%post
|
%post
|
||||||
@ -586,12 +588,10 @@ fi;
|
|||||||
%postun -n libctf0 -p /sbin/ldconfig
|
%postun -n libctf0 -p /sbin/ldconfig
|
||||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun
|
%postun -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -f binutils.lang
|
%files -f binutils.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%{_docdir}/%{name}
|
%{_docdir}/%{name}
|
||||||
%{_prefix}/%{HOST}/bin/*
|
%{_prefix}/%{HOST}/bin/*
|
||||||
@ -621,7 +621,6 @@ fi;
|
|||||||
|
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%files gold -f binutils-gold.lang
|
%files gold -f binutils-gold.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc gold/NEWS gold/README
|
%doc gold/NEWS gold/README
|
||||||
%{_bindir}/gold
|
%{_bindir}/gold
|
||||||
%{_bindir}/ld.gold
|
%{_bindir}/ld.gold
|
||||||
@ -634,7 +633,6 @@ fi;
|
|||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_prefix}/include/*.h
|
%{_prefix}/include/*.h
|
||||||
%{_libdir}/lib*.*a
|
%{_libdir}/lib*.*a
|
||||||
%{_libdir}/libctf.so
|
%{_libdir}/libctf.so
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- use fdupes on datadir
|
||||||
|
- remove RPM_BUILD_ROOT usage and other cleanups
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package cross-x86_64-binutils
|
# spec file for package cross-x86_64-binutils
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -23,6 +23,7 @@ ExcludeArch: x86_64
|
|||||||
BuildRequires: bc
|
BuildRequires: bc
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: dejagnu
|
BuildRequires: dejagnu
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
# for the testsuite
|
# for the testsuite
|
||||||
@ -431,26 +432,26 @@ cd build-dir
|
|||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
# installing native binutils
|
# installing native binutils
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-gold
|
make DESTDIR=%{buildroot} install-gold
|
||||||
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
|
ln -sf ld.gold %{buildroot}%{_bindir}/gold
|
||||||
%endif
|
%endif
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-info install
|
make DESTDIR=%{buildroot} install-info install
|
||||||
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
|
make -C gas/doc DESTDIR=%{buildroot} install-info-am install-am
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
|
make DESTDIR=%{buildroot} install-bfd install-opcodes
|
||||||
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
|
||||||
mv "%buildroot/%_bindir"/{ld,ld.bfd};
|
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
|
||||||
else
|
else
|
||||||
rm -f "%buildroot/%_bindir/ld";
|
rm -f "%{buildroot}/%_bindir/ld";
|
||||||
fi
|
fi
|
||||||
%if ! 0%{with libalternatives}
|
%if ! 0%{with libalternatives}
|
||||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
|
||||||
# Keep older versions of brp-symlink happy
|
# Keep older versions of brp-symlink happy
|
||||||
%if %{suse_version} < 1310
|
%if %{suse_version} < 1310
|
||||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
|
||||||
%endif
|
%endif
|
||||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
|
||||||
%else
|
%else
|
||||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
|
||||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||||
binary=%{_bindir}/ld.gold
|
binary=%{_bindir}/ld.gold
|
||||||
@ -460,24 +461,24 @@ binary=%{_bindir}/ld.bfd
|
|||||||
EOF
|
EOF
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
||||||
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
|
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
|
||||||
# Install header files
|
# Install header files
|
||||||
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
|
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
|
||||||
# We want the PIC libiberty.a
|
# We want the PIC libiberty.a
|
||||||
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
|
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
|
||||||
#
|
#
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
|
chmod a+x %{buildroot}%{_libdir}/libbfd-*
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
|
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
|
||||||
# No shared linking outside binutils
|
# No shared linking outside binutils
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.la
|
||||||
# Remove unwanted files to shut up rpm
|
# Remove unwanted files to shut up rpm
|
||||||
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
||||||
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
||||||
cd ..
|
cd ..
|
||||||
%find_lang binutils
|
%find_lang binutils
|
||||||
%find_lang bfd binutils.lang
|
%find_lang bfd binutils.lang
|
||||||
@ -488,45 +489,46 @@ cd ..
|
|||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%find_lang gold binutils-gold.lang
|
%find_lang gold binutils-gold.lang
|
||||||
%endif
|
%endif
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||||
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
|
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
|
||||||
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
|
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
|
||||||
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
|
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
|
||||||
%else
|
%else
|
||||||
# installing cross-TARGET-binutils and TARGET-binutils
|
# installing cross-TARGET-binutils and TARGET-binutils
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
make DESTDIR=%{buildroot} install
|
||||||
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
||||||
T=$(basename %buildroot/usr/%{TARGET_OS})
|
T=$(basename %{buildroot}/usr/%{TARGET_OS})
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
ln -sf /usr/bin/$T-$(basename $f) $f
|
ln -sf /usr/bin/$T-$(basename $f) $f
|
||||||
done
|
done
|
||||||
%if "%{TARGET}" == "arm"
|
%if "%{TARGET}" == "arm"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in arm-none-eabi; do
|
for p in arm-none-eabi; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "riscv64"
|
%if "%{TARGET}" == "riscv64"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in riscv64-elf; do
|
for p in riscv64-elf; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "avr"
|
%if "%{TARGET}" == "avr"
|
||||||
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
||||||
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
||||||
%endif
|
%endif
|
||||||
rm -rf $RPM_BUILD_ROOT%{_mandir}
|
rm -rf %{buildroot}%{_mandir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_infodir}
|
rm -rf %{buildroot}%{_infodir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
|
rm -rf %{buildroot}%{_prefix}/lib*
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
|
rm -rf %{buildroot}%{_prefix}/include
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
|
||||||
> ../binutils.lang
|
> ../binutils.lang
|
||||||
%endif
|
%endif
|
||||||
|
%fdupes %{buildroot}%{_prefix}
|
||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%post
|
%post
|
||||||
@ -586,12 +588,10 @@ fi;
|
|||||||
%postun -n libctf0 -p /sbin/ldconfig
|
%postun -n libctf0 -p /sbin/ldconfig
|
||||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun
|
%postun -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -f binutils.lang
|
%files -f binutils.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%{_docdir}/%{name}
|
%{_docdir}/%{name}
|
||||||
%{_prefix}/%{HOST}/bin/*
|
%{_prefix}/%{HOST}/bin/*
|
||||||
@ -621,7 +621,6 @@ fi;
|
|||||||
|
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%files gold -f binutils-gold.lang
|
%files gold -f binutils-gold.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc gold/NEWS gold/README
|
%doc gold/NEWS gold/README
|
||||||
%{_bindir}/gold
|
%{_bindir}/gold
|
||||||
%{_bindir}/ld.gold
|
%{_bindir}/ld.gold
|
||||||
@ -634,7 +633,6 @@ fi;
|
|||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_prefix}/include/*.h
|
%{_prefix}/include/*.h
|
||||||
%{_libdir}/lib*.*a
|
%{_libdir}/lib*.*a
|
||||||
%{_libdir}/libctf.so
|
%{_libdir}/libctf.so
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 27 20:36:30 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- use fdupes on datadir
|
||||||
|
- remove RPM_BUILD_ROOT usage and other cleanups
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
Fri Nov 12 13:20:09 UTC 2021 - Martin Liška <mliska@suse.cz>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package cross-xtensa-binutils
|
# spec file for package cross-xtensa-binutils
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -23,6 +23,7 @@ ExcludeArch: xtensa
|
|||||||
BuildRequires: bc
|
BuildRequires: bc
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: dejagnu
|
BuildRequires: dejagnu
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
# for the testsuite
|
# for the testsuite
|
||||||
@ -431,26 +432,26 @@ cd build-dir
|
|||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
# installing native binutils
|
# installing native binutils
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-gold
|
make DESTDIR=%{buildroot} install-gold
|
||||||
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
|
ln -sf ld.gold %{buildroot}%{_bindir}/gold
|
||||||
%endif
|
%endif
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-info install
|
make DESTDIR=%{buildroot} install-info install
|
||||||
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
|
make -C gas/doc DESTDIR=%{buildroot} install-info-am install-am
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
|
make DESTDIR=%{buildroot} install-bfd install-opcodes
|
||||||
if [ ! -f "%buildroot/%_bindir/ld.bfd" ]; then
|
if [ ! -f "%{buildroot}/%_bindir/ld.bfd" ]; then
|
||||||
mv "%buildroot/%_bindir"/{ld,ld.bfd};
|
mv "%{buildroot}/%_bindir"/{ld,ld.bfd};
|
||||||
else
|
else
|
||||||
rm -f "%buildroot/%_bindir/ld";
|
rm -f "%{buildroot}/%_bindir/ld";
|
||||||
fi
|
fi
|
||||||
%if ! 0%{with libalternatives}
|
%if ! 0%{with libalternatives}
|
||||||
mkdir -p "%buildroot/%_sysconfdir/alternatives";
|
mkdir -p "%{buildroot}/%_sysconfdir/alternatives";
|
||||||
# Keep older versions of brp-symlink happy
|
# Keep older versions of brp-symlink happy
|
||||||
%if %{suse_version} < 1310
|
%if %{suse_version} < 1310
|
||||||
ln -s "%_bindir/ld" "%buildroot/%_sysconfdir/alternatives/ld"
|
ln -s "%_bindir/ld" "%{buildroot}/%_sysconfdir/alternatives/ld"
|
||||||
%endif
|
%endif
|
||||||
ln -s "%_sysconfdir/alternatives/ld" "%buildroot/%_bindir/ld";
|
ln -s "%_sysconfdir/alternatives/ld" "%{buildroot}/%_bindir/ld";
|
||||||
%else
|
%else
|
||||||
ln -s %{_bindir}/alts "%buildroot/%_bindir/ld";
|
ln -s %{_bindir}/alts "%{buildroot}/%_bindir/ld";
|
||||||
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
mkdir -p %{buildroot}%{_datadir}/libalternatives/ld;
|
||||||
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
cat > %{buildroot}%{_datadir}/libalternatives/ld/1.conf <<EOF
|
||||||
binary=%{_bindir}/ld.gold
|
binary=%{_bindir}/ld.gold
|
||||||
@ -460,24 +461,24 @@ binary=%{_bindir}/ld.bfd
|
|||||||
EOF
|
EOF
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
rm -rf %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
mkdir -p %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
|
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} %{buildroot}%{_prefix}/%{HOST}/bin
|
||||||
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
mv %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
|
||||||
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
|
ln -sf ../../%{_lib}/ldscripts %{buildroot}%{_prefix}/%{HOST}/lib/ldscripts
|
||||||
# Install header files
|
# Install header files
|
||||||
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
|
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=%{buildroot}
|
||||||
# We want the PIC libiberty.a
|
# We want the PIC libiberty.a
|
||||||
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
|
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_libdir}
|
||||||
#
|
#
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
|
chmod a+x %{buildroot}%{_libdir}/libbfd-*
|
||||||
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
|
chmod a+x %{buildroot}%{_libdir}/libopcodes-*
|
||||||
# No shared linking outside binutils
|
# No shared linking outside binutils
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.so
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
|
rm %{buildroot}%{_libdir}/lib{bfd,opcodes}.la
|
||||||
# Remove unwanted files to shut up rpm
|
# Remove unwanted files to shut up rpm
|
||||||
rm -f $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
rm -f %{buildroot}%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
|
||||||
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
rm -f %{buildroot}%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
|
||||||
cd ..
|
cd ..
|
||||||
%find_lang binutils
|
%find_lang binutils
|
||||||
%find_lang bfd binutils.lang
|
%find_lang bfd binutils.lang
|
||||||
@ -488,45 +489,46 @@ cd ..
|
|||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%find_lang gold binutils-gold.lang
|
%find_lang gold binutils-gold.lang
|
||||||
%endif
|
%endif
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||||
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
|
install -m 644 binutils/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-binutils
|
||||||
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
|
install -m 644 gas/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-gas
|
||||||
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
|
install -m 644 ld/NEWS %{buildroot}%{_docdir}/%{name}/NEWS-ld
|
||||||
%else
|
%else
|
||||||
# installing cross-TARGET-binutils and TARGET-binutils
|
# installing cross-TARGET-binutils and TARGET-binutils
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
make DESTDIR=%{buildroot} install
|
||||||
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
# Replace hard links by symlinks, so that rpmlint doesn't complain
|
||||||
T=$(basename %buildroot/usr/%{TARGET_OS})
|
T=$(basename %{buildroot}/usr/%{TARGET_OS})
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
ln -sf /usr/bin/$T-$(basename $f) $f
|
ln -sf /usr/bin/$T-$(basename $f) $f
|
||||||
done
|
done
|
||||||
%if "%{TARGET}" == "arm"
|
%if "%{TARGET}" == "arm"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in arm-none-eabi; do
|
for p in arm-none-eabi; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "riscv64"
|
%if "%{TARGET}" == "riscv64"
|
||||||
# Instead of building duplicate binutils, add symlinks
|
# Instead of building duplicate binutils, add symlinks
|
||||||
for f in %buildroot/usr/$T/bin/* ; do
|
for f in %{buildroot}/usr/$T/bin/* ; do
|
||||||
for p in riscv64-elf; do
|
for p in riscv64-elf; do
|
||||||
ln -sf %{_bindir}/$T-$(basename $f) %buildroot%{_bindir}/$p-$(basename $f)
|
ln -sf %{_bindir}/$T-$(basename $f) %{buildroot}%{_bindir}/$p-$(basename $f)
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET}" == "avr"
|
%if "%{TARGET}" == "avr"
|
||||||
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
install -c gas-nesc/as-new %{buildroot}%{_prefix}/bin/%{TARGET_OS}-nesc-as
|
||||||
ln -sf ../../bin/%{TARGET_OS}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
ln -sf ../../bin/%{TARGET_OS}-nesc-as %{buildroot}%{_prefix}/%{TARGET_OS}/bin/nesc-as
|
||||||
%endif
|
%endif
|
||||||
rm -rf $RPM_BUILD_ROOT%{_mandir}
|
rm -rf %{buildroot}%{_mandir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_infodir}
|
rm -rf %{buildroot}%{_infodir}
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
|
rm -rf %{buildroot}%{_prefix}/lib*
|
||||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
|
rm -rf %{buildroot}%{_prefix}/include
|
||||||
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
|
rm -f %{buildroot}%{_prefix}/bin/*-c++filt
|
||||||
> ../binutils.lang
|
> ../binutils.lang
|
||||||
%endif
|
%endif
|
||||||
|
%fdupes %{buildroot}%{_prefix}
|
||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%post
|
%post
|
||||||
@ -586,12 +588,10 @@ fi;
|
|||||||
%postun -n libctf0 -p /sbin/ldconfig
|
%postun -n libctf0 -p /sbin/ldconfig
|
||||||
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
%postun -n libctf-nobfd0 -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun
|
%postun -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -f binutils.lang
|
%files -f binutils.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%{_docdir}/%{name}
|
%{_docdir}/%{name}
|
||||||
%{_prefix}/%{HOST}/bin/*
|
%{_prefix}/%{HOST}/bin/*
|
||||||
@ -621,7 +621,6 @@ fi;
|
|||||||
|
|
||||||
%ifarch %gold_archs
|
%ifarch %gold_archs
|
||||||
%files gold -f binutils-gold.lang
|
%files gold -f binutils-gold.lang
|
||||||
%defattr(-,root,root)
|
|
||||||
%doc gold/NEWS gold/README
|
%doc gold/NEWS gold/README
|
||||||
%{_bindir}/gold
|
%{_bindir}/gold
|
||||||
%{_bindir}/ld.gold
|
%{_bindir}/ld.gold
|
||||||
@ -634,7 +633,6 @@ fi;
|
|||||||
|
|
||||||
%if 0%{!?cross:1}
|
%if 0%{!?cross:1}
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_prefix}/include/*.h
|
%{_prefix}/include/*.h
|
||||||
%{_libdir}/lib*.*a
|
%{_libdir}/lib*.*a
|
||||||
%{_libdir}/libctf.so
|
%{_libdir}/libctf.so
|
||||||
|
Loading…
Reference in New Issue
Block a user