source: rtems/contrib/crossrpms/gcc/gccnewlib.add @ 10b7254

4.115
Last change on this file since 10b7254 was 10b7254, checked in by Ralf Corsepius <ralf.corsepius@…>, on 05/11/11 at 14:38:24

Abandon suse-11.2.
More preps for fc16.

  • Property mode set to 100644
File size: 5.9 KB
Line 
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
11Name:           @rpmprefix@@tool_target@-gcc
12Summary:        @tool_target@ gcc
13
14Group:          Development/Tools
15Version:        %{gcc_rpmvers}
16Release:        @GCC_RPMREL@
17License:        GPL
18URL:            http://gcc.gnu.org
19BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
20
21%define _use_internal_dependency_generator 0
22
23BuildRequires:  %{_host_rpmprefix}gcc
24
25# FIXME: Disable lto for now, to avoid dependencies on libelf
26%bcond_with lto
27
28# FIXME: Disable python gdb scripts
29# ATM, no idea how to package them
30%bcond_with pygdb
31
32# FIXME: Disable GCC-plugin
33# Bug in gcc-4.5-20100318, doesn't build them on x86_84 hosts.
34%bcond_with plugin
35
36# EXPERIMENTAL: Use gcc's stdint.h instead of newlib's
37# Should be applicable to gcc >= 4.5.0
38%bcond_with gcc_stdint
39
40# versions of libraries, we conditionally bundle if necessary
41%global mpc_version     0.8.1
42%global mpfr_version    2.4.2
43%global gmp_version     4.3.2
44%global libelf_version  0.8.13
45
46# versions of libraries these distros are known to ship
47%if 0%{?fc16}
48%global mpc_provided 0.8.3
49%global mpfr_provided 3.0.0
50%global gmp_provided 4.3.2
51%endif
52
53%if 0%{?fc15}
54%global mpc_provided 0.8.3
55%global mpfr_provided 3.0.0
56%global gmp_provided 4.3.2
57%endif
58
59%if 0%{?fc14}
60%global mpc_provided 0.8.1
61%global mpfr_provided 2.4.2
62%global gmp_provided 4.3.1
63%endif
64
65%if 0%{?fc13}
66%global mpc_provided 0.8.1
67%global mpfr_provided 2.4.2
68%global gmp_provided 4.3.1
69%endif
70
71%if 0%{?el6}
72%global mpc_provided %{nil}
73%global mpfr_provided 2.4.1
74%global gmp_provided 4.3.1
75%endif
76
77%if 0%{?el5}
78%global mpc_provided %{nil}
79%global mpfr_provided %{nil}
80%global gmp_provided 4.1.4
81%endif
82
83%if 0%{?suse11_3}
84%global mpc_provided 0.8.1
85%global mpfr_provided 2.4.2
86%global gmp_provided 4.3.2
87%endif
88
89%if 0%{?suse11_4}
90%global mpc_provided 0.8.2
91%global mpfr_provided 3.0.0
92%global gmp_provided 5.0.1
93%endif
94
95%if 0%{?cygwin}
96%global mpc_provided 0.8
97%global mpfr_provided 2.4.1
98%global gmp_provided 4.3.1
99%endif
100
101%if 0%{?mingw32}
102%global mpc_provided 0.8.1
103%global mpfr_provided 2.4.1
104%global gmp_provided 4.3.2
105%endif
106
107%if "%{gcc_version}" >= "4.2.0"
108%if %build_fortran
109%define gmp_required            4.1
110%define mpfr_required           2.2.1
111%endif
112%endif
113
114%if "%{gcc_version}" >= "4.3.0"
115%define gmp_required            4.1
116%define mpfr_required           2.3.1
117%endif
118
119%if "%{gcc_version}" >= "4.3.3"
120%define cloog_required          0.15
121%endif
122
123%if "%{gcc_version}" >= "4.4.0"
124%define mpfr_required           2.3.2
125%endif
126
127%if "%{gcc_version}" >= "4.5.0"
128%define mpc_required            0.8
129%if %{with lto}
130%define libelf_required         0.8.12
131%endif
132%endif
133
134%if %{defined mpc_required}
135%if "%{mpc_provided}" >= "%{mpc_required}"
136%{?fedora:BuildRequires: libmpc-devel >= %{mpc_required}}
137%{?suse:BuildRequires: mpc-devel >= %{mpc_required}}
138%if "%{_build}" != "%{_host}"
139BuildRequires:  %{_host_rpmprefix}mpc-devel >= %{mpc_required}
140%endif
141%else
142%define _build_mpc 1
143%define gmp_required            4.2
144%endif
145%endif
146
147%if %{defined gmp_required}
148%if "%{gmp_provided}" >= "%{gmp_required}"
149BuildRequires: gmp-devel >= %{gmp_required}
150%if "%{_build}" != "%{_host}"
151BuildRequires:  %{_host_rpmprefix}gmp-devel >= %{gmp_required}
152%endif
153%else
154%define _build_gmp 1
155%endif
156%endif
157
158%if %{defined libelf_required}
159%if "%{libelf_provided}" >= "%{libelf_required}"
160BuildRequires: libelf-devel >= %{libelf_required}
161%if "%{_build}" != "%{_host}"
162BuildRequires:  %{_host_rpmprefix}libelf-devel >= %{libelf_required}
163%endif
164%else
165%define _build_libelf 1
166%endif
167%endif
168
169
170%if %{defined cloog_required}
171%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required}
172%{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
173%{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
174%{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
175%{?el6:BuildRequires: cloog-ppl-devel >= %cloog_required}
176%{?suse11_4:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
177%{?suse11_3:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
178%endif
179
180
181%if %{defined mpfr_required}
182%if "%{mpfr_provided}" >= "%{mpfr_required}"
183BuildRequires: mpfr-devel >= %{mpfr_required}
184%if "%{_build}" != "%{_host}"
185BuildRequires:  %{_host_rpmprefix}mpfr-devel >= %{mpfr_required}
186%endif
187%else
188%define _build_mpfr 1
189%endif
190%endif
191
192%if "%{_build}" != "%{_host}"
193BuildRequires:  @rpmprefix@@tool_target@-gcc = %{gcc_rpmvers}
194%endif
195
196%if "%{gcc_version}" >= "4.2.0"
197BuildRequires:  flex bison
198%endif
199
200%if %build_gcj
201# Building gcj requires bison and zlib
202BuildRequires:  bison
203%endif
204
205BuildRequires:  texinfo >= 4.2
206BuildRequires:  @rpmprefix@@tool_target@-binutils
207BuildRequires:  @rpmprefix@@tool_target@-sys-root
208BuildRequires:  @rpmprefix@@tool_target@-w32api-sys-root
209
210%if %build_infos
211Requires:       @rpmprefix@gcc-common
212%endif
213Requires:       @rpmprefix@@tool_target@-binutils
214Requires:       @rpmprefix@@tool_target@-sys-root
215Requires:       @rpmprefix@@tool_target@-w32api-sys-root
216Requires:       @rpmprefix@@tool_target@-gcc-libgcc = %{gcc_rpmvers}-%{release}
217%if %build_newlib
218Requires:       @rpmprefix@@tool_target@-newlib = %{newlib_version}-@NEWLIB_RPMREL@
219%endif
220
221%if "%{gcc_version}" >= "4.5.0"
222BuildRequires:  zlib-devel
223%if "%{_build}" != "%{_host}"
224BuildRequires:  %{_host_rpmprefix}zlib-devel
225%endif
226%else
227%if %build_gcj
228BuildRequires:  zlib-devel
229%endif
230%endif
231%if %build_gnat
232# Building gnat requires gnat
233BuildRequires:  gcc-gnat
234BuildRequires:  @rpmprefix@@tool_target@-newlib < %{newlib_version}-@NEWLIB_RPMREL@
235%endif
236
237%global _gcclibdir %{_prefix}/lib
238
239@SOURCES@
240
241%if 0%{?_build_mpfr}
242Source60:    http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
243%endif
244
245%if 0%{?_build_mpc}
246Source61:    http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
247%endif
248
249%if 0%{?_build_gmp}
250Source62:    ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
251%endif
252
253%if 0%{?_build_libelf}
254Source63:    http://www.mr511.de/software/libelf-%{libelf_version}.tar.gz
255%endif
256
257%description
258Cross gcc for @tool_target@.
259
Note: See TracBrowser for help on using the repository browser.