SHA256
1
0
forked from pool/binutils

- Drop the new spec files again, instead move the cross-$arch-binutils

contents to /usr, away from /opt.

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/binutils?expand=0&rev=88
This commit is contained in:
Richard Biener 2012-02-15 11:33:41 +00:00 committed by Git OBS Bridge
parent ef845cca75
commit 0506179d7c
35 changed files with 1421 additions and 5602 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,512 +0,0 @@
#
# spec file for package binutils
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: avr-binutils
BuildRequires: bison
BuildRequires: dejagnu
BuildRequires: flex
BuildRequires: gcc-c++
# for the testsuite
%if 0%{suse_version} >= 1210
BuildRequires: glibc-devel-static
%endif
# for some gold tests
BuildRequires: bc
%if 0%{suse_version} > 1110
BuildRequires: zlib-devel-static
%else
BuildRequires: zlib-devel
%endif
Version: 2.22
Release: 0
#
# RUN_TESTS
%define run_tests %(test ! -f %_sourcedir/RUN_TESTS ; echo $?)
# check the vanilla binutils, with no patches applied
# TEST_VANILLA
%define test_vanilla %(test ! -f %_sourcedir/TEST_VANILLA ; echo $?)
#
# handle test suite failures
#
%ifarch alpha %arm hppa mips sh4 %sparc
%define make_check_handling true
%else
# XXX check again
# XXX disabled because gold is seriously broken for now
%define make_check_handling true
%endif
# let make check fail anyway if RUN_TESTS was requested
%if %{run_tests}
%define make_check_handling false
%endif
# handle all binary object formats supported by SuSE (and a few more)
%ifarch %ix86 %arm ia64 ppc ppc64 s390 s390x x86_64
%define build_multitarget 1
%else
%define build_multitarget 0
%endif
%define target_list alpha armv5l armv7l armv8l hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 s390 s390x sh4 sparc sparc64 x86_64
#
%define cross 0
#
#
Url: http://www.gnu.org/software/binutils/
PreReq: %{install_info_prereq}
# bug437293
%ifarch ppc64
Obsoletes: binutils-64bit
%endif
#
%define binutils_version %(echo %version | sed 's/\\.[0-9]\\{8\\}$//')
Summary: GNU Binutils
License: GFDL-1.3 and GPL-3.0+
Group: Development/Tools/Building
Source: binutils-%{binutils_version}.tar.bz2
Source1: pre_checkin.sh
Source2: README.First-for.SuSE.packagers
Source3: baselibs.conf
Patch3: binutils-skip-rpaths.patch
Patch4: s390-biarch.diff
Patch5: x86-64-biarch.patch
Patch6: unit-at-a-time.patch
Patch7: ld-dtags.diff
Patch8: ld-relro.diff
Patch9: testsuite.diff
Patch10: enable-targets-gold.diff
Patch11: use-hashtype-both-by-default.diff
Patch14: binutils-build-as-needed.diff
Patch15: fixup-testcase-perturb.diff
Patch18: gold-depend-on-opcodes.diff
Patch19: bso12451.diff
Patch20: bso13449.diff
Patch90: cross-avr-nesc-as.patch
Patch92: cross-avr-omit_section_dynsym.patch
Patch93: avr-binutils-relocs.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
C compiler utilities: ar, as, gprof, ld, nm, objcopy, objdump, ranlib,
size, strings, and strip. These utilities are needed whenever you want
to compile a program or kernel.
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
The existing GNU linker manual is intended to be accurate
documentation for features which gold supports. gold supports
most of the features of the GNU linker for ELF targets. Notable
omissions--features of the GNU linker not currently supported in
gold--are: * MEMORY regions in linker scripts
* MRI compatible linker scripts
* linker map files (-M, -Map)
* cross-reference reports (--cref)
* linker garbage collection (--gc-sections)
* position independent executables (-pie)
* various other minor options
Authors:
--------
Ian Lance Taylor <iant@google.com>
Cary Coutant <ccoutant@google.com>
Craig Silverstein <csilvers@google.com>
Andrew Chatham
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
%if "%{name}" != "binutils"
%define TARGET %(echo %{name} | sed -e "s/\\(cross-\\)\\?\\(.*\\)-binutils/\\2/;s/-/_/g;s/parisc/hppa/;s/i.86/i586/;s/ppc/powerpc/")
%endif
%ifarch %arm
%define HOST %{_target_cpu}-suse-linux-gnueabi
%else
%define HOST %(echo %{_target_cpu} | sed -e "s/parisc/hppa/" -e "s/i.86/i586/" -e "s/ppc/powerpc/" -e "s/sparc64v.*/sparc64/" -e "s/sparcv.*/sparc/")-suse-linux
%endif
%define DIST %(echo '%distribution' | sed 's/ (.*)//')
%prep
echo "make check will return with %{make_check_handling} in case of testsuite failures."
%setup -q -n binutils-%{binutils_version}
%if !%{test_vanilla}
%patch3
%patch4
%patch5
%patch6
%patch7 -p1
%patch8
%patch9
%patch10
%patch11
%patch14
%patch15
%patch18
%patch19 -p1
%patch20 -p1
%if "%{TARGET}" == "avr"
cp gas/config/tc-avr.h gas/config/tc-avr-nesc.h
%patch90
%patch92
%patch93 -p1
%endif
#
# test_vanilla
%endif
sed -i -e '/BFD_VERSION_DATE/s/$/-%(echo %release | sed 's/\.[0-9]*$//')/' bfd/version.h
%build
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error"
%if "%{name}" == "binutils"
# Building native binutils
echo "Building native binutils."
%if %build_multitarget
EXTRA_TARGETS="%(printf ,%%s-suse-linux %target_list)"
EXTRA_TARGETS="$EXTRA_TARGETS,powerpc-macos,powerpc-macos10,spu-elf,x86_64-pep"
%else
EXTRA_TARGETS=
%ifarch sparc
EXTRA_TARGETS="$EXTRA_TARGETS,sparc64-suse-linux"
%endif
%ifarch ppc
EXTRA_TARGETS="$EXTRA_TARGETS,powerpc64-suse-linux"
%endif
%ifarch s390
EXTRA_TARGETS="$EXTRA_TARGETS,s390x-suse-linux"
%endif
%ifarch s390x
EXTRA_TARGETS="$EXTRA_TARGETS,s390-suse-linux"
%endif
%ifarch %ix86
EXTRA_TARGETS="$EXTRA_TARGETS,x86_64-suse-linux"
%endif
%ifarch ppc ppc64
EXTRA_TARGETS="$EXTRA_TARGETS,spu-elf"
%endif
%ifarch %arm
EXTRA_TARGETS="$EXTRA_TARGETS,arm-suse-linux-gnueabi"
%endif
%endif
%define common_flags CFLAGS="${RPM_OPT_FLAGS}" CXXFLAGS="${RPM_OPT_FLAGS}" \\\
--prefix=%{_prefix} --libdir=%{_libdir} \\\
--infodir=%{_infodir} --mandir=%{_mandir} \\\
--with-bugurl=http://bugs.opensuse.org/ \\\
--with-pkgversion="GNU Binutils; %{DIST}" \\\
--with-separate-debug-dir=%{_prefix}/lib/debug \\\
--with-pic --build=%{HOST}
mkdir build-dir
cd build-dir
../configure %common_flags \
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"} \
--enable-plugins \
--enable-shared
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
# force reconfiguring (???)
rm bfd/Makefile
make %{?_smp_mflags}
%check
export SUSE_ASNEEDED=0
cd build-dir
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
#
#
#
%else
# building cross-TARGET-binutils
echo "Building cross binutils."
mkdir build-dir
cd build-dir
EXTRA_TARGETS=
%if "%{TARGET}" == "sparc"
EXTRA_TARGETS="$EXTRA_TARGETS,sparc64-suse-linux"
%endif
%if "%{TARGET}" == "powerpc"
EXTRA_TARGETS="$EXTRA_TARGETS,powerpc64-suse-linux"
%endif
%if "%{TARGET}" == "s390"
EXTRA_TARGETS="$EXTRA_TARGETS,s390x-suse-linux"
%endif
%if "%{TARGET}" == "s390x"
EXTRA_TARGETS="$EXTRA_TARGETS,s390-suse-linux"
%endif
%if "%{TARGET}" == "i586"
EXTRA_TARGETS="$EXTRA_TARGETS,x86_64-suse-linux"
%endif
%if "%{TARGET}" == "hppa"
EXTRA_TARGETS="$EXTRA_TARGETS,hppa64-suse-linux"
%endif
%if "%{TARGET}" == "arm"
EXTRA_TARGETS="$EXTRA_TARGETS,arm-suse-linux-gnueabi"
%endif
%if "%{TARGET}" == "avr" || "%{TARGET}" == "spu"
TARGET_OS=%{TARGET}
%else
TARGET_OS=%{TARGET}-linux
%endif
../configure CFLAGS="${RPM_OPT_FLAGS}" \
--prefix=%{_prefix} \
--with-bugurl=http://bugs.opensuse.org/ \
--with-pkgversion="GNU Binutils; %{DIST}" \
--disable-nls \
--build=%{HOST} --target=$TARGET_OS \
%if "%{TARGET}" == "spu"
--with-sysroot=/usr/spu \
%else
--with-sysroot=%{_prefix}/$TARGET_OS/sys-root \
%endif
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"}
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
# force reconfiguring
rm bfd/Makefile
make %{?_smp_mflags}
%if "%{TARGET}" == "avr"
# build an extra nesC version because nesC requires $'s in identifiers
cp -a gas gas-nesc
echo '#include "tc-%{TARGET}-nesc.h"' > gas-nesc/targ-cpu.h
make -C gas-nesc clean
make -C gas-nesc %{?_smp_mflags}
%endif
%check
unset SUSE_ASNEEDED
cd build-dir
make -k check CFLAGS="$RPM_OPT_FLAGS -Wno-unused -Wno-unprototyped-calls" || :
%endif
%install
cd build-dir
%if "%name" == "binutils"
# installing native binutils
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
# we could eventually use alternatives for /usr/bin/ld
if test -f $RPM_BUILD_ROOT%{_bindir}/ld.bfd; then
rm $RPM_BUILD_ROOT%{_bindir}/ld
ln -sf ld.bfd $RPM_BUILD_ROOT%{_bindir}/ld;
fi
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
ln -sf ../../bin/{ar,as,ld,nm,ranlib,strip} $RPM_BUILD_ROOT%{_prefix}/%{HOST}/bin
mv $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/ldscripts $RPM_BUILD_ROOT%{_prefix}/%{HOST}/lib/ldscripts
# Install header files
make -C libiberty install_to_libdir target_header_dir=/usr/include DESTDIR=$RPM_BUILD_ROOT
# We want the PIC libiberty.a
install -m 644 libiberty/pic/libiberty.a $RPM_BUILD_ROOT%{_libdir}
#
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libbfd-*
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libopcodes-*
# No shared linking outside binutils
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.so
rm $RPM_BUILD_ROOT%{_libdir}/lib{bfd,opcodes}.la
# Remove unwanted files to shut up rpm
rm $RPM_BUILD_ROOT%{_infodir}/configure* $RPM_BUILD_ROOT%{_infodir}/standards.info*
rm $RPM_BUILD_ROOT%{_mandir}/man1/dlltool.1 $RPM_BUILD_ROOT%{_mandir}/man1/windres.1 $RPM_BUILD_ROOT%{_mandir}/man1/windmc.1
cd ..
%find_lang binutils
%find_lang bfd binutils.lang
%find_lang gas binutils.lang
%find_lang ld binutils.lang
%find_lang opcodes binutils.lang
%find_lang gprof binutils.lang
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
%if !%cross
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET}*)
for f in %buildroot/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET}-nesc-as
ln -sf ../../bin/%{TARGET}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET}/bin/nesc-as
%endif
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib*
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
> ../binutils.lang
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%if "%name" == "binutils"
%post
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/ld.info.gz
%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/as.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/binutils.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gprof.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/ld.info.gz
%endif
%files -f binutils.lang
%defattr(-,root,root)
%if "%name" == "binutils"
%{_docdir}/%{name}
%{_prefix}/%{HOST}/bin/*
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%doc %{_infodir}/*.gz
%{_libdir}/lib*-%{version}*.so
%doc %{_mandir}/man1/*.1.gz
%else
%if %cross
%dir %{_prefix}
%endif
%{_prefix}/%{TARGET}*
%{_prefix}/bin/*
%endif
%changelog

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Feb 15 11:32:14 UTC 2012 - rguenther@suse.com
- Drop the new spec files again, instead move the cross-$arch-binutils
contents to /usr, away from /opt.
-------------------------------------------------------------------
Tue Feb 14 17:53:08 UTC 2012 - max@suse.com

View File

@ -15,8 +15,6 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: binutils
BuildRequires: bison
BuildRequires: dejagnu
@ -63,7 +61,6 @@ Release: 0
%endif
%define target_list alpha armv5l armv7l armv8l hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 s390 s390x sh4 sparc sparc64 x86_64
#
%define cross 0
#
#
Url: http://www.gnu.org/software/binutils/
@ -106,104 +103,22 @@ size, strings, and strip. These utilities are needed whenever you want
to compile a program or kernel.
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
%package gold
Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
%endif
%endif
%description gold
gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
The existing GNU linker manual is intended to be accurate
documentation for features which gold supports. gold supports
most of the features of the GNU linker for ELF targets. Notable
omissions--features of the GNU linker not currently supported in
gold--are: * MEMORY regions in linker scripts
* MRI compatible linker scripts
* linker map files (-M, -Map)
* cross-reference reports (--cref)
* linker garbage collection (--gc-sections)
* position independent executables (-pie)
* various other minor options
Authors:
--------
Ian Lance Taylor <iant@google.com>
Cary Coutant <ccoutant@google.com>
Craig Silverstein <csilvers@google.com>
Andrew Chatham
%package devel
Summary: GNU binutils (BFD development files)
@ -218,67 +133,6 @@ build programs which use the GNU BFD library, which is part of
binutils.
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
%if "%{name}" != "binutils"
%define TARGET %(echo %{name} | sed -e "s/\\(cross-\\)\\?\\(.*\\)-binutils/\\2/;s/-/_/g;s/parisc/hppa/;s/i.86/i586/;s/ppc/powerpc/")
%endif
%ifarch %arm
%define HOST %{_target_cpu}-suse-linux-gnueabi
%else
@ -317,7 +171,7 @@ sed -i -e '/BFD_VERSION_DATE/s/$/-%(echo %release | sed 's/\.[0-9]*$//')/' bfd/v
%build
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error"
%if "%{name}" == "binutils"
%if 0%{!?cross:1}
# Building native binutils
echo "Building native binutils."
%if %build_multitarget
@ -368,13 +222,6 @@ make %{?_smp_mflags} all-bfd TARGET-bfd=headers
rm bfd/Makefile
make %{?_smp_mflags}
%check
export SUSE_ASNEEDED=0
cd build-dir
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
#
#
#
%else
# building cross-TARGET-binutils
echo "Building cross binutils."
@ -430,16 +277,20 @@ echo '#include "tc-%{TARGET}-nesc.h"' > gas-nesc/targ-cpu.h
make -C gas-nesc clean
make -C gas-nesc %{?_smp_mflags}
%endif
%endif
%check
unset SUSE_ASNEEDED
cd build-dir
%if 0%{?cross:1}
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
%else
make -k check CFLAGS="$RPM_OPT_FLAGS -Wno-unused -Wno-unprototyped-calls" || :
%endif
%install
cd build-dir
%if "%name" == "binutils"
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
@ -488,13 +339,11 @@ install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
%if !%cross
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET}*)
for f in %buildroot/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET}-nesc-as
ln -sf ../../bin/%{TARGET}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET}/bin/nesc-as
@ -509,8 +358,8 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
%clean
rm -rf $RPM_BUILD_ROOT
%if "%name" == "binutils"
%if 0%{!?cross:1}
%post
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
@ -528,7 +377,7 @@ rm -rf $RPM_BUILD_ROOT
%files -f binutils.lang
%defattr(-,root,root)
%if "%name" == "binutils"
%if 0%{!?cross:1}
%{_docdir}/%{name}
%{_prefix}/%{HOST}/bin/*
%{_prefix}/%{HOST}/lib/ldscripts
@ -542,14 +391,11 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/lib*-%{version}*.so
%doc %{_mandir}/man1/*.1.gz
%else
%if %cross
%dir %{_prefix}
%endif
%{_prefix}/%{TARGET}*
%{_prefix}/bin/*
%endif
%ifarch %gold_archs
%ifarch %gold_archs
%files gold -f binutils-gold.lang
%defattr(-,root,root)
%doc gold/NEWS gold/README
@ -557,9 +403,11 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/ld.gold
%endif
%if 0%{!?cross:1}
%files devel
%defattr(-,root,root)
%{_prefix}/include/*.h
%{_libdir}/lib*.*a
%endif
%changelog

View File

@ -1,7 +1,14 @@
-------------------------------------------------------------------
Tue Feb 14 11:17:51 UTC 2012 - max@suse.com
Wed Feb 15 11:32:14 UTC 2012 - rguenther@suse.com
- Add a subpackage for avr-binutils that installs under /usr/avr.
- Drop the new spec files again, instead move the cross-$arch-binutils
contents to /usr, away from /opt.
-------------------------------------------------------------------
Tue Feb 14 17:53:08 UTC 2012 - max@suse.com
- Add spec files that build variants for arm and avr that install
under /usr rather than /opt/cross.
- Add avr-binutils-relocs.patch to fix a crash in avr-ld.
http://sourceware.org/bugzilla/show_bug.cgi?id=12161

View File

@ -1,5 +1,5 @@
#
# spec file for package binutils
# spec file for package cross-alpha-binutils
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -14,8 +14,23 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define cross 1
%define TARGET alpha
#
# spec file for package binutils
#
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: cross-alpha-binutils
BuildRequires: bison
@ -63,8 +78,6 @@ Release: 0
%endif
%define target_list alpha armv5l armv7l armv8l hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 s390 s390x sh4 sparc sparc64 x86_64
#
%define cross 1
%define _prefix /opt/cross
#
#
Url: http://www.gnu.org/software/binutils/
@ -107,153 +120,36 @@ size, strings, and strip. These utilities are needed whenever you want
to compile a program or kernel.
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
The existing GNU linker manual is intended to be accurate
documentation for features which gold supports. gold supports
most of the features of the GNU linker for ELF targets. Notable
omissions--features of the GNU linker not currently supported in
gold--are: * MEMORY regions in linker scripts
* MRI compatible linker scripts
* linker map files (-M, -Map)
* cross-reference reports (--cref)
* linker garbage collection (--gc-sections)
* position independent executables (-pie)
* various other minor options
Authors:
--------
Ian Lance Taylor <iant@google.com>
Cary Coutant <ccoutant@google.com>
Craig Silverstein <csilvers@google.com>
Andrew Chatham
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
%if "%{name}" != "binutils"
%define TARGET %(echo %{name} | sed -e "s/\\(cross-\\)\\?\\(.*\\)-binutils/\\2/;s/-/_/g;s/parisc/hppa/;s/i.86/i586/;s/ppc/powerpc/")
%package gold
Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
%endif
%endif
%description gold
gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
Group: Development/Libraries/C and C++
Requires: binutils = %{version}-%{release}, zlib-devel
Provides: binutils:/usr/include/bfd.h
%description devel
This package includes header files and static libraries necessary to
build programs which use the GNU BFD library, which is part of
binutils.
%ifarch %arm
%define HOST %{_target_cpu}-suse-linux-gnueabi
%else
@ -292,7 +188,7 @@ sed -i -e '/BFD_VERSION_DATE/s/$/-%(echo %release | sed 's/\.[0-9]*$//')/' bfd/v
%build
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error"
%if "%{name}" == "binutils"
%if 0%{!?cross:1}
# Building native binutils
echo "Building native binutils."
%if %build_multitarget
@ -334,19 +230,15 @@ cd build-dir
../configure %common_flags \
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"} \
--enable-plugins \
%ifarch %gold_archs
--enable-gold \
%endif
--enable-shared
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
# force reconfiguring (???)
rm bfd/Makefile
make %{?_smp_mflags}
%check
export SUSE_ASNEEDED=0
cd build-dir
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
#
#
#
%else
# building cross-TARGET-binutils
echo "Building cross binutils."
@ -402,17 +294,25 @@ echo '#include "tc-%{TARGET}-nesc.h"' > gas-nesc/targ-cpu.h
make -C gas-nesc clean
make -C gas-nesc %{?_smp_mflags}
%endif
%endif
%check
unset SUSE_ASNEEDED
cd build-dir
%if 0%{?cross:1}
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
%else
make -k check CFLAGS="$RPM_OPT_FLAGS -Wno-unused -Wno-unprototyped-calls" || :
%endif
%install
cd build-dir
%if "%name" == "binutils"
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
@ -446,6 +346,9 @@ cd ..
%find_lang ld binutils.lang
%find_lang opcodes binutils.lang
%find_lang gprof binutils.lang
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
@ -453,13 +356,11 @@ install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
%if !%cross
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET}*)
for f in %buildroot/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET}-nesc-as
ln -sf ../../bin/%{TARGET}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET}/bin/nesc-as
@ -474,8 +375,8 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
%clean
rm -rf $RPM_BUILD_ROOT
%if "%name" == "binutils"
%if 0%{!?cross:1}
%post
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
@ -493,21 +394,37 @@ rm -rf $RPM_BUILD_ROOT
%files -f binutils.lang
%defattr(-,root,root)
%if "%name" == "binutils"
%if 0%{!?cross:1}
%{_docdir}/%{name}
%{_prefix}/%{HOST}/bin/*
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold
%endif
%doc %{_infodir}/*.gz
%{_libdir}/lib*-%{version}*.so
%doc %{_mandir}/man1/*.1.gz
%else
%if %cross
%dir %{_prefix}
%endif
%{_prefix}/%{TARGET}*
%{_prefix}/bin/*
%endif
%ifarch %gold_archs
%files gold -f binutils-gold.lang
%defattr(-,root,root)
%doc gold/NEWS gold/README
%{_bindir}/gold
%{_bindir}/ld.gold
%endif
%if 0%{!?cross:1}
%files devel
%defattr(-,root,root)
%{_prefix}/include/*.h
%{_libdir}/lib*.*a
%endif
%changelog

View File

@ -1,7 +1,14 @@
-------------------------------------------------------------------
Tue Feb 14 11:17:51 UTC 2012 - max@suse.com
Wed Feb 15 11:32:14 UTC 2012 - rguenther@suse.com
- Add a subpackage for avr-binutils that installs under /usr/avr.
- Drop the new spec files again, instead move the cross-$arch-binutils
contents to /usr, away from /opt.
-------------------------------------------------------------------
Tue Feb 14 17:53:08 UTC 2012 - max@suse.com
- Add spec files that build variants for arm and avr that install
under /usr rather than /opt/cross.
- Add avr-binutils-relocs.patch to fix a crash in avr-ld.
http://sourceware.org/bugzilla/show_bug.cgi?id=12161

View File

@ -1,5 +1,5 @@
#
# spec file for package binutils
# spec file for package cross-arm-binutils
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -14,8 +14,23 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define cross 1
%define TARGET arm
#
# spec file for package binutils
#
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: cross-arm-binutils
BuildRequires: bison
@ -63,8 +78,6 @@ Release: 0
%endif
%define target_list alpha armv5l armv7l armv8l hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 s390 s390x sh4 sparc sparc64 x86_64
#
%define cross 1
%define _prefix /opt/cross
#
#
Url: http://www.gnu.org/software/binutils/
@ -107,153 +120,36 @@ size, strings, and strip. These utilities are needed whenever you want
to compile a program or kernel.
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
The existing GNU linker manual is intended to be accurate
documentation for features which gold supports. gold supports
most of the features of the GNU linker for ELF targets. Notable
omissions--features of the GNU linker not currently supported in
gold--are: * MEMORY regions in linker scripts
* MRI compatible linker scripts
* linker map files (-M, -Map)
* cross-reference reports (--cref)
* linker garbage collection (--gc-sections)
* position independent executables (-pie)
* various other minor options
Authors:
--------
Ian Lance Taylor <iant@google.com>
Cary Coutant <ccoutant@google.com>
Craig Silverstein <csilvers@google.com>
Andrew Chatham
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
%if "%{name}" != "binutils"
%define TARGET %(echo %{name} | sed -e "s/\\(cross-\\)\\?\\(.*\\)-binutils/\\2/;s/-/_/g;s/parisc/hppa/;s/i.86/i586/;s/ppc/powerpc/")
%package gold
Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
%endif
%endif
%description gold
gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
Group: Development/Libraries/C and C++
Requires: binutils = %{version}-%{release}, zlib-devel
Provides: binutils:/usr/include/bfd.h
%description devel
This package includes header files and static libraries necessary to
build programs which use the GNU BFD library, which is part of
binutils.
%ifarch %arm
%define HOST %{_target_cpu}-suse-linux-gnueabi
%else
@ -292,7 +188,7 @@ sed -i -e '/BFD_VERSION_DATE/s/$/-%(echo %release | sed 's/\.[0-9]*$//')/' bfd/v
%build
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error"
%if "%{name}" == "binutils"
%if 0%{!?cross:1}
# Building native binutils
echo "Building native binutils."
%if %build_multitarget
@ -334,19 +230,15 @@ cd build-dir
../configure %common_flags \
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"} \
--enable-plugins \
%ifarch %gold_archs
--enable-gold \
%endif
--enable-shared
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
# force reconfiguring (???)
rm bfd/Makefile
make %{?_smp_mflags}
%check
export SUSE_ASNEEDED=0
cd build-dir
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
#
#
#
%else
# building cross-TARGET-binutils
echo "Building cross binutils."
@ -402,17 +294,25 @@ echo '#include "tc-%{TARGET}-nesc.h"' > gas-nesc/targ-cpu.h
make -C gas-nesc clean
make -C gas-nesc %{?_smp_mflags}
%endif
%endif
%check
unset SUSE_ASNEEDED
cd build-dir
%if 0%{?cross:1}
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
%else
make -k check CFLAGS="$RPM_OPT_FLAGS -Wno-unused -Wno-unprototyped-calls" || :
%endif
%install
cd build-dir
%if "%name" == "binutils"
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
@ -446,6 +346,9 @@ cd ..
%find_lang ld binutils.lang
%find_lang opcodes binutils.lang
%find_lang gprof binutils.lang
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
@ -453,13 +356,11 @@ install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
%if !%cross
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET}*)
for f in %buildroot/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET}-nesc-as
ln -sf ../../bin/%{TARGET}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET}/bin/nesc-as
@ -474,8 +375,8 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
%clean
rm -rf $RPM_BUILD_ROOT
%if "%name" == "binutils"
%if 0%{!?cross:1}
%post
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
@ -493,21 +394,37 @@ rm -rf $RPM_BUILD_ROOT
%files -f binutils.lang
%defattr(-,root,root)
%if "%name" == "binutils"
%if 0%{!?cross:1}
%{_docdir}/%{name}
%{_prefix}/%{HOST}/bin/*
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold
%endif
%doc %{_infodir}/*.gz
%{_libdir}/lib*-%{version}*.so
%doc %{_mandir}/man1/*.1.gz
%else
%if %cross
%dir %{_prefix}
%endif
%{_prefix}/%{TARGET}*
%{_prefix}/bin/*
%endif
%ifarch %gold_archs
%files gold -f binutils-gold.lang
%defattr(-,root,root)
%doc gold/NEWS gold/README
%{_bindir}/gold
%{_bindir}/ld.gold
%endif
%if 0%{!?cross:1}
%files devel
%defattr(-,root,root)
%{_prefix}/include/*.h
%{_libdir}/lib*.*a
%endif
%changelog

View File

@ -1,7 +1,14 @@
-------------------------------------------------------------------
Tue Feb 14 11:17:51 UTC 2012 - max@suse.com
Wed Feb 15 11:32:14 UTC 2012 - rguenther@suse.com
- Add a subpackage for avr-binutils that installs under /usr/avr.
- Drop the new spec files again, instead move the cross-$arch-binutils
contents to /usr, away from /opt.
-------------------------------------------------------------------
Tue Feb 14 17:53:08 UTC 2012 - max@suse.com
- Add spec files that build variants for arm and avr that install
under /usr rather than /opt/cross.
- Add avr-binutils-relocs.patch to fix a crash in avr-ld.
http://sourceware.org/bugzilla/show_bug.cgi?id=12161

View File

@ -1,5 +1,5 @@
#
# spec file for package binutils
# spec file for package cross-avr-binutils
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -14,10 +14,25 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define cross 1
%define TARGET avr
#
# spec file for package binutils
#
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: arm-binutils
Name: cross-avr-binutils
BuildRequires: bison
BuildRequires: dejagnu
BuildRequires: flex
@ -63,7 +78,6 @@ Release: 0
%endif
%define target_list alpha armv5l armv7l armv8l hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 s390 s390x sh4 sparc sparc64 x86_64
#
%define cross 0
#
#
Url: http://www.gnu.org/software/binutils/
@ -106,153 +120,36 @@ size, strings, and strip. These utilities are needed whenever you want
to compile a program or kernel.
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
The existing GNU linker manual is intended to be accurate
documentation for features which gold supports. gold supports
most of the features of the GNU linker for ELF targets. Notable
omissions--features of the GNU linker not currently supported in
gold--are: * MEMORY regions in linker scripts
* MRI compatible linker scripts
* linker map files (-M, -Map)
* cross-reference reports (--cref)
* linker garbage collection (--gc-sections)
* position independent executables (-pie)
* various other minor options
Authors:
--------
Ian Lance Taylor <iant@google.com>
Cary Coutant <ccoutant@google.com>
Craig Silverstein <csilvers@google.com>
Andrew Chatham
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
%if "%{name}" != "binutils"
%define TARGET %(echo %{name} | sed -e "s/\\(cross-\\)\\?\\(.*\\)-binutils/\\2/;s/-/_/g;s/parisc/hppa/;s/i.86/i586/;s/ppc/powerpc/")
%package gold
Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
%endif
%endif
%description gold
gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
Group: Development/Libraries/C and C++
Requires: binutils = %{version}-%{release}, zlib-devel
Provides: binutils:/usr/include/bfd.h
%description devel
This package includes header files and static libraries necessary to
build programs which use the GNU BFD library, which is part of
binutils.
%ifarch %arm
%define HOST %{_target_cpu}-suse-linux-gnueabi
%else
@ -291,7 +188,7 @@ sed -i -e '/BFD_VERSION_DATE/s/$/-%(echo %release | sed 's/\.[0-9]*$//')/' bfd/v
%build
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error"
%if "%{name}" == "binutils"
%if 0%{!?cross:1}
# Building native binutils
echo "Building native binutils."
%if %build_multitarget
@ -333,19 +230,15 @@ cd build-dir
../configure %common_flags \
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"} \
--enable-plugins \
%ifarch %gold_archs
--enable-gold \
%endif
--enable-shared
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
# force reconfiguring (???)
rm bfd/Makefile
make %{?_smp_mflags}
%check
export SUSE_ASNEEDED=0
cd build-dir
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
#
#
#
%else
# building cross-TARGET-binutils
echo "Building cross binutils."
@ -401,17 +294,25 @@ echo '#include "tc-%{TARGET}-nesc.h"' > gas-nesc/targ-cpu.h
make -C gas-nesc clean
make -C gas-nesc %{?_smp_mflags}
%endif
%endif
%check
unset SUSE_ASNEEDED
cd build-dir
%if 0%{?cross:1}
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
%else
make -k check CFLAGS="$RPM_OPT_FLAGS -Wno-unused -Wno-unprototyped-calls" || :
%endif
%install
cd build-dir
%if "%name" == "binutils"
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
@ -445,6 +346,9 @@ cd ..
%find_lang ld binutils.lang
%find_lang opcodes binutils.lang
%find_lang gprof binutils.lang
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
@ -452,13 +356,11 @@ install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
%if !%cross
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET}*)
for f in %buildroot/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET}-nesc-as
ln -sf ../../bin/%{TARGET}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET}/bin/nesc-as
@ -473,8 +375,8 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
%clean
rm -rf $RPM_BUILD_ROOT
%if "%name" == "binutils"
%if 0%{!?cross:1}
%post
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
@ -492,21 +394,37 @@ rm -rf $RPM_BUILD_ROOT
%files -f binutils.lang
%defattr(-,root,root)
%if "%name" == "binutils"
%if 0%{!?cross:1}
%{_docdir}/%{name}
%{_prefix}/%{HOST}/bin/*
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold
%endif
%doc %{_infodir}/*.gz
%{_libdir}/lib*-%{version}*.so
%doc %{_mandir}/man1/*.1.gz
%else
%if %cross
%dir %{_prefix}
%endif
%{_prefix}/%{TARGET}*
%{_prefix}/bin/*
%endif
%ifarch %gold_archs
%files gold -f binutils-gold.lang
%defattr(-,root,root)
%doc gold/NEWS gold/README
%{_bindir}/gold
%{_bindir}/ld.gold
%endif
%if 0%{!?cross:1}
%files devel
%defattr(-,root,root)
%{_prefix}/include/*.h
%{_libdir}/lib*.*a
%endif
%changelog

View File

@ -1,7 +1,14 @@
-------------------------------------------------------------------
Tue Feb 14 11:17:51 UTC 2012 - max@suse.com
Wed Feb 15 11:32:14 UTC 2012 - rguenther@suse.com
- Add a subpackage for avr-binutils that installs under /usr/avr.
- Drop the new spec files again, instead move the cross-$arch-binutils
contents to /usr, away from /opt.
-------------------------------------------------------------------
Tue Feb 14 17:53:08 UTC 2012 - max@suse.com
- Add spec files that build variants for arm and avr that install
under /usr rather than /opt/cross.
- Add avr-binutils-relocs.patch to fix a crash in avr-ld.
http://sourceware.org/bugzilla/show_bug.cgi?id=12161

View File

@ -1,5 +1,5 @@
#
# spec file for package binutils
# spec file for package cross-hppa-binutils
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -14,8 +14,23 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define cross 1
%define TARGET hppa
#
# spec file for package binutils
#
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: cross-hppa-binutils
BuildRequires: bison
@ -63,8 +78,6 @@ Release: 0
%endif
%define target_list alpha armv5l armv7l armv8l hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 s390 s390x sh4 sparc sparc64 x86_64
#
%define cross 1
%define _prefix /opt/cross
#
#
Url: http://www.gnu.org/software/binutils/
@ -107,153 +120,36 @@ size, strings, and strip. These utilities are needed whenever you want
to compile a program or kernel.
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
The existing GNU linker manual is intended to be accurate
documentation for features which gold supports. gold supports
most of the features of the GNU linker for ELF targets. Notable
omissions--features of the GNU linker not currently supported in
gold--are: * MEMORY regions in linker scripts
* MRI compatible linker scripts
* linker map files (-M, -Map)
* cross-reference reports (--cref)
* linker garbage collection (--gc-sections)
* position independent executables (-pie)
* various other minor options
Authors:
--------
Ian Lance Taylor <iant@google.com>
Cary Coutant <ccoutant@google.com>
Craig Silverstein <csilvers@google.com>
Andrew Chatham
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
%if "%{name}" != "binutils"
%define TARGET %(echo %{name} | sed -e "s/\\(cross-\\)\\?\\(.*\\)-binutils/\\2/;s/-/_/g;s/parisc/hppa/;s/i.86/i586/;s/ppc/powerpc/")
%package gold
Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
%endif
%endif
%description gold
gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
Group: Development/Libraries/C and C++
Requires: binutils = %{version}-%{release}, zlib-devel
Provides: binutils:/usr/include/bfd.h
%description devel
This package includes header files and static libraries necessary to
build programs which use the GNU BFD library, which is part of
binutils.
%ifarch %arm
%define HOST %{_target_cpu}-suse-linux-gnueabi
%else
@ -292,7 +188,7 @@ sed -i -e '/BFD_VERSION_DATE/s/$/-%(echo %release | sed 's/\.[0-9]*$//')/' bfd/v
%build
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error"
%if "%{name}" == "binutils"
%if 0%{!?cross:1}
# Building native binutils
echo "Building native binutils."
%if %build_multitarget
@ -334,19 +230,15 @@ cd build-dir
../configure %common_flags \
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"} \
--enable-plugins \
%ifarch %gold_archs
--enable-gold \
%endif
--enable-shared
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
# force reconfiguring (???)
rm bfd/Makefile
make %{?_smp_mflags}
%check
export SUSE_ASNEEDED=0
cd build-dir
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
#
#
#
%else
# building cross-TARGET-binutils
echo "Building cross binutils."
@ -402,17 +294,25 @@ echo '#include "tc-%{TARGET}-nesc.h"' > gas-nesc/targ-cpu.h
make -C gas-nesc clean
make -C gas-nesc %{?_smp_mflags}
%endif
%endif
%check
unset SUSE_ASNEEDED
cd build-dir
%if 0%{?cross:1}
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
%else
make -k check CFLAGS="$RPM_OPT_FLAGS -Wno-unused -Wno-unprototyped-calls" || :
%endif
%install
cd build-dir
%if "%name" == "binutils"
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
@ -446,6 +346,9 @@ cd ..
%find_lang ld binutils.lang
%find_lang opcodes binutils.lang
%find_lang gprof binutils.lang
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
@ -453,13 +356,11 @@ install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
%if !%cross
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET}*)
for f in %buildroot/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET}-nesc-as
ln -sf ../../bin/%{TARGET}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET}/bin/nesc-as
@ -474,8 +375,8 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
%clean
rm -rf $RPM_BUILD_ROOT
%if "%name" == "binutils"
%if 0%{!?cross:1}
%post
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
@ -493,21 +394,37 @@ rm -rf $RPM_BUILD_ROOT
%files -f binutils.lang
%defattr(-,root,root)
%if "%name" == "binutils"
%if 0%{!?cross:1}
%{_docdir}/%{name}
%{_prefix}/%{HOST}/bin/*
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold
%endif
%doc %{_infodir}/*.gz
%{_libdir}/lib*-%{version}*.so
%doc %{_mandir}/man1/*.1.gz
%else
%if %cross
%dir %{_prefix}
%endif
%{_prefix}/%{TARGET}*
%{_prefix}/bin/*
%endif
%ifarch %gold_archs
%files gold -f binutils-gold.lang
%defattr(-,root,root)
%doc gold/NEWS gold/README
%{_bindir}/gold
%{_bindir}/ld.gold
%endif
%if 0%{!?cross:1}
%files devel
%defattr(-,root,root)
%{_prefix}/include/*.h
%{_libdir}/lib*.*a
%endif
%changelog

View File

@ -1,7 +1,14 @@
-------------------------------------------------------------------
Tue Feb 14 11:17:51 UTC 2012 - max@suse.com
Wed Feb 15 11:32:14 UTC 2012 - rguenther@suse.com
- Add a subpackage for avr-binutils that installs under /usr/avr.
- Drop the new spec files again, instead move the cross-$arch-binutils
contents to /usr, away from /opt.
-------------------------------------------------------------------
Tue Feb 14 17:53:08 UTC 2012 - max@suse.com
- Add spec files that build variants for arm and avr that install
under /usr rather than /opt/cross.
- Add avr-binutils-relocs.patch to fix a crash in avr-ld.
http://sourceware.org/bugzilla/show_bug.cgi?id=12161

View File

@ -1,5 +1,5 @@
#
# spec file for package binutils
# spec file for package cross-hppa64-binutils
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -14,8 +14,23 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define cross 1
%define TARGET hppa64
#
# spec file for package binutils
#
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: cross-hppa64-binutils
BuildRequires: bison
@ -63,8 +78,6 @@ Release: 0
%endif
%define target_list alpha armv5l armv7l armv8l hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 s390 s390x sh4 sparc sparc64 x86_64
#
%define cross 1
%define _prefix /opt/cross
#
#
Url: http://www.gnu.org/software/binutils/
@ -107,153 +120,36 @@ size, strings, and strip. These utilities are needed whenever you want
to compile a program or kernel.
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
The existing GNU linker manual is intended to be accurate
documentation for features which gold supports. gold supports
most of the features of the GNU linker for ELF targets. Notable
omissions--features of the GNU linker not currently supported in
gold--are: * MEMORY regions in linker scripts
* MRI compatible linker scripts
* linker map files (-M, -Map)
* cross-reference reports (--cref)
* linker garbage collection (--gc-sections)
* position independent executables (-pie)
* various other minor options
Authors:
--------
Ian Lance Taylor <iant@google.com>
Cary Coutant <ccoutant@google.com>
Craig Silverstein <csilvers@google.com>
Andrew Chatham
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
%if "%{name}" != "binutils"
%define TARGET %(echo %{name} | sed -e "s/\\(cross-\\)\\?\\(.*\\)-binutils/\\2/;s/-/_/g;s/parisc/hppa/;s/i.86/i586/;s/ppc/powerpc/")
%package gold
Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
%endif
%endif
%description gold
gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
Group: Development/Libraries/C and C++
Requires: binutils = %{version}-%{release}, zlib-devel
Provides: binutils:/usr/include/bfd.h
%description devel
This package includes header files and static libraries necessary to
build programs which use the GNU BFD library, which is part of
binutils.
%ifarch %arm
%define HOST %{_target_cpu}-suse-linux-gnueabi
%else
@ -292,7 +188,7 @@ sed -i -e '/BFD_VERSION_DATE/s/$/-%(echo %release | sed 's/\.[0-9]*$//')/' bfd/v
%build
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error"
%if "%{name}" == "binutils"
%if 0%{!?cross:1}
# Building native binutils
echo "Building native binutils."
%if %build_multitarget
@ -334,19 +230,15 @@ cd build-dir
../configure %common_flags \
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"} \
--enable-plugins \
%ifarch %gold_archs
--enable-gold \
%endif
--enable-shared
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
# force reconfiguring (???)
rm bfd/Makefile
make %{?_smp_mflags}
%check
export SUSE_ASNEEDED=0
cd build-dir
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
#
#
#
%else
# building cross-TARGET-binutils
echo "Building cross binutils."
@ -402,17 +294,25 @@ echo '#include "tc-%{TARGET}-nesc.h"' > gas-nesc/targ-cpu.h
make -C gas-nesc clean
make -C gas-nesc %{?_smp_mflags}
%endif
%endif
%check
unset SUSE_ASNEEDED
cd build-dir
%if 0%{?cross:1}
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
%else
make -k check CFLAGS="$RPM_OPT_FLAGS -Wno-unused -Wno-unprototyped-calls" || :
%endif
%install
cd build-dir
%if "%name" == "binutils"
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
@ -446,6 +346,9 @@ cd ..
%find_lang ld binutils.lang
%find_lang opcodes binutils.lang
%find_lang gprof binutils.lang
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
@ -453,13 +356,11 @@ install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
%if !%cross
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET}*)
for f in %buildroot/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET}-nesc-as
ln -sf ../../bin/%{TARGET}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET}/bin/nesc-as
@ -474,8 +375,8 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
%clean
rm -rf $RPM_BUILD_ROOT
%if "%name" == "binutils"
%if 0%{!?cross:1}
%post
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
@ -493,21 +394,37 @@ rm -rf $RPM_BUILD_ROOT
%files -f binutils.lang
%defattr(-,root,root)
%if "%name" == "binutils"
%if 0%{!?cross:1}
%{_docdir}/%{name}
%{_prefix}/%{HOST}/bin/*
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold
%endif
%doc %{_infodir}/*.gz
%{_libdir}/lib*-%{version}*.so
%doc %{_mandir}/man1/*.1.gz
%else
%if %cross
%dir %{_prefix}
%endif
%{_prefix}/%{TARGET}*
%{_prefix}/bin/*
%endif
%ifarch %gold_archs
%files gold -f binutils-gold.lang
%defattr(-,root,root)
%doc gold/NEWS gold/README
%{_bindir}/gold
%{_bindir}/ld.gold
%endif
%if 0%{!?cross:1}
%files devel
%defattr(-,root,root)
%{_prefix}/include/*.h
%{_libdir}/lib*.*a
%endif
%changelog

View File

@ -1,7 +1,14 @@
-------------------------------------------------------------------
Tue Feb 14 11:17:51 UTC 2012 - max@suse.com
Wed Feb 15 11:32:14 UTC 2012 - rguenther@suse.com
- Add a subpackage for avr-binutils that installs under /usr/avr.
- Drop the new spec files again, instead move the cross-$arch-binutils
contents to /usr, away from /opt.
-------------------------------------------------------------------
Tue Feb 14 17:53:08 UTC 2012 - max@suse.com
- Add spec files that build variants for arm and avr that install
under /usr rather than /opt/cross.
- Add avr-binutils-relocs.patch to fix a crash in avr-ld.
http://sourceware.org/bugzilla/show_bug.cgi?id=12161

View File

@ -1,5 +1,5 @@
#
# spec file for package binutils
# spec file for package cross-i386-binutils
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -14,8 +14,23 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define cross 1
%define TARGET i586
#
# spec file for package binutils
#
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: cross-i386-binutils
BuildRequires: bison
@ -63,8 +78,6 @@ Release: 0
%endif
%define target_list alpha armv5l armv7l armv8l hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 s390 s390x sh4 sparc sparc64 x86_64
#
%define cross 1
%define _prefix /opt/cross
#
#
Url: http://www.gnu.org/software/binutils/
@ -107,153 +120,36 @@ size, strings, and strip. These utilities are needed whenever you want
to compile a program or kernel.
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
The existing GNU linker manual is intended to be accurate
documentation for features which gold supports. gold supports
most of the features of the GNU linker for ELF targets. Notable
omissions--features of the GNU linker not currently supported in
gold--are: * MEMORY regions in linker scripts
* MRI compatible linker scripts
* linker map files (-M, -Map)
* cross-reference reports (--cref)
* linker garbage collection (--gc-sections)
* position independent executables (-pie)
* various other minor options
Authors:
--------
Ian Lance Taylor <iant@google.com>
Cary Coutant <ccoutant@google.com>
Craig Silverstein <csilvers@google.com>
Andrew Chatham
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
%if "%{name}" != "binutils"
%define TARGET %(echo %{name} | sed -e "s/\\(cross-\\)\\?\\(.*\\)-binutils/\\2/;s/-/_/g;s/parisc/hppa/;s/i.86/i586/;s/ppc/powerpc/")
%package gold
Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
%endif
%endif
%description gold
gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
Group: Development/Libraries/C and C++
Requires: binutils = %{version}-%{release}, zlib-devel
Provides: binutils:/usr/include/bfd.h
%description devel
This package includes header files and static libraries necessary to
build programs which use the GNU BFD library, which is part of
binutils.
%ifarch %arm
%define HOST %{_target_cpu}-suse-linux-gnueabi
%else
@ -292,7 +188,7 @@ sed -i -e '/BFD_VERSION_DATE/s/$/-%(echo %release | sed 's/\.[0-9]*$//')/' bfd/v
%build
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error"
%if "%{name}" == "binutils"
%if 0%{!?cross:1}
# Building native binutils
echo "Building native binutils."
%if %build_multitarget
@ -334,19 +230,15 @@ cd build-dir
../configure %common_flags \
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"} \
--enable-plugins \
%ifarch %gold_archs
--enable-gold \
%endif
--enable-shared
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
# force reconfiguring (???)
rm bfd/Makefile
make %{?_smp_mflags}
%check
export SUSE_ASNEEDED=0
cd build-dir
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
#
#
#
%else
# building cross-TARGET-binutils
echo "Building cross binutils."
@ -402,17 +294,25 @@ echo '#include "tc-%{TARGET}-nesc.h"' > gas-nesc/targ-cpu.h
make -C gas-nesc clean
make -C gas-nesc %{?_smp_mflags}
%endif
%endif
%check
unset SUSE_ASNEEDED
cd build-dir
%if 0%{?cross:1}
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
%else
make -k check CFLAGS="$RPM_OPT_FLAGS -Wno-unused -Wno-unprototyped-calls" || :
%endif
%install
cd build-dir
%if "%name" == "binutils"
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
@ -446,6 +346,9 @@ cd ..
%find_lang ld binutils.lang
%find_lang opcodes binutils.lang
%find_lang gprof binutils.lang
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
@ -453,13 +356,11 @@ install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
%if !%cross
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET}*)
for f in %buildroot/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET}-nesc-as
ln -sf ../../bin/%{TARGET}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET}/bin/nesc-as
@ -474,8 +375,8 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
%clean
rm -rf $RPM_BUILD_ROOT
%if "%name" == "binutils"
%if 0%{!?cross:1}
%post
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
@ -493,21 +394,37 @@ rm -rf $RPM_BUILD_ROOT
%files -f binutils.lang
%defattr(-,root,root)
%if "%name" == "binutils"
%if 0%{!?cross:1}
%{_docdir}/%{name}
%{_prefix}/%{HOST}/bin/*
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold
%endif
%doc %{_infodir}/*.gz
%{_libdir}/lib*-%{version}*.so
%doc %{_mandir}/man1/*.1.gz
%else
%if %cross
%dir %{_prefix}
%endif
%{_prefix}/%{TARGET}*
%{_prefix}/bin/*
%endif
%ifarch %gold_archs
%files gold -f binutils-gold.lang
%defattr(-,root,root)
%doc gold/NEWS gold/README
%{_bindir}/gold
%{_bindir}/ld.gold
%endif
%if 0%{!?cross:1}
%files devel
%defattr(-,root,root)
%{_prefix}/include/*.h
%{_libdir}/lib*.*a
%endif
%changelog

View File

@ -1,7 +1,14 @@
-------------------------------------------------------------------
Tue Feb 14 11:17:51 UTC 2012 - max@suse.com
Wed Feb 15 11:32:14 UTC 2012 - rguenther@suse.com
- Add a subpackage for avr-binutils that installs under /usr/avr.
- Drop the new spec files again, instead move the cross-$arch-binutils
contents to /usr, away from /opt.
-------------------------------------------------------------------
Tue Feb 14 17:53:08 UTC 2012 - max@suse.com
- Add spec files that build variants for arm and avr that install
under /usr rather than /opt/cross.
- Add avr-binutils-relocs.patch to fix a crash in avr-ld.
http://sourceware.org/bugzilla/show_bug.cgi?id=12161

View File

@ -1,5 +1,5 @@
#
# spec file for package binutils
# spec file for package cross-ia64-binutils
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -14,8 +14,23 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define cross 1
%define TARGET ia64
#
# spec file for package binutils
#
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: cross-ia64-binutils
BuildRequires: bison
@ -63,8 +78,6 @@ Release: 0
%endif
%define target_list alpha armv5l armv7l armv8l hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 s390 s390x sh4 sparc sparc64 x86_64
#
%define cross 1
%define _prefix /opt/cross
#
#
Url: http://www.gnu.org/software/binutils/
@ -107,153 +120,36 @@ size, strings, and strip. These utilities are needed whenever you want
to compile a program or kernel.
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
The existing GNU linker manual is intended to be accurate
documentation for features which gold supports. gold supports
most of the features of the GNU linker for ELF targets. Notable
omissions--features of the GNU linker not currently supported in
gold--are: * MEMORY regions in linker scripts
* MRI compatible linker scripts
* linker map files (-M, -Map)
* cross-reference reports (--cref)
* linker garbage collection (--gc-sections)
* position independent executables (-pie)
* various other minor options
Authors:
--------
Ian Lance Taylor <iant@google.com>
Cary Coutant <ccoutant@google.com>
Craig Silverstein <csilvers@google.com>
Andrew Chatham
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
%if "%{name}" != "binutils"
%define TARGET %(echo %{name} | sed -e "s/\\(cross-\\)\\?\\(.*\\)-binutils/\\2/;s/-/_/g;s/parisc/hppa/;s/i.86/i586/;s/ppc/powerpc/")
%package gold
Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
%endif
%endif
%description gold
gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
Group: Development/Libraries/C and C++
Requires: binutils = %{version}-%{release}, zlib-devel
Provides: binutils:/usr/include/bfd.h
%description devel
This package includes header files and static libraries necessary to
build programs which use the GNU BFD library, which is part of
binutils.
%ifarch %arm
%define HOST %{_target_cpu}-suse-linux-gnueabi
%else
@ -292,7 +188,7 @@ sed -i -e '/BFD_VERSION_DATE/s/$/-%(echo %release | sed 's/\.[0-9]*$//')/' bfd/v
%build
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error"
%if "%{name}" == "binutils"
%if 0%{!?cross:1}
# Building native binutils
echo "Building native binutils."
%if %build_multitarget
@ -334,19 +230,15 @@ cd build-dir
../configure %common_flags \
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"} \
--enable-plugins \
%ifarch %gold_archs
--enable-gold \
%endif
--enable-shared
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
# force reconfiguring (???)
rm bfd/Makefile
make %{?_smp_mflags}
%check
export SUSE_ASNEEDED=0
cd build-dir
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
#
#
#
%else
# building cross-TARGET-binutils
echo "Building cross binutils."
@ -402,17 +294,25 @@ echo '#include "tc-%{TARGET}-nesc.h"' > gas-nesc/targ-cpu.h
make -C gas-nesc clean
make -C gas-nesc %{?_smp_mflags}
%endif
%endif
%check
unset SUSE_ASNEEDED
cd build-dir
%if 0%{?cross:1}
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
%else
make -k check CFLAGS="$RPM_OPT_FLAGS -Wno-unused -Wno-unprototyped-calls" || :
%endif
%install
cd build-dir
%if "%name" == "binutils"
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
@ -446,6 +346,9 @@ cd ..
%find_lang ld binutils.lang
%find_lang opcodes binutils.lang
%find_lang gprof binutils.lang
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
@ -453,13 +356,11 @@ install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
%if !%cross
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET}*)
for f in %buildroot/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET}-nesc-as
ln -sf ../../bin/%{TARGET}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET}/bin/nesc-as
@ -474,8 +375,8 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
%clean
rm -rf $RPM_BUILD_ROOT
%if "%name" == "binutils"
%if 0%{!?cross:1}
%post
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
@ -493,21 +394,37 @@ rm -rf $RPM_BUILD_ROOT
%files -f binutils.lang
%defattr(-,root,root)
%if "%name" == "binutils"
%if 0%{!?cross:1}
%{_docdir}/%{name}
%{_prefix}/%{HOST}/bin/*
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold
%endif
%doc %{_infodir}/*.gz
%{_libdir}/lib*-%{version}*.so
%doc %{_mandir}/man1/*.1.gz
%else
%if %cross
%dir %{_prefix}
%endif
%{_prefix}/%{TARGET}*
%{_prefix}/bin/*
%endif
%ifarch %gold_archs
%files gold -f binutils-gold.lang
%defattr(-,root,root)
%doc gold/NEWS gold/README
%{_bindir}/gold
%{_bindir}/ld.gold
%endif
%if 0%{!?cross:1}
%files devel
%defattr(-,root,root)
%{_prefix}/include/*.h
%{_libdir}/lib*.*a
%endif
%changelog

View File

@ -1,7 +1,14 @@
-------------------------------------------------------------------
Tue Feb 14 11:17:51 UTC 2012 - max@suse.com
Wed Feb 15 11:32:14 UTC 2012 - rguenther@suse.com
- Add a subpackage for avr-binutils that installs under /usr/avr.
- Drop the new spec files again, instead move the cross-$arch-binutils
contents to /usr, away from /opt.
-------------------------------------------------------------------
Tue Feb 14 17:53:08 UTC 2012 - max@suse.com
- Add spec files that build variants for arm and avr that install
under /usr rather than /opt/cross.
- Add avr-binutils-relocs.patch to fix a crash in avr-ld.
http://sourceware.org/bugzilla/show_bug.cgi?id=12161

View File

@ -1,5 +1,5 @@
#
# spec file for package binutils
# spec file for package cross-mips-binutils
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -14,8 +14,23 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define cross 1
%define TARGET mips
#
# spec file for package binutils
#
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: cross-mips-binutils
BuildRequires: bison
@ -63,8 +78,6 @@ Release: 0
%endif
%define target_list alpha armv5l armv7l armv8l hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 s390 s390x sh4 sparc sparc64 x86_64
#
%define cross 1
%define _prefix /opt/cross
#
#
Url: http://www.gnu.org/software/binutils/
@ -107,153 +120,36 @@ size, strings, and strip. These utilities are needed whenever you want
to compile a program or kernel.
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
The existing GNU linker manual is intended to be accurate
documentation for features which gold supports. gold supports
most of the features of the GNU linker for ELF targets. Notable
omissions--features of the GNU linker not currently supported in
gold--are: * MEMORY regions in linker scripts
* MRI compatible linker scripts
* linker map files (-M, -Map)
* cross-reference reports (--cref)
* linker garbage collection (--gc-sections)
* position independent executables (-pie)
* various other minor options
Authors:
--------
Ian Lance Taylor <iant@google.com>
Cary Coutant <ccoutant@google.com>
Craig Silverstein <csilvers@google.com>
Andrew Chatham
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
%if "%{name}" != "binutils"
%define TARGET %(echo %{name} | sed -e "s/\\(cross-\\)\\?\\(.*\\)-binutils/\\2/;s/-/_/g;s/parisc/hppa/;s/i.86/i586/;s/ppc/powerpc/")
%package gold
Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
%endif
%endif
%description gold
gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
Group: Development/Libraries/C and C++
Requires: binutils = %{version}-%{release}, zlib-devel
Provides: binutils:/usr/include/bfd.h
%description devel
This package includes header files and static libraries necessary to
build programs which use the GNU BFD library, which is part of
binutils.
%ifarch %arm
%define HOST %{_target_cpu}-suse-linux-gnueabi
%else
@ -292,7 +188,7 @@ sed -i -e '/BFD_VERSION_DATE/s/$/-%(echo %release | sed 's/\.[0-9]*$//')/' bfd/v
%build
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error"
%if "%{name}" == "binutils"
%if 0%{!?cross:1}
# Building native binutils
echo "Building native binutils."
%if %build_multitarget
@ -334,19 +230,15 @@ cd build-dir
../configure %common_flags \
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"} \
--enable-plugins \
%ifarch %gold_archs
--enable-gold \
%endif
--enable-shared
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
# force reconfiguring (???)
rm bfd/Makefile
make %{?_smp_mflags}
%check
export SUSE_ASNEEDED=0
cd build-dir
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
#
#
#
%else
# building cross-TARGET-binutils
echo "Building cross binutils."
@ -402,17 +294,25 @@ echo '#include "tc-%{TARGET}-nesc.h"' > gas-nesc/targ-cpu.h
make -C gas-nesc clean
make -C gas-nesc %{?_smp_mflags}
%endif
%endif
%check
unset SUSE_ASNEEDED
cd build-dir
%if 0%{?cross:1}
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
%else
make -k check CFLAGS="$RPM_OPT_FLAGS -Wno-unused -Wno-unprototyped-calls" || :
%endif
%install
cd build-dir
%if "%name" == "binutils"
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
@ -446,6 +346,9 @@ cd ..
%find_lang ld binutils.lang
%find_lang opcodes binutils.lang
%find_lang gprof binutils.lang
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
@ -453,13 +356,11 @@ install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
%if !%cross
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET}*)
for f in %buildroot/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET}-nesc-as
ln -sf ../../bin/%{TARGET}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET}/bin/nesc-as
@ -474,8 +375,8 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
%clean
rm -rf $RPM_BUILD_ROOT
%if "%name" == "binutils"
%if 0%{!?cross:1}
%post
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
@ -493,21 +394,37 @@ rm -rf $RPM_BUILD_ROOT
%files -f binutils.lang
%defattr(-,root,root)
%if "%name" == "binutils"
%if 0%{!?cross:1}
%{_docdir}/%{name}
%{_prefix}/%{HOST}/bin/*
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold
%endif
%doc %{_infodir}/*.gz
%{_libdir}/lib*-%{version}*.so
%doc %{_mandir}/man1/*.1.gz
%else
%if %cross
%dir %{_prefix}
%endif
%{_prefix}/%{TARGET}*
%{_prefix}/bin/*
%endif
%ifarch %gold_archs
%files gold -f binutils-gold.lang
%defattr(-,root,root)
%doc gold/NEWS gold/README
%{_bindir}/gold
%{_bindir}/ld.gold
%endif
%if 0%{!?cross:1}
%files devel
%defattr(-,root,root)
%{_prefix}/include/*.h
%{_libdir}/lib*.*a
%endif
%changelog

View File

@ -1,7 +1,14 @@
-------------------------------------------------------------------
Tue Feb 14 11:17:51 UTC 2012 - max@suse.com
Wed Feb 15 11:32:14 UTC 2012 - rguenther@suse.com
- Add a subpackage for avr-binutils that installs under /usr/avr.
- Drop the new spec files again, instead move the cross-$arch-binutils
contents to /usr, away from /opt.
-------------------------------------------------------------------
Tue Feb 14 17:53:08 UTC 2012 - max@suse.com
- Add spec files that build variants for arm and avr that install
under /usr rather than /opt/cross.
- Add avr-binutils-relocs.patch to fix a crash in avr-ld.
http://sourceware.org/bugzilla/show_bug.cgi?id=12161

View File

@ -1,5 +1,5 @@
#
# spec file for package binutils
# spec file for package cross-ppc-binutils
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -14,8 +14,23 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define cross 1
%define TARGET powerpc
#
# spec file for package binutils
#
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: cross-ppc-binutils
BuildRequires: bison
@ -63,8 +78,6 @@ Release: 0
%endif
%define target_list alpha armv5l armv7l armv8l hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 s390 s390x sh4 sparc sparc64 x86_64
#
%define cross 1
%define _prefix /opt/cross
#
#
Url: http://www.gnu.org/software/binutils/
@ -107,153 +120,36 @@ size, strings, and strip. These utilities are needed whenever you want
to compile a program or kernel.
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
The existing GNU linker manual is intended to be accurate
documentation for features which gold supports. gold supports
most of the features of the GNU linker for ELF targets. Notable
omissions--features of the GNU linker not currently supported in
gold--are: * MEMORY regions in linker scripts
* MRI compatible linker scripts
* linker map files (-M, -Map)
* cross-reference reports (--cref)
* linker garbage collection (--gc-sections)
* position independent executables (-pie)
* various other minor options
Authors:
--------
Ian Lance Taylor <iant@google.com>
Cary Coutant <ccoutant@google.com>
Craig Silverstein <csilvers@google.com>
Andrew Chatham
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
%if "%{name}" != "binutils"
%define TARGET %(echo %{name} | sed -e "s/\\(cross-\\)\\?\\(.*\\)-binutils/\\2/;s/-/_/g;s/parisc/hppa/;s/i.86/i586/;s/ppc/powerpc/")
%package gold
Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
%endif
%endif
%description gold
gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
Group: Development/Libraries/C and C++
Requires: binutils = %{version}-%{release}, zlib-devel
Provides: binutils:/usr/include/bfd.h
%description devel
This package includes header files and static libraries necessary to
build programs which use the GNU BFD library, which is part of
binutils.
%ifarch %arm
%define HOST %{_target_cpu}-suse-linux-gnueabi
%else
@ -292,7 +188,7 @@ sed -i -e '/BFD_VERSION_DATE/s/$/-%(echo %release | sed 's/\.[0-9]*$//')/' bfd/v
%build
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error"
%if "%{name}" == "binutils"
%if 0%{!?cross:1}
# Building native binutils
echo "Building native binutils."
%if %build_multitarget
@ -334,19 +230,15 @@ cd build-dir
../configure %common_flags \
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"} \
--enable-plugins \
%ifarch %gold_archs
--enable-gold \
%endif
--enable-shared
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
# force reconfiguring (???)
rm bfd/Makefile
make %{?_smp_mflags}
%check
export SUSE_ASNEEDED=0
cd build-dir
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
#
#
#
%else
# building cross-TARGET-binutils
echo "Building cross binutils."
@ -402,17 +294,25 @@ echo '#include "tc-%{TARGET}-nesc.h"' > gas-nesc/targ-cpu.h
make -C gas-nesc clean
make -C gas-nesc %{?_smp_mflags}
%endif
%endif
%check
unset SUSE_ASNEEDED
cd build-dir
%if 0%{?cross:1}
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
%else
make -k check CFLAGS="$RPM_OPT_FLAGS -Wno-unused -Wno-unprototyped-calls" || :
%endif
%install
cd build-dir
%if "%name" == "binutils"
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
@ -446,6 +346,9 @@ cd ..
%find_lang ld binutils.lang
%find_lang opcodes binutils.lang
%find_lang gprof binutils.lang
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
@ -453,13 +356,11 @@ install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
%if !%cross
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET}*)
for f in %buildroot/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET}-nesc-as
ln -sf ../../bin/%{TARGET}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET}/bin/nesc-as
@ -474,8 +375,8 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
%clean
rm -rf $RPM_BUILD_ROOT
%if "%name" == "binutils"
%if 0%{!?cross:1}
%post
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
@ -493,21 +394,37 @@ rm -rf $RPM_BUILD_ROOT
%files -f binutils.lang
%defattr(-,root,root)
%if "%name" == "binutils"
%if 0%{!?cross:1}
%{_docdir}/%{name}
%{_prefix}/%{HOST}/bin/*
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold
%endif
%doc %{_infodir}/*.gz
%{_libdir}/lib*-%{version}*.so
%doc %{_mandir}/man1/*.1.gz
%else
%if %cross
%dir %{_prefix}
%endif
%{_prefix}/%{TARGET}*
%{_prefix}/bin/*
%endif
%ifarch %gold_archs
%files gold -f binutils-gold.lang
%defattr(-,root,root)
%doc gold/NEWS gold/README
%{_bindir}/gold
%{_bindir}/ld.gold
%endif
%if 0%{!?cross:1}
%files devel
%defattr(-,root,root)
%{_prefix}/include/*.h
%{_libdir}/lib*.*a
%endif
%changelog

View File

@ -1,7 +1,14 @@
-------------------------------------------------------------------
Tue Feb 14 11:17:51 UTC 2012 - max@suse.com
Wed Feb 15 11:32:14 UTC 2012 - rguenther@suse.com
- Add a subpackage for avr-binutils that installs under /usr/avr.
- Drop the new spec files again, instead move the cross-$arch-binutils
contents to /usr, away from /opt.
-------------------------------------------------------------------
Tue Feb 14 17:53:08 UTC 2012 - max@suse.com
- Add spec files that build variants for arm and avr that install
under /usr rather than /opt/cross.
- Add avr-binutils-relocs.patch to fix a crash in avr-ld.
http://sourceware.org/bugzilla/show_bug.cgi?id=12161

View File

@ -1,5 +1,5 @@
#
# spec file for package binutils
# spec file for package cross-ppc64-binutils
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -14,8 +14,23 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define cross 1
%define TARGET powerpc64
#
# spec file for package binutils
#
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: cross-ppc64-binutils
BuildRequires: bison
@ -63,8 +78,6 @@ Release: 0
%endif
%define target_list alpha armv5l armv7l armv8l hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 s390 s390x sh4 sparc sparc64 x86_64
#
%define cross 1
%define _prefix /opt/cross
#
#
Url: http://www.gnu.org/software/binutils/
@ -107,153 +120,36 @@ size, strings, and strip. These utilities are needed whenever you want
to compile a program or kernel.
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
The existing GNU linker manual is intended to be accurate
documentation for features which gold supports. gold supports
most of the features of the GNU linker for ELF targets. Notable
omissions--features of the GNU linker not currently supported in
gold--are: * MEMORY regions in linker scripts
* MRI compatible linker scripts
* linker map files (-M, -Map)
* cross-reference reports (--cref)
* linker garbage collection (--gc-sections)
* position independent executables (-pie)
* various other minor options
Authors:
--------
Ian Lance Taylor <iant@google.com>
Cary Coutant <ccoutant@google.com>
Craig Silverstein <csilvers@google.com>
Andrew Chatham
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
%if "%{name}" != "binutils"
%define TARGET %(echo %{name} | sed -e "s/\\(cross-\\)\\?\\(.*\\)-binutils/\\2/;s/-/_/g;s/parisc/hppa/;s/i.86/i586/;s/ppc/powerpc/")
%package gold
Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
%endif
%endif
%description gold
gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
Group: Development/Libraries/C and C++
Requires: binutils = %{version}-%{release}, zlib-devel
Provides: binutils:/usr/include/bfd.h
%description devel
This package includes header files and static libraries necessary to
build programs which use the GNU BFD library, which is part of
binutils.
%ifarch %arm
%define HOST %{_target_cpu}-suse-linux-gnueabi
%else
@ -292,7 +188,7 @@ sed -i -e '/BFD_VERSION_DATE/s/$/-%(echo %release | sed 's/\.[0-9]*$//')/' bfd/v
%build
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error"
%if "%{name}" == "binutils"
%if 0%{!?cross:1}
# Building native binutils
echo "Building native binutils."
%if %build_multitarget
@ -334,19 +230,15 @@ cd build-dir
../configure %common_flags \
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"} \
--enable-plugins \
%ifarch %gold_archs
--enable-gold \
%endif
--enable-shared
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
# force reconfiguring (???)
rm bfd/Makefile
make %{?_smp_mflags}
%check
export SUSE_ASNEEDED=0
cd build-dir
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
#
#
#
%else
# building cross-TARGET-binutils
echo "Building cross binutils."
@ -402,17 +294,25 @@ echo '#include "tc-%{TARGET}-nesc.h"' > gas-nesc/targ-cpu.h
make -C gas-nesc clean
make -C gas-nesc %{?_smp_mflags}
%endif
%endif
%check
unset SUSE_ASNEEDED
cd build-dir
%if 0%{?cross:1}
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
%else
make -k check CFLAGS="$RPM_OPT_FLAGS -Wno-unused -Wno-unprototyped-calls" || :
%endif
%install
cd build-dir
%if "%name" == "binutils"
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
@ -446,6 +346,9 @@ cd ..
%find_lang ld binutils.lang
%find_lang opcodes binutils.lang
%find_lang gprof binutils.lang
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
@ -453,13 +356,11 @@ install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
%if !%cross
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET}*)
for f in %buildroot/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET}-nesc-as
ln -sf ../../bin/%{TARGET}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET}/bin/nesc-as
@ -474,8 +375,8 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
%clean
rm -rf $RPM_BUILD_ROOT
%if "%name" == "binutils"
%if 0%{!?cross:1}
%post
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
@ -493,21 +394,37 @@ rm -rf $RPM_BUILD_ROOT
%files -f binutils.lang
%defattr(-,root,root)
%if "%name" == "binutils"
%if 0%{!?cross:1}
%{_docdir}/%{name}
%{_prefix}/%{HOST}/bin/*
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold
%endif
%doc %{_infodir}/*.gz
%{_libdir}/lib*-%{version}*.so
%doc %{_mandir}/man1/*.1.gz
%else
%if %cross
%dir %{_prefix}
%endif
%{_prefix}/%{TARGET}*
%{_prefix}/bin/*
%endif
%ifarch %gold_archs
%files gold -f binutils-gold.lang
%defattr(-,root,root)
%doc gold/NEWS gold/README
%{_bindir}/gold
%{_bindir}/ld.gold
%endif
%if 0%{!?cross:1}
%files devel
%defattr(-,root,root)
%{_prefix}/include/*.h
%{_libdir}/lib*.*a
%endif
%changelog

View File

@ -1,7 +1,14 @@
-------------------------------------------------------------------
Tue Feb 14 11:17:51 UTC 2012 - max@suse.com
Wed Feb 15 11:32:14 UTC 2012 - rguenther@suse.com
- Add a subpackage for avr-binutils that installs under /usr/avr.
- Drop the new spec files again, instead move the cross-$arch-binutils
contents to /usr, away from /opt.
-------------------------------------------------------------------
Tue Feb 14 17:53:08 UTC 2012 - max@suse.com
- Add spec files that build variants for arm and avr that install
under /usr rather than /opt/cross.
- Add avr-binutils-relocs.patch to fix a crash in avr-ld.
http://sourceware.org/bugzilla/show_bug.cgi?id=12161

View File

@ -1,5 +1,5 @@
#
# spec file for package binutils
# spec file for package cross-s390-binutils
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -14,8 +14,23 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define cross 1
%define TARGET s390
#
# spec file for package binutils
#
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: cross-s390-binutils
BuildRequires: bison
@ -63,8 +78,6 @@ Release: 0
%endif
%define target_list alpha armv5l armv7l armv8l hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 s390 s390x sh4 sparc sparc64 x86_64
#
%define cross 1
%define _prefix /opt/cross
#
#
Url: http://www.gnu.org/software/binutils/
@ -107,153 +120,36 @@ size, strings, and strip. These utilities are needed whenever you want
to compile a program or kernel.
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
The existing GNU linker manual is intended to be accurate
documentation for features which gold supports. gold supports
most of the features of the GNU linker for ELF targets. Notable
omissions--features of the GNU linker not currently supported in
gold--are: * MEMORY regions in linker scripts
* MRI compatible linker scripts
* linker map files (-M, -Map)
* cross-reference reports (--cref)
* linker garbage collection (--gc-sections)
* position independent executables (-pie)
* various other minor options
Authors:
--------
Ian Lance Taylor <iant@google.com>
Cary Coutant <ccoutant@google.com>
Craig Silverstein <csilvers@google.com>
Andrew Chatham
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
%if "%{name}" != "binutils"
%define TARGET %(echo %{name} | sed -e "s/\\(cross-\\)\\?\\(.*\\)-binutils/\\2/;s/-/_/g;s/parisc/hppa/;s/i.86/i586/;s/ppc/powerpc/")
%package gold
Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
%endif
%endif
%description gold
gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
Group: Development/Libraries/C and C++
Requires: binutils = %{version}-%{release}, zlib-devel
Provides: binutils:/usr/include/bfd.h
%description devel
This package includes header files and static libraries necessary to
build programs which use the GNU BFD library, which is part of
binutils.
%ifarch %arm
%define HOST %{_target_cpu}-suse-linux-gnueabi
%else
@ -292,7 +188,7 @@ sed -i -e '/BFD_VERSION_DATE/s/$/-%(echo %release | sed 's/\.[0-9]*$//')/' bfd/v
%build
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error"
%if "%{name}" == "binutils"
%if 0%{!?cross:1}
# Building native binutils
echo "Building native binutils."
%if %build_multitarget
@ -334,19 +230,15 @@ cd build-dir
../configure %common_flags \
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"} \
--enable-plugins \
%ifarch %gold_archs
--enable-gold \
%endif
--enable-shared
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
# force reconfiguring (???)
rm bfd/Makefile
make %{?_smp_mflags}
%check
export SUSE_ASNEEDED=0
cd build-dir
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
#
#
#
%else
# building cross-TARGET-binutils
echo "Building cross binutils."
@ -402,17 +294,25 @@ echo '#include "tc-%{TARGET}-nesc.h"' > gas-nesc/targ-cpu.h
make -C gas-nesc clean
make -C gas-nesc %{?_smp_mflags}
%endif
%endif
%check
unset SUSE_ASNEEDED
cd build-dir
%if 0%{?cross:1}
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
%else
make -k check CFLAGS="$RPM_OPT_FLAGS -Wno-unused -Wno-unprototyped-calls" || :
%endif
%install
cd build-dir
%if "%name" == "binutils"
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
@ -446,6 +346,9 @@ cd ..
%find_lang ld binutils.lang
%find_lang opcodes binutils.lang
%find_lang gprof binutils.lang
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
@ -453,13 +356,11 @@ install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
%if !%cross
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET}*)
for f in %buildroot/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET}-nesc-as
ln -sf ../../bin/%{TARGET}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET}/bin/nesc-as
@ -474,8 +375,8 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
%clean
rm -rf $RPM_BUILD_ROOT
%if "%name" == "binutils"
%if 0%{!?cross:1}
%post
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
@ -493,21 +394,37 @@ rm -rf $RPM_BUILD_ROOT
%files -f binutils.lang
%defattr(-,root,root)
%if "%name" == "binutils"
%if 0%{!?cross:1}
%{_docdir}/%{name}
%{_prefix}/%{HOST}/bin/*
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold
%endif
%doc %{_infodir}/*.gz
%{_libdir}/lib*-%{version}*.so
%doc %{_mandir}/man1/*.1.gz
%else
%if %cross
%dir %{_prefix}
%endif
%{_prefix}/%{TARGET}*
%{_prefix}/bin/*
%endif
%ifarch %gold_archs
%files gold -f binutils-gold.lang
%defattr(-,root,root)
%doc gold/NEWS gold/README
%{_bindir}/gold
%{_bindir}/ld.gold
%endif
%if 0%{!?cross:1}
%files devel
%defattr(-,root,root)
%{_prefix}/include/*.h
%{_libdir}/lib*.*a
%endif
%changelog

View File

@ -1,7 +1,14 @@
-------------------------------------------------------------------
Tue Feb 14 11:17:51 UTC 2012 - max@suse.com
Wed Feb 15 11:32:14 UTC 2012 - rguenther@suse.com
- Add a subpackage for avr-binutils that installs under /usr/avr.
- Drop the new spec files again, instead move the cross-$arch-binutils
contents to /usr, away from /opt.
-------------------------------------------------------------------
Tue Feb 14 17:53:08 UTC 2012 - max@suse.com
- Add spec files that build variants for arm and avr that install
under /usr rather than /opt/cross.
- Add avr-binutils-relocs.patch to fix a crash in avr-ld.
http://sourceware.org/bugzilla/show_bug.cgi?id=12161

View File

@ -1,5 +1,5 @@
#
# spec file for package binutils
# spec file for package cross-s390x-binutils
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -14,8 +14,23 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define cross 1
%define TARGET s390x
#
# spec file for package binutils
#
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: cross-s390x-binutils
BuildRequires: bison
@ -63,8 +78,6 @@ Release: 0
%endif
%define target_list alpha armv5l armv7l armv8l hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 s390 s390x sh4 sparc sparc64 x86_64
#
%define cross 1
%define _prefix /opt/cross
#
#
Url: http://www.gnu.org/software/binutils/
@ -107,153 +120,36 @@ size, strings, and strip. These utilities are needed whenever you want
to compile a program or kernel.
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
The existing GNU linker manual is intended to be accurate
documentation for features which gold supports. gold supports
most of the features of the GNU linker for ELF targets. Notable
omissions--features of the GNU linker not currently supported in
gold--are: * MEMORY regions in linker scripts
* MRI compatible linker scripts
* linker map files (-M, -Map)
* cross-reference reports (--cref)
* linker garbage collection (--gc-sections)
* position independent executables (-pie)
* various other minor options
Authors:
--------
Ian Lance Taylor <iant@google.com>
Cary Coutant <ccoutant@google.com>
Craig Silverstein <csilvers@google.com>
Andrew Chatham
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
%if "%{name}" != "binutils"
%define TARGET %(echo %{name} | sed -e "s/\\(cross-\\)\\?\\(.*\\)-binutils/\\2/;s/-/_/g;s/parisc/hppa/;s/i.86/i586/;s/ppc/powerpc/")
%package gold
Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
%endif
%endif
%description gold
gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
Group: Development/Libraries/C and C++
Requires: binutils = %{version}-%{release}, zlib-devel
Provides: binutils:/usr/include/bfd.h
%description devel
This package includes header files and static libraries necessary to
build programs which use the GNU BFD library, which is part of
binutils.
%ifarch %arm
%define HOST %{_target_cpu}-suse-linux-gnueabi
%else
@ -292,7 +188,7 @@ sed -i -e '/BFD_VERSION_DATE/s/$/-%(echo %release | sed 's/\.[0-9]*$//')/' bfd/v
%build
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error"
%if "%{name}" == "binutils"
%if 0%{!?cross:1}
# Building native binutils
echo "Building native binutils."
%if %build_multitarget
@ -334,19 +230,15 @@ cd build-dir
../configure %common_flags \
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"} \
--enable-plugins \
%ifarch %gold_archs
--enable-gold \
%endif
--enable-shared
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
# force reconfiguring (???)
rm bfd/Makefile
make %{?_smp_mflags}
%check
export SUSE_ASNEEDED=0
cd build-dir
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
#
#
#
%else
# building cross-TARGET-binutils
echo "Building cross binutils."
@ -402,17 +294,25 @@ echo '#include "tc-%{TARGET}-nesc.h"' > gas-nesc/targ-cpu.h
make -C gas-nesc clean
make -C gas-nesc %{?_smp_mflags}
%endif
%endif
%check
unset SUSE_ASNEEDED
cd build-dir
%if 0%{?cross:1}
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
%else
make -k check CFLAGS="$RPM_OPT_FLAGS -Wno-unused -Wno-unprototyped-calls" || :
%endif
%install
cd build-dir
%if "%name" == "binutils"
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
@ -446,6 +346,9 @@ cd ..
%find_lang ld binutils.lang
%find_lang opcodes binutils.lang
%find_lang gprof binutils.lang
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
@ -453,13 +356,11 @@ install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
%if !%cross
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET}*)
for f in %buildroot/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET}-nesc-as
ln -sf ../../bin/%{TARGET}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET}/bin/nesc-as
@ -474,8 +375,8 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
%clean
rm -rf $RPM_BUILD_ROOT
%if "%name" == "binutils"
%if 0%{!?cross:1}
%post
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
@ -493,21 +394,37 @@ rm -rf $RPM_BUILD_ROOT
%files -f binutils.lang
%defattr(-,root,root)
%if "%name" == "binutils"
%if 0%{!?cross:1}
%{_docdir}/%{name}
%{_prefix}/%{HOST}/bin/*
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold
%endif
%doc %{_infodir}/*.gz
%{_libdir}/lib*-%{version}*.so
%doc %{_mandir}/man1/*.1.gz
%else
%if %cross
%dir %{_prefix}
%endif
%{_prefix}/%{TARGET}*
%{_prefix}/bin/*
%endif
%ifarch %gold_archs
%files gold -f binutils-gold.lang
%defattr(-,root,root)
%doc gold/NEWS gold/README
%{_bindir}/gold
%{_bindir}/ld.gold
%endif
%if 0%{!?cross:1}
%files devel
%defattr(-,root,root)
%{_prefix}/include/*.h
%{_libdir}/lib*.*a
%endif
%changelog

View File

@ -1,7 +1,14 @@
-------------------------------------------------------------------
Tue Feb 14 11:17:51 UTC 2012 - max@suse.com
Wed Feb 15 11:32:14 UTC 2012 - rguenther@suse.com
- Add a subpackage for avr-binutils that installs under /usr/avr.
- Drop the new spec files again, instead move the cross-$arch-binutils
contents to /usr, away from /opt.
-------------------------------------------------------------------
Tue Feb 14 17:53:08 UTC 2012 - max@suse.com
- Add spec files that build variants for arm and avr that install
under /usr rather than /opt/cross.
- Add avr-binutils-relocs.patch to fix a crash in avr-ld.
http://sourceware.org/bugzilla/show_bug.cgi?id=12161

View File

@ -1,5 +1,5 @@
#
# spec file for package binutils
# spec file for package cross-sparc-binutils
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -14,8 +14,23 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define cross 1
%define TARGET sparc
#
# spec file for package binutils
#
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: cross-sparc-binutils
BuildRequires: bison
@ -63,8 +78,6 @@ Release: 0
%endif
%define target_list alpha armv5l armv7l armv8l hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 s390 s390x sh4 sparc sparc64 x86_64
#
%define cross 1
%define _prefix /opt/cross
#
#
Url: http://www.gnu.org/software/binutils/
@ -107,153 +120,36 @@ size, strings, and strip. These utilities are needed whenever you want
to compile a program or kernel.
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
The existing GNU linker manual is intended to be accurate
documentation for features which gold supports. gold supports
most of the features of the GNU linker for ELF targets. Notable
omissions--features of the GNU linker not currently supported in
gold--are: * MEMORY regions in linker scripts
* MRI compatible linker scripts
* linker map files (-M, -Map)
* cross-reference reports (--cref)
* linker garbage collection (--gc-sections)
* position independent executables (-pie)
* various other minor options
Authors:
--------
Ian Lance Taylor <iant@google.com>
Cary Coutant <ccoutant@google.com>
Craig Silverstein <csilvers@google.com>
Andrew Chatham
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
%if "%{name}" != "binutils"
%define TARGET %(echo %{name} | sed -e "s/\\(cross-\\)\\?\\(.*\\)-binutils/\\2/;s/-/_/g;s/parisc/hppa/;s/i.86/i586/;s/ppc/powerpc/")
%package gold
Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
%endif
%endif
%description gold
gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
Group: Development/Libraries/C and C++
Requires: binutils = %{version}-%{release}, zlib-devel
Provides: binutils:/usr/include/bfd.h
%description devel
This package includes header files and static libraries necessary to
build programs which use the GNU BFD library, which is part of
binutils.
%ifarch %arm
%define HOST %{_target_cpu}-suse-linux-gnueabi
%else
@ -292,7 +188,7 @@ sed -i -e '/BFD_VERSION_DATE/s/$/-%(echo %release | sed 's/\.[0-9]*$//')/' bfd/v
%build
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error"
%if "%{name}" == "binutils"
%if 0%{!?cross:1}
# Building native binutils
echo "Building native binutils."
%if %build_multitarget
@ -334,19 +230,15 @@ cd build-dir
../configure %common_flags \
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"} \
--enable-plugins \
%ifarch %gold_archs
--enable-gold \
%endif
--enable-shared
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
# force reconfiguring (???)
rm bfd/Makefile
make %{?_smp_mflags}
%check
export SUSE_ASNEEDED=0
cd build-dir
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
#
#
#
%else
# building cross-TARGET-binutils
echo "Building cross binutils."
@ -402,17 +294,25 @@ echo '#include "tc-%{TARGET}-nesc.h"' > gas-nesc/targ-cpu.h
make -C gas-nesc clean
make -C gas-nesc %{?_smp_mflags}
%endif
%endif
%check
unset SUSE_ASNEEDED
cd build-dir
%if 0%{?cross:1}
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
%else
make -k check CFLAGS="$RPM_OPT_FLAGS -Wno-unused -Wno-unprototyped-calls" || :
%endif
%install
cd build-dir
%if "%name" == "binutils"
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
@ -446,6 +346,9 @@ cd ..
%find_lang ld binutils.lang
%find_lang opcodes binutils.lang
%find_lang gprof binutils.lang
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
@ -453,13 +356,11 @@ install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
%if !%cross
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET}*)
for f in %buildroot/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET}-nesc-as
ln -sf ../../bin/%{TARGET}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET}/bin/nesc-as
@ -474,8 +375,8 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
%clean
rm -rf $RPM_BUILD_ROOT
%if "%name" == "binutils"
%if 0%{!?cross:1}
%post
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
@ -493,21 +394,37 @@ rm -rf $RPM_BUILD_ROOT
%files -f binutils.lang
%defattr(-,root,root)
%if "%name" == "binutils"
%if 0%{!?cross:1}
%{_docdir}/%{name}
%{_prefix}/%{HOST}/bin/*
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold
%endif
%doc %{_infodir}/*.gz
%{_libdir}/lib*-%{version}*.so
%doc %{_mandir}/man1/*.1.gz
%else
%if %cross
%dir %{_prefix}
%endif
%{_prefix}/%{TARGET}*
%{_prefix}/bin/*
%endif
%ifarch %gold_archs
%files gold -f binutils-gold.lang
%defattr(-,root,root)
%doc gold/NEWS gold/README
%{_bindir}/gold
%{_bindir}/ld.gold
%endif
%if 0%{!?cross:1}
%files devel
%defattr(-,root,root)
%{_prefix}/include/*.h
%{_libdir}/lib*.*a
%endif
%changelog

View File

@ -1,7 +1,14 @@
-------------------------------------------------------------------
Tue Feb 14 11:17:51 UTC 2012 - max@suse.com
Wed Feb 15 11:32:14 UTC 2012 - rguenther@suse.com
- Add a subpackage for avr-binutils that installs under /usr/avr.
- Drop the new spec files again, instead move the cross-$arch-binutils
contents to /usr, away from /opt.
-------------------------------------------------------------------
Tue Feb 14 17:53:08 UTC 2012 - max@suse.com
- Add spec files that build variants for arm and avr that install
under /usr rather than /opt/cross.
- Add avr-binutils-relocs.patch to fix a crash in avr-ld.
http://sourceware.org/bugzilla/show_bug.cgi?id=12161

View File

@ -1,5 +1,5 @@
#
# spec file for package binutils
# spec file for package cross-spu-binutils
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -14,8 +14,23 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define cross 1
%define TARGET spu
#
# spec file for package binutils
#
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: cross-spu-binutils
BuildRequires: bison
@ -63,8 +78,6 @@ Release: 0
%endif
%define target_list alpha armv5l armv7l armv8l hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 s390 s390x sh4 sparc sparc64 x86_64
#
%define cross 1
%define _prefix /opt/cross
#
#
Url: http://www.gnu.org/software/binutils/
@ -107,153 +120,36 @@ size, strings, and strip. These utilities are needed whenever you want
to compile a program or kernel.
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
The existing GNU linker manual is intended to be accurate
documentation for features which gold supports. gold supports
most of the features of the GNU linker for ELF targets. Notable
omissions--features of the GNU linker not currently supported in
gold--are: * MEMORY regions in linker scripts
* MRI compatible linker scripts
* linker map files (-M, -Map)
* cross-reference reports (--cref)
* linker garbage collection (--gc-sections)
* position independent executables (-pie)
* various other minor options
Authors:
--------
Ian Lance Taylor <iant@google.com>
Cary Coutant <ccoutant@google.com>
Craig Silverstein <csilvers@google.com>
Andrew Chatham
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
%if "%{name}" != "binutils"
%define TARGET %(echo %{name} | sed -e "s/\\(cross-\\)\\?\\(.*\\)-binutils/\\2/;s/-/_/g;s/parisc/hppa/;s/i.86/i586/;s/ppc/powerpc/")
%package gold
Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
%endif
%endif
%description gold
gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
Group: Development/Libraries/C and C++
Requires: binutils = %{version}-%{release}, zlib-devel
Provides: binutils:/usr/include/bfd.h
%description devel
This package includes header files and static libraries necessary to
build programs which use the GNU BFD library, which is part of
binutils.
%ifarch %arm
%define HOST %{_target_cpu}-suse-linux-gnueabi
%else
@ -292,7 +188,7 @@ sed -i -e '/BFD_VERSION_DATE/s/$/-%(echo %release | sed 's/\.[0-9]*$//')/' bfd/v
%build
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error"
%if "%{name}" == "binutils"
%if 0%{!?cross:1}
# Building native binutils
echo "Building native binutils."
%if %build_multitarget
@ -334,19 +230,15 @@ cd build-dir
../configure %common_flags \
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"} \
--enable-plugins \
%ifarch %gold_archs
--enable-gold \
%endif
--enable-shared
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
# force reconfiguring (???)
rm bfd/Makefile
make %{?_smp_mflags}
%check
export SUSE_ASNEEDED=0
cd build-dir
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
#
#
#
%else
# building cross-TARGET-binutils
echo "Building cross binutils."
@ -402,17 +294,25 @@ echo '#include "tc-%{TARGET}-nesc.h"' > gas-nesc/targ-cpu.h
make -C gas-nesc clean
make -C gas-nesc %{?_smp_mflags}
%endif
%endif
%check
unset SUSE_ASNEEDED
cd build-dir
%if 0%{?cross:1}
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
%else
make -k check CFLAGS="$RPM_OPT_FLAGS -Wno-unused -Wno-unprototyped-calls" || :
%endif
%install
cd build-dir
%if "%name" == "binutils"
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
@ -446,6 +346,9 @@ cd ..
%find_lang ld binutils.lang
%find_lang opcodes binutils.lang
%find_lang gprof binutils.lang
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
@ -453,13 +356,11 @@ install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
%if !%cross
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET}*)
for f in %buildroot/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET}-nesc-as
ln -sf ../../bin/%{TARGET}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET}/bin/nesc-as
@ -474,8 +375,8 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
%clean
rm -rf $RPM_BUILD_ROOT
%if "%name" == "binutils"
%if 0%{!?cross:1}
%post
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
@ -493,21 +394,37 @@ rm -rf $RPM_BUILD_ROOT
%files -f binutils.lang
%defattr(-,root,root)
%if "%name" == "binutils"
%if 0%{!?cross:1}
%{_docdir}/%{name}
%{_prefix}/%{HOST}/bin/*
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold
%endif
%doc %{_infodir}/*.gz
%{_libdir}/lib*-%{version}*.so
%doc %{_mandir}/man1/*.1.gz
%else
%if %cross
%dir %{_prefix}
%endif
%{_prefix}/%{TARGET}*
%{_prefix}/bin/*
%endif
%ifarch %gold_archs
%files gold -f binutils-gold.lang
%defattr(-,root,root)
%doc gold/NEWS gold/README
%{_bindir}/gold
%{_bindir}/ld.gold
%endif
%if 0%{!?cross:1}
%files devel
%defattr(-,root,root)
%{_prefix}/include/*.h
%{_libdir}/lib*.*a
%endif
%changelog

View File

@ -1,7 +1,14 @@
-------------------------------------------------------------------
Tue Feb 14 11:17:51 UTC 2012 - max@suse.com
Wed Feb 15 11:32:14 UTC 2012 - rguenther@suse.com
- Add a subpackage for avr-binutils that installs under /usr/avr.
- Drop the new spec files again, instead move the cross-$arch-binutils
contents to /usr, away from /opt.
-------------------------------------------------------------------
Tue Feb 14 17:53:08 UTC 2012 - max@suse.com
- Add spec files that build variants for arm and avr that install
under /usr rather than /opt/cross.
- Add avr-binutils-relocs.patch to fix a crash in avr-ld.
http://sourceware.org/bugzilla/show_bug.cgi?id=12161

View File

@ -1,5 +1,5 @@
#
# spec file for package binutils
# spec file for package cross-x86_64-binutils
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -14,8 +14,23 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define cross 1
%define TARGET x86_64
#
# spec file for package binutils
#
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: cross-x86_64-binutils
BuildRequires: bison
@ -63,8 +78,6 @@ Release: 0
%endif
%define target_list alpha armv5l armv7l armv8l hppa hppa64 i686 ia64 m68k mips powerpc powerpc64 s390 s390x sh4 sparc sparc64 x86_64
#
%define cross 1
%define _prefix /opt/cross
#
#
Url: http://www.gnu.org/software/binutils/
@ -107,153 +120,36 @@ size, strings, and strip. These utilities are needed whenever you want
to compile a program or kernel.
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
The existing GNU linker manual is intended to be accurate
documentation for features which gold supports. gold supports
most of the features of the GNU linker for ELF targets. Notable
omissions--features of the GNU linker not currently supported in
gold--are: * MEMORY regions in linker scripts
* MRI compatible linker scripts
* linker map files (-M, -Map)
* cross-reference reports (--cref)
* linker garbage collection (--gc-sections)
* position independent executables (-pie)
* various other minor options
Authors:
--------
Ian Lance Taylor <iant@google.com>
Cary Coutant <ccoutant@google.com>
Craig Silverstein <csilvers@google.com>
Andrew Chatham
Authors:
--------
Alan Modra <amodra@bigpond.net.au>
Andreas Jaeger <aj@suse.de>
Andreas Schwab <schwab@suse.de>
Bill Cox <bill@cygnus.com>
Brendan Kehoe <brendan@cygnus.com>
D. V. Henkel-Wallace <gumby@cygnus.com>
DJ Delorie <dj@redhat.com>
David D "Zoo" Zuhn <zoo@cygnus.com>
David J. Mackenzie <djm@cygnus.com>
Denis Chertykov <denisc@overta.ru>
Diego Novillo <dnovillo@redhat.com>
Doug Evans <dje@cygnus.com>
Eric Christopher <echristo@redhat.com>
Eric Youngdale <eric@aib.com>
Fred Fish <fnf@cygnus.com>
Geoff Keating <geoffk@redhat.com>
H.J.Lu <hjl@gnu.org>
Hans-Peter Nilsson <hp@axis.com>
Ian Dall <dall@hfrd.dsto.gov.au>
Ian Taylor <ian@zembu.com>
J.T. Conklin <jtc@cygnus.com>
Jakub Jelinek <jakub@redhat.com>
Jan Hubicka <jh@suse.cz>
Jason Eckhardt <jle@redhat.com>
Jason Merrill <jason@redhat.com>
Jeff Law <law@redhat.com>
Jeffrey Osier <jeffrey@cygnus.com>
Jeffrey Wheat <cassidy@cygnus.com>
Jim Kingdon <kingdon@cygnus.com>
Jim Wilson <wilson@redhat.com>
John Gilmore <gnu@cygnus.com>
Jörn Rennecke <amylaar@redhat.com>
K. Richard Pixley <rich@cygnus.com>
Ken Raeburn <raeburn@cygnus.com>
Kung Hsu <kung@cygnus.com>
Mark Eichin <eichin@cygnus.com>
Michael Meissner <meissner@redhat.com>
Michael Tiemann <tiemann@cygnus.com>
Mike Werner <mtw@cygnus.com>
Nick Clifton <nickc@redhat.com>
Per Bothner <bothner@cygnus.com>
Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
Richard Earnshaw <rwe@pegasus.esprit.ec.org>
Richard Henderson <rth@redhat.com>
Richard Stallman <rms@gnu.org>
Rob Savoye <rob@cygnus.com>
Roland H. Pesch <pesch@wrs.com>
Sean Eric Fagan <sef@cygnus.com>
Stan Shebs <shebs@apple.com>
Stephane Carrez <Stephane.Carrez@worldnet.fr>
Steve Chamberlain <sac@cygnus.com>
Stu Grossman <grossman@cygnus.com>
Torbjorn Granlund <tege@cygnus.com>
Ulf Carlsson <ulfc@calypso.engr.sgi.com>
%if "%{name}" != "binutils"
%define TARGET %(echo %{name} | sed -e "s/\\(cross-\\)\\?\\(.*\\)-binutils/\\2/;s/-/_/g;s/parisc/hppa/;s/i.86/i586/;s/ppc/powerpc/")
%package gold
Summary: The gold linker
License: GPL-3.0+
Group: Development/Tools/Building
Requires: binutils = %{version}-%{release}
%if 0%{suse_version} > 1100
%if 0%{!?cross:1}
%define gold_archs %ix86 %arm x86_64 ppc ppc64 %sparc
%endif
%endif
%description gold
gold is an ELF linker. It is intended to have complete support for ELF
and to run as fast as possible on modern systems. For normal use it is
a drop-in replacement for the older GNU linker.
%package devel
Summary: GNU binutils (BFD development files)
License: GPL-3.0+
Group: Development/Libraries/C and C++
Requires: binutils = %{version}-%{release}, zlib-devel
Provides: binutils:/usr/include/bfd.h
%description devel
This package includes header files and static libraries necessary to
build programs which use the GNU BFD library, which is part of
binutils.
%ifarch %arm
%define HOST %{_target_cpu}-suse-linux-gnueabi
%else
@ -292,7 +188,7 @@ sed -i -e '/BFD_VERSION_DATE/s/$/-%(echo %release | sed 's/\.[0-9]*$//')/' bfd/v
%build
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error"
%if "%{name}" == "binutils"
%if 0%{!?cross:1}
# Building native binutils
echo "Building native binutils."
%if %build_multitarget
@ -334,19 +230,15 @@ cd build-dir
../configure %common_flags \
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"} \
--enable-plugins \
%ifarch %gold_archs
--enable-gold \
%endif
--enable-shared
make %{?_smp_mflags} all-bfd TARGET-bfd=headers
# force reconfiguring (???)
rm bfd/Makefile
make %{?_smp_mflags}
%check
export SUSE_ASNEEDED=0
cd build-dir
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
#
#
#
%else
# building cross-TARGET-binutils
echo "Building cross binutils."
@ -402,17 +294,25 @@ echo '#include "tc-%{TARGET}-nesc.h"' > gas-nesc/targ-cpu.h
make -C gas-nesc clean
make -C gas-nesc %{?_smp_mflags}
%endif
%endif
%check
unset SUSE_ASNEEDED
cd build-dir
%if 0%{?cross:1}
make -k check CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" || %{make_check_handling}
%else
make -k check CFLAGS="$RPM_OPT_FLAGS -Wno-unused -Wno-unprototyped-calls" || :
%endif
%install
cd build-dir
%if "%name" == "binutils"
%if 0%{!?cross:1}
# installing native binutils
%ifarch %gold_archs
make DESTDIR=$RPM_BUILD_ROOT install-gold
ln -sf ld.gold $RPM_BUILD_ROOT%{_bindir}/gold
%endif
make DESTDIR=$RPM_BUILD_ROOT install-info install
make -C gas/doc DESTDIR=$RPM_BUILD_ROOT install-info-am install-am
make DESTDIR=$RPM_BUILD_ROOT install-bfd install-opcodes
@ -446,6 +346,9 @@ cd ..
%find_lang ld binutils.lang
%find_lang opcodes binutils.lang
%find_lang gprof binutils.lang
%ifarch %gold_archs
%find_lang gold binutils-gold.lang
%endif
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
install -m 644 binutils/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-binutils
install -m 644 gas/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-gas
@ -453,13 +356,11 @@ install -m 644 ld/NEWS $RPM_BUILD_ROOT%{_docdir}/%{name}/NEWS-ld
%else
# installing cross-TARGET-binutils and TARGET-binutils
make DESTDIR=$RPM_BUILD_ROOT install
%if !%cross
# Replace hard links by symlinks, so that rpmlint doesn't complain
T=$(basename %buildroot/usr/%{TARGET}*)
for f in %buildroot/usr/$T/bin/* ; do
ln -sf /usr/bin/$T-$(basename $f) $f
done
%endif
%if "%{TARGET}" == "avr"
install -c gas-nesc/as-new $RPM_BUILD_ROOT%{_prefix}/bin/%{TARGET}-nesc-as
ln -sf ../../bin/%{TARGET}-nesc-as $RPM_BUILD_ROOT%{_prefix}/%{TARGET}/bin/nesc-as
@ -474,8 +375,8 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/bin/*-c++filt
%clean
rm -rf $RPM_BUILD_ROOT
%if "%name" == "binutils"
%if 0%{!?cross:1}
%post
%install_info --info-dir=%{_infodir} %{_infodir}/as.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/bfd.info.gz
@ -493,21 +394,37 @@ rm -rf $RPM_BUILD_ROOT
%files -f binutils.lang
%defattr(-,root,root)
%if "%name" == "binutils"
%if 0%{!?cross:1}
%{_docdir}/%{name}
%{_prefix}/%{HOST}/bin/*
%{_prefix}/%{HOST}/lib/ldscripts
%{_libdir}/ldscripts
%{_bindir}/*
%ifarch %gold_archs
%exclude %{_bindir}/gold
%exclude %{_bindir}/ld.gold
%endif
%doc %{_infodir}/*.gz
%{_libdir}/lib*-%{version}*.so
%doc %{_mandir}/man1/*.1.gz
%else
%if %cross
%dir %{_prefix}
%endif
%{_prefix}/%{TARGET}*
%{_prefix}/bin/*
%endif
%ifarch %gold_archs
%files gold -f binutils-gold.lang
%defattr(-,root,root)
%doc gold/NEWS gold/README
%{_bindir}/gold
%{_bindir}/ld.gold
%endif
%if 0%{!?cross:1}
%files devel
%defattr(-,root,root)
%{_prefix}/include/*.h
%{_libdir}/lib*.*a
%endif
%changelog

View File

@ -1,38 +1,19 @@
#!/bin/bash
# the script takes binutils* and creates the cross-* packages
# sh4 is stuck in the testsuite, avr is packaged separately
for arch in hppa hppa64 mips arm i386 x86_64 s390 s390x ppc ppc64 ia64 sparc alpha spu; do
# sh4 is stuck in the testsuite
for arch in hppa hppa64 mips arm i386 x86_64 s390 s390x ppc ppc64 ia64 sparc alpha spu avr; do
echo -n "Building package for $arch --> cross-$arch-binutils ..."
ln -f binutils.changes cross-$arch-binutils.changes
( echo "%define cross 1"
echo "%define TARGET $arch" \
| sed -e "s/parisc/hppa/;s/i.86/i586/;s/ppc/powerpc/"
) > cross-$arch-binutils.spec
sed -e "s/^Name:.*binutils\$/Name: cross-$arch-binutils/" \
-e '/%ifarch %gold_archs/,/%endif/d' \
-e '/ \(devel\|gold\)$/,/^$/d' \
-e '/%define cross .*/{
s/.*/%define cross 1/
a %define _prefix /opt/cross
}' \
< binutils.spec > cross-$arch-binutils.spec
< binutils.spec >> cross-$arch-binutils.spec
echo " done."
done
#
# These architectures do not get a cross-* name prefix and are
# installed into the standard locations rather than /opt/cross,
# so that they can be used for normal development rather than
# just for icecream.
#
for arch in avr arm; do
echo -n "Building package for $arch --> $arch-binutils ..."
ln -f binutils.changes $arch-binutils.changes
sed -e "s/^Name:.*binutils\$/Name: $arch-binutils/" \
-e '/%ifarch %gold_archs/,/%endif/d' \
-e '/ \(devel\|gold\)$/,/^$/d' \
< binutils.spec > $arch-binutils.spec
echo " done."
done