%define gcc_pkgvers @GCC_PKGVERS@ %define gcc_version @GCC_VERS@ %define gcc_rpmvers %{expand:%(echo "@GCC_VERS@" | tr - _ )} %if %build_newlib %define newlib_pkgvers @NEWLIB_PKGVERS@ %define newlib_version @NEWLIB_VERS@ %endif Name: @rpmprefix@@tool_target@-gcc Summary: @tool_target@ gcc Group: Development/Tools Version: %{gcc_rpmvers} Release: @GCC_RPMREL@ 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 # versions of libraries, we conditionally bundle if necessary %global mpc_version 0.8.1 %global mpfr_version 2.4.2 %global gmp_version 4.3.2 %global libelf_version 0.8.13 # versions of libraries these distros are known to ship %if 0%{?fc16} %global mpc_provided 0.8.3 %global mpfr_provided 3.0.0 %global gmp_provided 4.3.2 %endif %if 0%{?fc15} %global mpc_provided 0.8.3 %global mpfr_provided 3.0.0 %global gmp_provided 4.3.2 %endif %if 0%{?fc14} %global mpc_provided 0.8.1 %global mpfr_provided 2.4.2 %global gmp_provided 4.3.1 %endif %if 0%{?el6} %global mpc_provided %{nil} %global mpfr_provided 2.4.1 %global gmp_provided 4.3.1 %endif %if 0%{?el5} %global mpc_provided %{nil} %global mpfr_provided %{nil} %global gmp_provided 4.1.4 %endif %if 0%{?suse11_3} %global mpc_provided 0.8.1 %global mpfr_provided 2.4.2 %global gmp_provided 4.3.2 %endif %if 0%{?suse11_4} %global mpc_provided 0.8.2 %global mpfr_provided 3.0.0 %global gmp_provided 5.0.1 %endif %if 0%{?cygwin} %global mpc_provided 0.8 %global mpfr_provided 2.4.1 %global gmp_provided 4.3.1 %endif %if 0%{?mingw32} %global mpc_provided 0.8.1 %global mpfr_provided 2.4.1 %global gmp_provided 4.3.2 %endif %if "%{gcc_version}" >= "4.2.0" %if %build_fortran %define gmp_required 4.1 %define mpfr_required 2.2.1 %endif %endif %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 %{defined cloog_required} %{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?el6:BuildRequires: cloog-ppl-devel >= %cloog_required} %{?suse11_4:BuildRequires: cloog-devel >= %cloog_required, ppl-devel} %{?suse11_3:BuildRequires: cloog-devel >= %cloog_required, ppl-devel} %if "%{?suse}" > "10.3" BuildRequires: mpfr-devel >= 2.3.0 %endif # These distros ship an insufficient mpfr %{?el4:%define _build_mpfr 1} %{?suse10_3:%define _build_mpfr 1} %endif %if "%{_build}" != "%{_host}" BuildRequires: @rpmprefix@@tool_target@-gcc = %{gcc_rpmvers} %endif %if "%{gcc_version}" >= "4.2.0" BuildRequires: flex bison %if %build_fortran BuildRequires: gmp-devel >= 4.1 %if 0%{?fedora} >= 8 BuildRequires: mpfr-devel >= 2.2.1 %endif %endif %endif %if %build_gcj # Building gcj requires bison and zlib BuildRequires: bison %endif BuildRequires: texinfo >= 4.2 BuildRequires: @rpmprefix@@tool_target@-binutils BuildRequires: @rpmprefix@@tool_target@-sys-root BuildRequires: @rpmprefix@@tool_target@-w32api-sys-root %if %build_infos Requires: @rpmprefix@gcc-common %endif Requires: @rpmprefix@@tool_target@-binutils Requires: @rpmprefix@@tool_target@-sys-root Requires: @rpmprefix@@tool_target@-w32api-sys-root %if %build_newlib Requires: @rpmprefix@@tool_target@-newlib = %{newlib_version}-@NEWLIB_RPMREL@ %endif %if %build_gcj BuildRequires: zlib-devel %endif %if %build_gnat # Building gnat requires gnat BuildRequires: gcc-gnat BuildRequires: @rpmprefix@@tool_target@-newlib < %{newlib_version}-@NEWLIB_RPMREL@ %endif %global _gcclibdir %{_prefix}/lib @SOURCES@ %if "%{gcc_version}" >= "4.3.0" Source60: http://www.mpfr.org/mpfr-current/mpfr-%{mpfr_version}.tar.bz2 %endif %description Cross gcc for @tool_target@.