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_f95 |
---|
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 | |
---|
43 | %if "%{gcc_version}" >= "4.4.0" |
---|
44 | %define _mpfr_minvers 2.3.2 |
---|
45 | %define mpfr_version 2.4.1 |
---|
46 | %else |
---|
47 | %if "%{gcc_version}" >= "4.3.0" |
---|
48 | %define _mpfr_minvers 2.3.1 |
---|
49 | %define mpfr_version 2.3.2 |
---|
50 | %else |
---|
51 | %if "%{gcc_version}" >= "4.2.0" |
---|
52 | %if %build_f95 |
---|
53 | %define _mpfr_minvers 2.2.1 |
---|
54 | %define mpfr_version 2.3.2 |
---|
55 | %endif |
---|
56 | %endif |
---|
57 | %endif |
---|
58 | %endif |
---|
59 | |
---|
60 | %if %{defined _mpfr_minvers} |
---|
61 | # FIXME: This is an ugly cludge |
---|
62 | %{?fc9:%global mpfr_provided 2.3.1} |
---|
63 | %{?fc10:%global mpfr_provided 2.3.2} |
---|
64 | %{?fc11:%global mpfr_provided 2.4.1} |
---|
65 | %{?suse10_3:%global mpfr_provided 2.2.1} |
---|
66 | %{?cygwin:%global mpfr_provided 2.4.1} |
---|
67 | %{?mingw32:%global mpfr_provided %{nil}} |
---|
68 | |
---|
69 | %if %{defined mpfr_provided} |
---|
70 | %if "%{mpfr_provided}" < "%{_mpfr_minvers}" |
---|
71 | %define _build_mpfr 1 |
---|
72 | %else |
---|
73 | %if "%{_build}" != "%{_host}" |
---|
74 | BuildRequires: %{_host_rpmprefix}mpfr-devel >= %{_mpfr_minvers} |
---|
75 | %else |
---|
76 | BuildRequires: mpfr-devel >= %{_mpfr_minvers} |
---|
77 | %endif |
---|
78 | %endif |
---|
79 | %else |
---|
80 | %define _build_mpfr 1 |
---|
81 | %endif |
---|
82 | |
---|
83 | %endif |
---|
84 | |
---|
85 | %if "%{_build}" != "%{_host}" |
---|
86 | BuildRequires: @rpmprefix@@tool_target@-gcc = %{gcc_rpmvers} |
---|
87 | %endif |
---|
88 | |
---|
89 | %if "%{gcc_version}" >= "4.2.0" |
---|
90 | BuildRequires: flex bison |
---|
91 | %endif |
---|
92 | |
---|
93 | %if %build_gcj |
---|
94 | # Building gcj requires bison and zlib |
---|
95 | BuildRequires: bison |
---|
96 | %endif |
---|
97 | |
---|
98 | BuildRequires: texinfo >= 4.2 |
---|
99 | BuildRequires: @rpmprefix@@tool_target@-binutils |
---|
100 | BuildRequires: @rpmprefix@@tool_target@-sys-root |
---|
101 | BuildRequires: @rpmprefix@@tool_target@-w32api-sys-root |
---|
102 | |
---|
103 | %if %build_infos |
---|
104 | Requires: @rpmprefix@gcc-common |
---|
105 | %endif |
---|
106 | Requires: @rpmprefix@@tool_target@-binutils |
---|
107 | Requires: @rpmprefix@@tool_target@-sys-root |
---|
108 | Requires: @rpmprefix@@tool_target@-w32api-sys-root |
---|
109 | %if %build_newlib |
---|
110 | Requires: @rpmprefix@@tool_target@-newlib = %{newlib_version}-@NEWLIB_RPMREL@ |
---|
111 | %endif |
---|
112 | |
---|
113 | %if %build_gcj |
---|
114 | BuildRequires: zlib-devel |
---|
115 | %endif |
---|
116 | %if %build_gnat |
---|
117 | # Building gnat requires gnat |
---|
118 | # This really isn't available until RedHat 8.0. How to conditionalize this? |
---|
119 | BuildRequires: gcc-gnat |
---|
120 | BuildRequires: @rpmprefix@@tool_target@-newlib < %{newlib_version}-@NEWLIB_RPMREL@ |
---|
121 | %endif |
---|
122 | |
---|
123 | %if "%{gcc_version}" >= "3.4" |
---|
124 | %define gcclib %{_libdir}/gcc |
---|
125 | %define gccexec %{_libexecdir}/gcc |
---|
126 | %else |
---|
127 | %define gcclib %{_libdir}/gcc-lib |
---|
128 | %define gccexec %{_libdir}/gcc-lib |
---|
129 | %endif |
---|
130 | |
---|
131 | @SOURCES@ |
---|
132 | |
---|
133 | %if "%{gcc_version}" >= "4.3.0" |
---|
134 | Source60: http://www.mpfr.org/mpfr-current/mpfr-%{mpfr_version}.tar.bz2 |
---|
135 | %endif |
---|
136 | |
---|
137 | %description |
---|
138 | Cross gcc for @tool_target@. |
---|
139 | |
---|