source: rtems/contrib/crossrpms/gcc/gccnewlib.add @ 6ace38b

4.115
Last change on this file since 6ace38b was 34e2e13e, checked in by Ralf Corsepius <ralf.corsepius@…>, on 08/26/11 at 05:26:31

Always BR: bison flex.

  • Property mode set to 100644
File size: 5.8 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# EXPERIMENTAL: Enable newlib's iconv
41%bcond_without iconv
42
43# versions of libraries, we conditionally bundle if necessary
44%global mpc_version     0.8.1
45%global mpfr_version    2.4.2
46%global gmp_version     4.3.2
47%global libelf_version  0.8.13
48
49# versions of libraries these distros are known to ship
50%if 0%{?fc16}
51%global mpc_provided 0.8.3
52%global mpfr_provided 3.0.0
53%global gmp_provided 4.3.2
54%endif
55
56%if 0%{?fc15}
57%global mpc_provided 0.8.3
58%global mpfr_provided 3.0.0
59%global gmp_provided 4.3.2
60%endif
61
62%if 0%{?fc14}
63%global mpc_provided 0.8.1
64%global mpfr_provided 2.4.2
65%global gmp_provided 4.3.1
66%endif
67
68%if 0%{?el6}
69%global mpc_provided %{nil}
70%global mpfr_provided 2.4.1
71%global gmp_provided 4.3.1
72%endif
73
74%if 0%{?el5}
75%global mpc_provided %{nil}
76%global mpfr_provided %{nil}
77%global gmp_provided 4.1.4
78%endif
79
80%if 0%{?suse11_3}
81%global mpc_provided 0.8.1
82%global mpfr_provided 2.4.2
83%global gmp_provided 4.3.2
84%endif
85
86%if 0%{?suse11_4}
87%global mpc_provided 0.8.2
88%global mpfr_provided 3.0.0
89%global gmp_provided 5.0.1
90%endif
91
92%if 0%{?cygwin}
93%global mpc_provided 0.8
94%global mpfr_provided 2.4.1
95%global gmp_provided 4.3.1
96%endif
97
98%if 0%{?mingw32}
99%global mpc_provided 0.8.1
100%global mpfr_provided 2.4.1
101%global gmp_provided 4.3.2
102%endif
103
104%if "%{gcc_version}" >= "4.2.0"
105%if %build_fortran
106%define gmp_required            4.1
107%define mpfr_required           2.2.1
108%endif
109%endif
110
111%if "%{gcc_version}" >= "4.3.0"
112%define gmp_required            4.1
113%define mpfr_required           2.3.1
114%endif
115
116%if "%{gcc_version}" >= "4.3.3"
117%define cloog_required          0.15
118%endif
119
120%if "%{gcc_version}" >= "4.4.0"
121%define mpfr_required           2.3.2
122%endif
123
124%if "%{gcc_version}" >= "4.5.0"
125%define mpc_required            0.8
126%if %{with lto}
127%define libelf_required         0.8.12
128%endif
129%endif
130
131%if %{defined mpc_required}
132%if "%{mpc_provided}" >= "%{mpc_required}"
133%{?fedora:BuildRequires: libmpc-devel >= %{mpc_required}}
134%{?suse:BuildRequires: mpc-devel >= %{mpc_required}}
135%if "%{_build}" != "%{_host}"
136BuildRequires:  %{_host_rpmprefix}mpc-devel >= %{mpc_required}
137%endif
138%else
139%define _build_mpc 1
140%define gmp_required            4.2
141%endif
142%endif
143
144%if %{defined gmp_required}
145%if "%{gmp_provided}" >= "%{gmp_required}"
146BuildRequires: gmp-devel >= %{gmp_required}
147%if "%{_build}" != "%{_host}"
148BuildRequires:  %{_host_rpmprefix}gmp-devel >= %{gmp_required}
149%endif
150%else
151%define _build_gmp 1
152%endif
153%endif
154
155%if %{defined libelf_required}
156%if "%{libelf_provided}" >= "%{libelf_required}"
157BuildRequires: libelf-devel >= %{libelf_required}
158%if "%{_build}" != "%{_host}"
159BuildRequires:  %{_host_rpmprefix}libelf-devel >= %{libelf_required}
160%endif
161%else
162%define _build_libelf 1
163%endif
164%endif
165
166
167%if %{defined cloog_required}
168%{?fc14:BuildRequires: cloog-ppl-devel >= %cloog_required}
169%{?fc15:BuildRequires: cloog-ppl-devel >= %cloog_required}
170%{?fc16:BuildRequires: cloog-ppl-devel >= %cloog_required}
171%{?el6:BuildRequires: cloog-ppl-devel >= %cloog_required}
172%{?suse11_4:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
173%{?suse11_3:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
174%endif
175
176
177%if %{defined mpfr_required}
178%if "%{mpfr_provided}" >= "%{mpfr_required}"
179BuildRequires: mpfr-devel >= %{mpfr_required}
180%if "%{_build}" != "%{_host}"
181BuildRequires:  %{_host_rpmprefix}mpfr-devel >= %{mpfr_required}
182%endif
183%else
184%define _build_mpfr 1
185%endif
186%endif
187
188%if "%{_build}" != "%{_host}"
189BuildRequires:  @rpmprefix@@tool_target@-gcc = %{gcc_rpmvers}
190%endif
191
192# Not strictly required, but patches may introduce a need to use them.
193# For reasons of simplicity, always require them.
194BuildRequires:  flex bison
195
196BuildRequires:  texinfo >= 4.2
197BuildRequires:  @rpmprefix@@tool_target@-binutils
198BuildRequires:  @rpmprefix@@tool_target@-sys-root
199BuildRequires:  @rpmprefix@@tool_target@-w32api-sys-root
200
201%if %build_infos
202Requires:       @rpmprefix@gcc-common
203%endif
204Requires:       @rpmprefix@@tool_target@-binutils
205Requires:       @rpmprefix@@tool_target@-sys-root
206Requires:       @rpmprefix@@tool_target@-w32api-sys-root
207Requires:       @rpmprefix@@tool_target@-gcc-libgcc = %{gcc_rpmvers}-%{release}
208%if %build_newlib
209Requires:       @rpmprefix@@tool_target@-newlib = %{newlib_version}-@NEWLIB_RPMREL@
210%endif
211
212%if "%{gcc_version}" >= "4.5.0"
213BuildRequires:  zlib-devel
214%if "%{_build}" != "%{_host}"
215BuildRequires:  %{_host_rpmprefix}zlib-devel
216%endif
217%else
218%if %build_gcj
219BuildRequires:  zlib-devel
220%endif
221%endif
222%if %build_gnat
223# Building gnat requires gnat
224BuildRequires:  gcc-gnat
225BuildRequires:  @rpmprefix@@tool_target@-newlib < %{newlib_version}-@NEWLIB_RPMREL@
226%endif
227
228%global _gcclibdir %{_prefix}/lib
229
230@SOURCES@
231
232%if 0%{?_build_mpfr}
233Source60:    http://www.mpfr.org/mpfr-%{mpfr_version}/mpfr-%{mpfr_version}.tar.bz2
234%endif
235
236%if 0%{?_build_mpc}
237Source61:    http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
238%endif
239
240%if 0%{?_build_gmp}
241Source62:    ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
242%endif
243
244%if 0%{?_build_libelf}
245Source63:    http://www.mr511.de/software/libelf-%{libelf_version}.tar.gz
246%endif
247
248%description
249Cross gcc for @tool_target@.
250
Note: See TracBrowser for help on using the repository browser.