source: rtems/contrib/crossrpms/gcc/gccnewlib.add @ 37586dc6

4.115
Last change on this file since 37586dc6 was 37586dc6, checked in by Ralf Corsepius <ralf.corsepius@…>, on 11/15/11 at 16:28:47

Preps for suse-12.1

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