File cross-template-gcc.spec.in of Package cross-mips-linux-gcc
Summary: GNU compiler suite to build programs for @@template@@
Name: cross-@@template@@-gcc
Version: 4.5.3
Release: 0
License: GPLv2
Group: Development/Cross
URL: http://ftp.gnu.org/gnu/gcc
BuildRequires: cross-@@template@@-binutils cross-@@template@@-kernel-headers cross-@@template@@-glibc-bootstrap mpfr-devel gmp-devel mpc-devel
Source0: http://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-%{version}.tar.bz2
# Re-generate this specfile using
# sed -e 's,@template@,@@template@@,g'
Source1: cross-template-gcc.spec.in
Source2: regen.sh
Patch1: compile-fixes
Patch2: fix-includes-fixed
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
AutoReqProv: off
Requires: cross-@@template@@-binutils
%description
GNU compiler suite to build programs for @@template@@ .
Architectures supported so far include:
arm-linux-gnueabi ppc-linux-gnueabi mips-linux
%prep
%setup -q -n gcc-%{version}
%patch1 -p1
%patch2 -p1
mkdir obj
%build
cd obj
case @@template@@ in
arm-*)
conf_add="--with-cpu=arm7tdmi --with-float=soft "
;;
ppc-*)
conf_add=" --with-cpu=823 --with-float=soft --enable-secureplt "
;;
esac
../configure --prefix=/opt/cross --enable-bootstrap=no --build=`arch`-suse-linux --target=@@template@@ --enable-languages=c,c++ --with-float=soft --disable-libmudflap --disable-multilib $conf_add
make
%install
make -C obj DESTDIR=$RPM_BUILD_ROOT install
rm -rf $RPM_BUILD_ROOT/opt/cross/info $RPM_BUILD_ROOT/opt/cross/lib*/libiberty.a
rm -rf $RPM_BUILD_ROOT/opt/cross/man $RPM_BUILD_ROOT/opt/cross/share/locale
rm -rf $RPM_BUILD_ROOT/opt/cross/share/info/dir
%clean
rm -rf $RPM_BUILD_ROOT
# Silence the totally braindead rpmlint. At least partially.
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%files
%defattr(-,root,root,-)
/opt/cross
%changelog
* Mon Apr 20 2009 Torsten Duwe <duwe@suse.de> - kernel-headers
- Initial build.