diff options
Diffstat (limited to 'contrib/crossrpms/rtems4.9/h8300/rtems-4.9-h8300-rtems4.9-gcc.spec')
-rw-r--r-- | contrib/crossrpms/rtems4.9/h8300/rtems-4.9-h8300-rtems4.9-gcc.spec | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/contrib/crossrpms/rtems4.9/h8300/rtems-4.9-h8300-rtems4.9-gcc.spec b/contrib/crossrpms/rtems4.9/h8300/rtems-4.9-h8300-rtems4.9-gcc.spec index 7b5ded92e3..af3ef3784d 100644 --- a/contrib/crossrpms/rtems4.9/h8300/rtems-4.9-h8300-rtems4.9-gcc.spec +++ b/contrib/crossrpms/rtems4.9/h8300/rtems-4.9-h8300-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 4.2.3 %define gcc_version 4.2.3 @@ -28,15 +40,21 @@ Summary: h8300-rtems4.9 gcc Group: Development/Tools Version: %{gcc_rpmvers} -Release: 10.1%{?dist} +Release: 11%{?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-h8300-rtems4.9-gcc +%endif + %if "%{gcc_version}" >= "4.2.0" BuildRequires: flex bison %endif @@ -81,7 +103,7 @@ Source1: ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-g++-%{gcc_pkgvers}.ta 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} @@ -141,8 +163,12 @@ cd .. languages="c" languages="$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} \ @@ -413,7 +439,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 @@ -468,6 +493,9 @@ Group: Development/Tools Version: %{gcc_rpmvers} License: GPL +%if "%{_build}" != "%{_host}" +BuildRequires: rtems-4.9-h8300-rtems4.9-gcc-c++ +%endif Provides: rtems-4.9-h8300-rtems4.9-c++ = %{gcc_rpmvers}-%{release} Obsoletes: rtems-4.9-h8300-rtems4.9-c++ < %{gcc_rpmvers}-%{release} |