1 | |
---|
2 | %define gcc_pkgvers @GCC_PKGVERS@ |
---|
3 | %define gcc_version @GCC_VERS@ |
---|
4 | %define gcc_rpmvers %{expand:%(echo "@GCC_VERS@" | tr - _ )} |
---|
5 | |
---|
6 | %if %build_newlib |
---|
7 | %define newlib_pkgvers @NEWLIB_PKGVERS@ |
---|
8 | %define newlib_version @NEWLIB_VERS@ |
---|
9 | %define newlib_release @NEWLIB_RPMREL@ |
---|
10 | %endif |
---|
11 | |
---|
12 | %define mpfr_version 2.3.1 |
---|
13 | |
---|
14 | Name: @rpmprefix@@tool_target@-gcc |
---|
15 | Summary: @tool_target@ gcc |
---|
16 | |
---|
17 | Group: Development/Tools |
---|
18 | Version: %{gcc_rpmvers} |
---|
19 | Release: @GCC_RPMREL@ |
---|
20 | License: GPL |
---|
21 | URL: http://gcc.gnu.org |
---|
22 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
---|
23 | |
---|
24 | %define _use_internal_dependency_generator 0 |
---|
25 | |
---|
26 | BuildRequires: %{_host_rpmprefix}gcc |
---|
27 | |
---|
28 | %if "%{gcc_version}" >= "4.3.0" |
---|
29 | BuildRequires: gmp-devel >= 4.1 |
---|
30 | %if "%{_build}" != "%{_host}" |
---|
31 | BuildRequires: %{_host_rpmprefix}gmp-devel |
---|
32 | BuildRequires: %{_host_rpmprefix}mpfr-devel |
---|
33 | %endif |
---|
34 | %if 0%{?fedora} >= 8 |
---|
35 | BuildRequires: mpfr-devel >= 2.3.0 |
---|
36 | %endif |
---|
37 | %if "%{?suse}" > "10.3" |
---|
38 | BuildRequires: mpfr-devel >= 2.3.0 |
---|
39 | %endif |
---|
40 | # These distros ship an insufficient mpfr |
---|
41 | %{?el4:%define _build_mpfr 1} |
---|
42 | %{?suse10_3:%define _build_mpfr 1} |
---|
43 | %endif |
---|
44 | |
---|
45 | %if "%{_build}" != "%{_host}" |
---|
46 | BuildRequires: @rpmprefix@@tool_target@-gcc |
---|
47 | %endif |
---|
48 | |
---|
49 | %if "%{gcc_version}" >= "4.2.0" |
---|
50 | BuildRequires: flex bison |
---|
51 | %if %build_f95 |
---|
52 | BuildRequires: gmp-devel >= 4.1 |
---|
53 | %if 0%{?fedora} >= 8 |
---|
54 | BuildRequires: mpfr-devel >= 2.2.1 |
---|
55 | %endif |
---|
56 | %endif |
---|
57 | %endif |
---|
58 | |
---|
59 | %if %build_gcj |
---|
60 | # Building gcj requires bison and zlib |
---|
61 | BuildRequires: bison |
---|
62 | %endif |
---|
63 | |
---|
64 | BuildRequires: texinfo >= 4.2 |
---|
65 | BuildRequires: @rpmprefix@@tool_target@-binutils |
---|
66 | BuildRequires: @rpmprefix@@tool_target@-sys-root |
---|
67 | BuildRequires: @rpmprefix@@tool_target@-w32api-sys-root |
---|
68 | |
---|
69 | %if %build_infos |
---|
70 | Requires: @rpmprefix@gcc-common |
---|
71 | %endif |
---|
72 | Requires: @rpmprefix@@tool_target@-binutils |
---|
73 | Requires: @rpmprefix@@tool_target@-sys-root |
---|
74 | Requires: @rpmprefix@@tool_target@-w32api-sys-root |
---|
75 | %if %build_newlib |
---|
76 | Requires: @rpmprefix@@tool_target@-newlib = %{newlib_version}-%{newlib_release} |
---|
77 | %endif |
---|
78 | |
---|
79 | %if %build_gcj |
---|
80 | BuildRequires: zlib-devel |
---|
81 | %endif |
---|
82 | %if %build_gnat |
---|
83 | # Building gnat requires gnat |
---|
84 | # This really isn't available until RedHat 8.0. How to conditionalize this? |
---|
85 | BuildRequires: gcc-gnat |
---|
86 | BuildRequires: @rpmprefix@@tool_target@-newlib < %{newlib_version}-%{newlib_release} |
---|
87 | %endif |
---|
88 | %if %build_f95 |
---|
89 | BuildRequires: gmp-devel |
---|
90 | %endif |
---|
91 | |
---|
92 | %if "%{gcc_version}" >= "3.4" |
---|
93 | %define gcclib %{_libdir}/gcc |
---|
94 | %define gccexec %{_libexecdir}/gcc |
---|
95 | %else |
---|
96 | %define gcclib %{_libdir}/gcc-lib |
---|
97 | %define gccexec %{_libdir}/gcc-lib |
---|
98 | %endif |
---|
99 | |
---|
100 | @SOURCES@ |
---|
101 | |
---|
102 | %if "%{gcc_version}" >= "4.3.0" |
---|
103 | Source60: http://www.mpfr.org/mpfr-current/mpfr-%{mpfr_version}.tar.bz2 |
---|
104 | %endif |
---|
105 | |
---|
106 | %description |
---|
107 | Cross gcc for @tool_target@. |
---|
108 | |
---|