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 | %endif |
---|
10 | |
---|
11 | Name: @rpmprefix@@tool_target@-gcc |
---|
12 | Summary: @tool_target@ gcc |
---|
13 | |
---|
14 | Group: Development/Tools |
---|
15 | Version: %{gcc_rpmvers} |
---|
16 | Release: @GCC_RPMREL@ |
---|
17 | License: GPL |
---|
18 | URL: http://gcc.gnu.org |
---|
19 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
---|
20 | |
---|
21 | %define _use_internal_dependency_generator 0 |
---|
22 | |
---|
23 | BuildRequires: %{_host_rpmprefix}gcc |
---|
24 | |
---|
25 | %if "%{gcc_version}" >= "4.3.0" |
---|
26 | %define _gmp_minvers 4.1 |
---|
27 | %else |
---|
28 | %if "%{gcc_version}" >= "4.2.0" |
---|
29 | %if %build_fortran |
---|
30 | %define _gmp_minvers 4.1 |
---|
31 | %endif |
---|
32 | %endif |
---|
33 | %endif |
---|
34 | |
---|
35 | %if %{defined _gmp_minvers} |
---|
36 | BuildRequires: gmp-devel >= %{_gmp_minvers} |
---|
37 | %if "%{_build}" != "%{_host}" |
---|
38 | BuildRequires: %{_host_rpmprefix}gmp-devel >= %{_gmp_minvers} |
---|
39 | %endif |
---|
40 | %endif |
---|
41 | |
---|
42 | %if "%{gcc_version}" >= "4.3.3" |
---|
43 | %define _cloog_minvers 0.15 |
---|
44 | %endif |
---|
45 | |
---|
46 | %if %{defined _cloog_minvers} |
---|
47 | %{?fc11:BuildRequires: cloog-ppl-devel >= %_cloog_minvers} |
---|
48 | %{?fc12:BuildRequires: cloog-ppl-devel >= %_cloog_minvers} |
---|
49 | %{?fc13:BuildRequires: cloog-ppl-devel >= %_cloog_minvers} |
---|
50 | %{?suse11_2:BuildRequires: cloog-devel >= %_cloog_minvers, ppl-devel} |
---|
51 | %{?suse11_1:BuildRequires: cloog-devel >= %_cloog_minvers, ppl-devel} |
---|
52 | %endif |
---|
53 | |
---|
54 | %if "%{gcc_version}" >= "4.4.0" |
---|
55 | %define _mpfr_minvers 2.3.2 |
---|
56 | %define mpfr_version 2.4.1 |
---|
57 | %else |
---|
58 | %if "%{gcc_version}" >= "4.3.0" |
---|
59 | %define _mpfr_minvers 2.3.1 |
---|
60 | %define mpfr_version 2.3.2 |
---|
61 | %else |
---|
62 | %if "%{gcc_version}" >= "4.2.0" |
---|
63 | %if %build_fortran |
---|
64 | %define _mpfr_minvers 2.2.1 |
---|
65 | %define mpfr_version 2.3.2 |
---|
66 | %endif |
---|
67 | %endif |
---|
68 | %endif |
---|
69 | %endif |
---|
70 | |
---|
71 | %if %{defined _mpfr_minvers} |
---|
72 | # FIXME: This is an ugly cludge |
---|
73 | %{?fc11:%global mpfr_provided 2.4.1} |
---|
74 | %{?fc12:%global mpfr_provided 2.4.1} |
---|
75 | %{?fc13:%global mpfr_provided 2.4.1} |
---|
76 | %{?suse11_0:%global mpfr_provided 2.3.1} |
---|
77 | %{?suse11_1:%global mpfr_provided 2.3.2} |
---|
78 | %{?suse11_2:%global mpfr_provided 2.4.1} |
---|
79 | %{?cygwin:%global mpfr_provided 2.4.1} |
---|
80 | %{?mingw32:%global mpfr_provided %{nil}} |
---|
81 | |
---|
82 | %if %{defined mpfr_provided} |
---|
83 | %if "%{mpfr_provided}" < "%{_mpfr_minvers}" |
---|
84 | %define _build_mpfr 1 |
---|
85 | %else |
---|
86 | %if "%{_build}" != "%{_host}" |
---|
87 | BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{_mpfr_minvers} |
---|
88 | %else |
---|
89 | BuildRequires: mpfr-devel >= %{_mpfr_minvers} |
---|
90 | %endif |
---|
91 | %endif |
---|
92 | %else |
---|
93 | %define _build_mpfr 1 |
---|
94 | %endif |
---|
95 | |
---|
96 | %endif |
---|
97 | |
---|
98 | %if "%{_build}" != "%{_host}" |
---|
99 | BuildRequires: @rpmprefix@@tool_target@-gcc = %{gcc_rpmvers} |
---|
100 | %endif |
---|
101 | |
---|
102 | %if "%{gcc_version}" >= "4.2.0" |
---|
103 | BuildRequires: flex bison |
---|
104 | %endif |
---|
105 | |
---|
106 | %if %build_gcj |
---|
107 | # Building gcj requires bison and zlib |
---|
108 | BuildRequires: bison |
---|
109 | %endif |
---|
110 | |
---|
111 | BuildRequires: texinfo >= 4.2 |
---|
112 | BuildRequires: @rpmprefix@@tool_target@-binutils |
---|
113 | BuildRequires: @rpmprefix@@tool_target@-sys-root |
---|
114 | BuildRequires: @rpmprefix@@tool_target@-w32api-sys-root |
---|
115 | |
---|
116 | %if %build_infos |
---|
117 | Requires: @rpmprefix@gcc-common |
---|
118 | %endif |
---|
119 | Requires: @rpmprefix@@tool_target@-binutils |
---|
120 | Requires: @rpmprefix@@tool_target@-sys-root |
---|
121 | Requires: @rpmprefix@@tool_target@-w32api-sys-root |
---|
122 | Requires: @rpmprefix@@tool_target@-gcc-libgcc = %{gcc_rpmvers}-%{release} |
---|
123 | %if %build_newlib |
---|
124 | Requires: @rpmprefix@@tool_target@-newlib = %{newlib_version}-@NEWLIB_RPMREL@ |
---|
125 | %endif |
---|
126 | |
---|
127 | %if %build_gcj |
---|
128 | BuildRequires: zlib-devel |
---|
129 | %endif |
---|
130 | %if %build_gnat |
---|
131 | # Building gnat requires gnat |
---|
132 | BuildRequires: gcc-gnat |
---|
133 | BuildRequires: @rpmprefix@@tool_target@-newlib < %{newlib_version}-@NEWLIB_RPMREL@ |
---|
134 | %endif |
---|
135 | |
---|
136 | %define _gcclibdir %{_prefix}/lib |
---|
137 | |
---|
138 | @SOURCES@ |
---|
139 | |
---|
140 | %if "%{gcc_version}" >= "4.3.0" |
---|
141 | Source60: http://www.mpfr.org/mpfr-current/mpfr-%{mpfr_version}.tar.bz2 |
---|
142 | %endif |
---|
143 | |
---|
144 | %description |
---|
145 | Cross gcc for @tool_target@. |
---|
146 | |
---|