diff options
Diffstat (limited to 'contrib/crossrpms/rtems4.9/tic4x/rtems-4.9-tic4x-rtems4.9-gcc.spec')
-rw-r--r-- | contrib/crossrpms/rtems4.9/tic4x/rtems-4.9-tic4x-rtems4.9-gcc.spec | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/contrib/crossrpms/rtems4.9/tic4x/rtems-4.9-tic4x-rtems4.9-gcc.spec b/contrib/crossrpms/rtems4.9/tic4x/rtems-4.9-tic4x-rtems4.9-gcc.spec index 2a9d2ba980..3922c5c7b7 100644 --- a/contrib/crossrpms/rtems4.9/tic4x/rtems-4.9-tic4x-rtems4.9-gcc.spec +++ b/contrib/crossrpms/rtems4.9/tic4x/rtems-4.9-tic4x-rtems4.9-gcc.spec @@ -13,6 +13,18 @@ %define _exeext %{nil} %endif +%ifos cygwin cygwin32 +%define optflags -O3 -pipe -march=i486 -funroll-loops +%define _libdir %{_exec_prefix}/lib +%define debug_package %{nil} +%endif + +%if "%{_build}" != "%{_host}" +%define _host_rpmprefix rtems-4.9-%{_host}- +%else +%define _host_rpmprefix %{nil} +%endif + %define gcc_pkgvers 3.4.6 %define gcc_version 3.4.6 @@ -28,15 +40,21 @@ Summary: tic4x-rtems4.9 gcc Group: Development/Tools Version: %{gcc_rpmvers} -Release: 7%{?dist} +Release: 8%{?dist} License: GPL URL: http://gcc.gnu.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %define _use_internal_dependency_generator 0 +BuildRequires: %{_host_rpmprefix}gcc + %if "%{gcc_version}" >= "4.3.0" BuildRequires: gmp-devel >= 4.1 +%if "%{_build}" != "%{_host}" +BuildRequires: %{_host_rpmprefix}gmp-devel +BuildRequires: %{_host_rpmprefix}mpfr-devel +%endif %if "%{?fedora}" >= "8" BuildRequires: mpfr-devel >= 2.3.0 %endif @@ -49,6 +67,10 @@ BuildRequires: mpfr-devel >= 2.3.0 %{?suse10_3:%define _build_mpfr 1} %endif +%if "%{_build}" != "%{_host}" +BuildRequires: rtems-4.9-tic4x-rtems4.9-gcc +%endif + %if "%{gcc_version}" >= "4.2.0" BuildRequires: flex bison %endif @@ -82,7 +104,7 @@ Patch0: gcc-core-4.2.3-rtems4.9-20080205.diff Source50: ftp://sources.redhat.com/pub/newlib/newlib-%{newlib_version}.tar.gz %if "%{newlib_version}" == "1.16.0" -Patch50: newlib-1.16.0-rtems4.9-20080302.diff +Patch50: newlib-1.16.0-rtems4.9-20080430.diff %endif %{?_without_sources:NoSource: 50} @@ -139,8 +161,12 @@ cd .. languages="c" export PATH="%{_bindir}:${PATH}" - +%if "%{_build}" != "%{_host}" + CFLAGS_FOR_BUILD="-g -O2 -Wall" \ + CC="%{_host}-gcc ${RPM_OPT_FLAGS}" \ +%else CC="%{__cc} ${RPM_OPT_FLAGS}" \ +%endif ../gcc-%{gcc_pkgvers}/configure \ --prefix=%{_prefix} \ --bindir=%{_bindir} \ @@ -411,7 +437,6 @@ Requires(post): /sbin/install-info Requires(preun): /sbin/install-info %description -n rtems-4.9-gcc-common - GCC files that are shared by all targets. %files -n rtems-4.9-gcc-common |