%define target msp430 Name: %{target}-gcc Version: 3.2.3 # There has been no release, so this is a snapshot Release: 4.20100805cvs%{?dist} Summary: Cross Compiling GNU GCC targeted at %{target} Group: Development/Languages License: GPLv2+ URL: http://mspgcc.sf.net/ Source0: ftp://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-core-%{version}.tar.bz2 # Pulled from the mspgcc CVS. Regenerate with: # cvs -z3 -d:pserver:anonymous@mspgcc.cvs.sourceforge.net:/cvsroot/mspgcc login # empty password (press enter) # cvs -z3 -d:pserver:anonymous@mspgcc.cvs.sourceforge.net:/cvsroot/mspgcc co -D 2009-02-10 -P gcc/gcc-3.3 # tar -cjf mspgcc-gcc-3.3-20100805.tar.bz2 gcc Source1: mspgcc-gcc-3.3-20100805.tar.bz2 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: %{target}-binutils Requires: %{target}-binutils # Build fails for ppc64 -- bug number to appear on this line after review # (as documented in https://fedoraproject.org/wiki/Packaging:Guidelines#Architecture_Build_Failures) ExcludeArch: ppc64 %description This is a cross compiling version of GNU GCC, which can be used to compile for the %{target} platform, instead of for the native %{_arch} platform. %prep %setup -q -T -c %setup -q -T -D -a0 %setup -q -T -D -a1 cp -af gcc/gcc-3.3/* gcc-%{version}/ # Extract %%__os_install_post into os_install_post~ cat << \EOF > os_install_post~ %__os_install_post EOF # Generate customized brp-*scripts cat os_install_post~ | while read a x y; do case $a in # Prevent brp-strip* from trying to handle foreign binaries */brp-strip*) b=$(basename $a) sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b chmod a+x $b ;; esac done sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \ < os_install_post~ > os_install_post %build cd gcc-%{version} CC="%{__cc} ${RPM_OPT_FLAGS}" ./configure --prefix=%{_prefix} --mandir=%{_mandir} \ --infodir=%{_infodir} --target=%{target} --disable-nls \ --libdir=%{_libdir} --enable-version-specific-runtime-libs # Building GCC-3.2.3 is not smp-safe make %install rm -rf $RPM_BUILD_ROOT make -C gcc-%{version} install DESTDIR=$RPM_BUILD_ROOT # we don't want these as we are a cross version rm -rf $RPM_BUILD_ROOT%{_infodir} mv $RPM_BUILD_ROOT%{_mandir}/man1/cpp.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{target}-cpp.1 mv $RPM_BUILD_ROOT%{_mandir}/man1/gcov.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{target}-gcov.1 rm -rf $RPM_BUILD_ROOT%{_mandir}/man7 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a %define __os_install_post . ./os_install_post %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %dir %{_libdir}/gcc-lib %dir %{_libdir}/gcc-lib/%{target}/ %dir %{_libdir}/gcc-lib/%{target}/%{version}/ %{_bindir}/%{target}-* %{_libdir}/gcc-lib/%{target}/%{version}/* %{_mandir}/man1/%{target}-*.1.gz %changelog * Thu Aug 5 2010 Rob Spanton <rspanton@zepler.net> 3.2.3-4.20100805cvs - Fix the release number to make version comparison work! * Thu Aug 5 2010 Rob Spanton <rspanton@zepler.net> 3.2.3-1.20100805cvs - Bump up to latest CVS (adds support for a few more MSPs) * Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.3-3.20090210cvs - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Sat Feb 21 2009 Rob Spanton <rspanton@zepler.net> 3.2.3-2.20090210cvs - Use setup macro to do cleaner decompressing. - Own libdir/gcc-lib dirs. - Rename man files rather than delete them. * Tue Feb 10 2009 Rob Spanton <rspanton@zepler.net> 3.2.3-1.20090210cvs - Initial release