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