%define target m6812-elf Name: %{target}-binutils Version: 2.15 Release: 1%{?dist} Summary: Cross Compiling GNU binutils targeted at %{target} Group: Development/Tools License: GPLv2+ URL: http://www.gnu.org/software/binutils/ Source0: ftp://ftp.gnu.org/pub/gnu/binutils/binutils-%{version}.tar.bz2 Source1: README.fedora # From upstream to make cross compile for hc12 Patch0: binutils-2.15-m68hc1x-20040801.patch # Fixes array issue building with gcc 4 Patch1: binutils-array.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n) BuildRequires: gawk texinfo flex %description This is a Cross Compiling version of GNU binutils, which can be used to assemble and link binaries for the %{target} platform, instead of for the native %{_arch} platform. %prep %setup -q -c pushd binutils-%{version} %patch0 -p1 %patch1 -p1 popd cp %{SOURCE1} . %build mkdir -p build pushd build CFLAGS="$RPM_OPT_FLAGS" ../binutils-%{version}/configure --prefix=%{_prefix} \ --libdir=%{_libdir} --mandir=%{_mandir} --infodir=%{_infodir} \ --target=%{target} --disable-werror --disable-nls make %{?_smp_mflags} popd build %install rm -rf $RPM_BUILD_ROOT pushd build make install DESTDIR=$RPM_BUILD_ROOT popd build # these are for win targets only rm $RPM_BUILD_ROOT%{_mandir}/man1/%{target}-{dlltool,nlmconv,windres}.1 # we don't want these as we are a cross version rm -r $RPM_BUILD_ROOT%{_infodir} rm $RPM_BUILD_ROOT%{_libdir}/libiberty.a %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc binutils-%{version}/COPYING binutils-%{version}/COPYING.LIB %doc binutils-%{version}/README README.fedora %{_prefix}/%{target} %{_bindir}/%{target}-* %{_mandir}/man1/%{target}-*.1.gz %changelog * Wed Dec 10 2008 Brennan Ashton - 2.15-1 - Initial Build