]>
Commit | Line | Data |
---|---|---|
a3bdc2a1 | 1 | # |
2 | # Conditional build: | |
6ccf21dc JB |
3 | %bcond_with bootstrap # bootstrap build (using binary w32api/mingwrt, no gomp) |
4 | %bcond_without gomp # OpenMP libraries | |
a3bdc2a1 | 5 | # |
6ccf21dc JB |
6 | %if %{with bootstrap} |
7 | %undefine with_gomp | |
8 | %endif | |
8c4c66e6 JB |
9 | Summary: Cross MinGW32 GNU binary utility development utilities - gcc |
10 | Summary(es.UTF-8): Utilitarios para desarrollo de binarios de la GNU - MinGW32 gcc | |
11 | Summary(fr.UTF-8): Utilitaires de développement binaire de GNU - MinGW32 gcc | |
12 | Summary(pl.UTF-8): Skrośne narzędzia programistyczne GNU dla MinGW32 - gcc | |
13 | Summary(pt_BR.UTF-8): Utilitários para desenvolvimento de binários da GNU - MinGW32 gcc | |
14 | Summary(tr.UTF-8): GNU geliştirme araçları - MinGW32 gcc | |
b336056d | 15 | Name: crossmingw32-gcc |
6ccf21dc | 16 | Version: 4.9.3 |
c07647a9 | 17 | Release: 2 |
d3f237e2 | 18 | Epoch: 1 |
acb9fe67 | 19 | License: GPL v3+ |
d3f237e2 | 20 | Group: Development/Languages |
26277b32 | 21 | Source0: https://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-%{version}.tar.bz2 |
6ccf21dc | 22 | # Source0-md5: 6f831b4d251872736e8e9cc09746f327 |
ba1fe36b JB |
23 | %define mingw32_ver 4.0.3 |
24 | Source1: http://downloads.sourceforge.net/mingw/mingwrt-%{mingw32_ver}-1-mingw32-dev.tar.lzma | |
25 | # Source1-md5: c2c9aa82e0cb47abac01760525684858 | |
6ccf21dc JB |
26 | Source2: gcc-optimize-la.pl |
27 | # svn diff -x --ignore-eol-style --force svn://gcc.gnu.org/svn/gcc/tags/gcc_4_9_3_release svn://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch > gcc-branch.diff | |
83afd976 | 28 | Patch100: gcc-branch.diff |
6ccf21dc | 29 | # Patch100-md5: 253cbf4cc2f71d9c9362f4a3be25bb17 |
83afd976 ŁK |
30 | Patch0: %{name}-buildsystem1.patch |
31 | Patch1: %{name}-buildsystem2.patch | |
32 | Patch2: %{name}-lfs.patch | |
6ccf21dc JB |
33 | Patch12: gcc-isl0.15-1.patch |
34 | Patch13: gcc-isl0.15-2.patch | |
35 | URL: http://gcc.gnu.org/ | |
669fa8b1 JB |
36 | BuildRequires: autoconf >= 2.64 |
37 | BuildRequires: automake >= 1:1.9.3 | |
d12aabe0 | 38 | BuildRequires: bison |
43a95438 | 39 | BuildRequires: crossmingw32-binutils >= 2.15.91.0.2-2 |
6ccf21dc JB |
40 | %{?with_gomp:BuildRequires: crossmingw32-pthreads-w32} |
41 | %if %{without bootstrap} | |
42 | BuildRequires: crossmingw32-runtime >= 3.5 | |
43 | BuildRequires: crossmingw32-w32api >= 3.1 | |
44 | %endif | |
26277b32 JB |
45 | BuildRequires: cloog-isl-devel >= 0.17.0 |
46 | BuildRequires: cloog-isl-devel < 0.19 | |
b336056d | 47 | BuildRequires: flex |
26277b32 JB |
48 | BuildRequires: gmp-devel >= 4.1 |
49 | BuildRequires: isl-devel >= 0.13 | |
83afd976 | 50 | BuildRequires: libmpc-devel |
f24c8266 | 51 | BuildRequires: mpfr-devel |
207a380a | 52 | BuildRequires: perl-tools-pod |
d81c803d | 53 | BuildRequires: texinfo >= 4.2 |
73ff33c1 JB |
54 | %if %{with booststrap} |
55 | BuildRequires: tar >= 1:1.22 | |
56 | BuildRequires: xz | |
57 | %endif | |
43a95438 | 58 | Requires: crossmingw32-binutils >= 2.15.91.0.2-2 |
6ab368b0 | 59 | Requires: gcc-dirs |
b336056d JB |
60 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
61 | ||
d3f237e2 | 62 | %define target i386-mingw32 |
8f1d5c0c JB |
63 | %define sysprefix /usr |
64 | %define arch %{sysprefix}/%{target} | |
73ff33c1 JB |
65 | %define gccarchdir %{_libdir}/gcc/%{target} |
66 | %define gcclibdir %{gccarchdir}/%{version} | |
67 | %define _dlldir /usr/share/wine/windows/system | |
dee9b92f | 68 | |
5b936a1d | 69 | %define _noautostrip .*/lib.*\\.a |
b336056d | 70 | |
66f480ce JP |
71 | %define _enable_debug_packages 0 |
72 | ||
45ff11c2 JR |
73 | # functions with printf format attribute but with special parser and also |
74 | # receiving non constant format strings | |
75 | %define Werror_cflags %{nil} | |
42fa9439 | 76 | %define _ssp_cflags %{nil} |
c07647a9 JB |
77 | # -fPIC is not valid for target platform |
78 | %define filterout_c -fPIC | |
42fa9439 | 79 | |
b336056d JB |
80 | %description |
81 | crossmingw32 is a complete cross-compiling development system for | |
82 | building stand-alone Microsoft Windows applications under Linux using | |
8c4c66e6 | 83 | the MinGW32 build libraries. This includes a binutils, gcc with g++ |
b336056d JB |
84 | and objc, and libstdc++, all cross targeted to i386-mingw32, along |
85 | with supporting Win32 libraries in 'coff' format from free sources. | |
86 | ||
d3f237e2 | 87 | This package contains cross targeted gcc. |
b336056d | 88 | |
4a6c89d0 | 89 | %description -l de.UTF-8 |
90 | Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem | |
91 | anderem Rechner Code für Win32 zu generieren. | |
9dd4c848 | 92 | |
4a6c89d0 | 93 | %description -l pl.UTF-8 |
94 | crossmingw32 jest kompletnym systemem do kompilacji skrośnej, | |
95 | pozwalającym budować aplikacje MS Windows pod Linuksem używając | |
8c4c66e6 | 96 | bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc, |
4a6c89d0 | 97 | libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz |
2e5b9011 | 98 | z bibliotek w formacie COFF. |
d790a8ba | 99 | |
4a6c89d0 | 100 | Ten pakiet zawiera gcc generujące skrośnie kod dla Win32. |
d790a8ba | 101 | |
73ff33c1 JB |
102 | %package -n crossmingw32-libgcc-dll |
103 | Summary: libgcc DLL library for Windows | |
104 | Summary(pl.UTF-8): Biblioteka DLL libgcc dla Windows | |
105 | Group: Applications/Emulators | |
106 | Requires: wine | |
107 | ||
108 | %description -n crossmingw32-libgcc-dll | |
109 | libgcc DLL library for Windows. | |
110 | ||
111 | %description -n crossmingw32-libgcc-dll -l pl.UTF-8 | |
112 | Biblioteka DLL libgcc dla Windows. | |
113 | ||
6ccf21dc JB |
114 | %package -n crossmingw32-libgomp |
115 | Summary: GNU OpenMP library - cross MinGW32 version | |
116 | Summary(pl.UTF-8): Biblioteka GNU OpenMP - wersja skrośna MinGW32 | |
117 | License: GPL v3+ with GCC Runtime Library Exception v3.1 | |
118 | Group: Development/Libraries | |
119 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
120 | ||
121 | %description -n crossmingw32-libgomp | |
122 | This package contains cross MinGW32 version of GNU OpenMP library. | |
123 | ||
124 | %description -n crossmingw32-libgomp -l pl.UTF-8 | |
125 | Ten pakiet zawiera wersję skrośną MinGW32 biblioteki GNU OpenMP. | |
126 | ||
127 | %package -n crossmingw32-libgomp-static | |
128 | Summary: Static GNU OpenMP library - cross MinGW32 version | |
129 | Summary(pl.UTF-8): Statyczna biblioteka GNU OpenMP - wersja skrośna MinGW32 | |
130 | License: GPL v3+ with GCC Runtime Library Exception v3.1 | |
131 | Group: Development/Libraries | |
132 | Requires: crossmingw32-libgomp = %{epoch}:%{version}-%{release} | |
133 | ||
134 | %description -n crossmingw32-libgomp-static | |
135 | Static GNU OpenMP library - cross MinGW32 version. | |
136 | ||
137 | %description -n crossmingw32-libgomp-static -l pl.UTF-8 | |
138 | Statyczna biblioteka GNU OpenMP - wersja skrośna MinGW32. | |
139 | ||
140 | %package -n crossmingw32-libgomp-dll | |
141 | Summary: DLL GNU OpenMP library for Windows | |
142 | Summary(pl.UTF-8): Biblioteka DLL GNU OpenMP dla Windows | |
143 | License: GPL v3+ with GCC Runtime Library Exception v3.1 | |
144 | Group: Development/Libraries | |
145 | Requires: crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release} | |
146 | Requires: crossmingw32-pthreads-dll | |
147 | ||
148 | %description -n crossmingw32-libgomp-dll | |
149 | DLL GNU OpenMP library for Windows. | |
150 | ||
151 | %description -n crossmingw32-libgomp-dll -l pl.UTF-8 | |
152 | Biblioteka DLL GNU OpenMP dla Windows. | |
153 | ||
d3f237e2 | 154 | %package c++ |
8c4c66e6 JB |
155 | Summary: MinGW32 binary utility development utilities - g++ |
156 | Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - g++ | |
d3f237e2 | 157 | Group: Development/Languages |
cae974d4 | 158 | Requires: %{name} = %{epoch}:%{version}-%{release} |
b336056d | 159 | |
d3f237e2 JB |
160 | %description c++ |
161 | crossmingw32 is a complete cross-compiling development system for | |
162 | building stand-alone Microsoft Windows applications under Linux using | |
8c4c66e6 | 163 | the MinGW32 build libraries. This includes a binutils, gcc with g++ |
d3f237e2 JB |
164 | and objc, and libstdc++, all cross targeted to i386-mingw32, along |
165 | with supporting Win32 libraries in 'coff' format from free sources. | |
166 | ||
167 | This package contains cross targeted g++ and (static) libstdc++. | |
168 | ||
4a6c89d0 | 169 | %description c++ -l pl.UTF-8 |
170 | crossmingw32 jest kompletnym systemem do kompilacji skrośnej, | |
171 | pozwalającym budować aplikacje MS Windows pod Linuksem używając | |
8c4c66e6 | 172 | bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc, |
4a6c89d0 | 173 | libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz |
2e5b9011 | 174 | z bibliotek w formacie COFF. |
d790a8ba | 175 | |
4a6c89d0 | 176 | Ten pakiet zawiera g++ generujące kod pod Win32 oraz bibliotekę |
d790a8ba JB |
177 | libstdc++. |
178 | ||
73ff33c1 JB |
179 | %package -n crossmingw32-libstdc++-static |
180 | Summary: Static standard C++ library - cross MinGW32 version | |
181 | Summary(pl.UTF-8): Statyczna biblioteka standardowa C++ - wersja skrośna MinGW32 | |
182 | Group: Development/Libraries | |
183 | Requires: %{name}-c++ = %{epoch}:%{version}-%{release} | |
184 | ||
185 | %description -n crossmingw32-libstdc++-static | |
186 | Static standard C++ library - cross MinGW32 version. | |
187 | ||
188 | %description -n crossmingw32-libstdc++-static -l pl.UTF-8 | |
189 | Statyczna biblioteka standardowa C++ - wersja skrośna MinGW32. | |
190 | ||
191 | %package -n crossmingw32-libstdc++-dll | |
192 | Summary: libstdc++ DLL library for Windows | |
193 | Summary(pl.UTF-8): Biblioteka DLL libstdc++ dla Windows | |
194 | Group: Applications/Emulators | |
195 | Requires: crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release} | |
196 | Requires: wine | |
197 | ||
198 | %description -n crossmingw32-libstdc++-dll | |
199 | libstdc++ DLL library for Windows. | |
200 | ||
201 | %description -n crossmingw32-libstdc++-dll -l pl.UTF-8 | |
202 | Biblioteka DLL libstdc++ dla Windows. | |
203 | ||
d3f237e2 | 204 | %package objc |
8c4c66e6 JB |
205 | Summary: MinGW32 binary utility development utilities - objc |
206 | Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - objc | |
d3f237e2 | 207 | Group: Development/Languages |
cae974d4 | 208 | Requires: %{name} = %{epoch}:%{version}-%{release} |
d3f237e2 JB |
209 | |
210 | %description objc | |
211 | crossmingw32 is a complete cross-compiling development system for | |
212 | building stand-alone Microsoft Windows applications under Linux using | |
8c4c66e6 | 213 | the MinGW32 build libraries. This includes a binutils, gcc with g++ |
d3f237e2 JB |
214 | and objc, and libstdc++, all cross targeted to i386-mingw32, along |
215 | with supporting Win32 libraries in 'coff' format from free sources. | |
216 | ||
37948e2b | 217 | This package contains cross targeted objc compiler. |
d3f237e2 | 218 | |
4a6c89d0 | 219 | %description objc -l pl.UTF-8 |
220 | crossmingw32 jest kompletnym systemem do kompilacji skrośnej, | |
221 | pozwalającym budować aplikacje MS Windows pod Linuksem używając | |
8c4c66e6 | 222 | bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc, |
4a6c89d0 | 223 | libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz |
2e5b9011 | 224 | z bibliotek w formacie COFF. |
d790a8ba | 225 | |
4a6c89d0 | 226 | Ten pakiet zawiera kompilator objc generujący kod pod Win32. |
d790a8ba | 227 | |
8f1d5c0c JB |
228 | %package -n crossmingw32-libobjc-static |
229 | Summary: Static Objective C library - cross MinGW32 version | |
230 | Summary(pl.UTF-8): Statyczna biblioteka Objective C - wersja skrośna MinGW32 | |
231 | Group: Development/Libraries | |
232 | Requires: %{name}-objc = %{epoch}:%{version}-%{release} | |
233 | ||
234 | %description -n crossmingw32-libobjc-static | |
235 | Static Objective C library - cross MinGW32 version. | |
236 | ||
237 | %description -n crossmingw32-libobjc-static -l pl.UTF-8 | |
238 | Statyczna biblioteka Objective C - wersja skrośna MinGW32. | |
239 | ||
240 | %package -n crossmingw32-libobjc-dll | |
241 | Summary: libobjc DLL library for Windows | |
242 | Summary(pl.UTF-8): Biblioteka DLL libobjc dla Windows | |
243 | Group: Applications/Emulators | |
244 | Requires: crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release} | |
245 | Requires: wine | |
246 | ||
247 | %description -n crossmingw32-libobjc-dll | |
248 | libobjc DLL library for Windows. | |
249 | ||
250 | %description -n crossmingw32-libobjc-dll -l pl.UTF-8 | |
251 | Biblioteka DLL libobjc dla Windows. | |
252 | ||
52a544a1 | 253 | %package fortran |
8c4c66e6 JB |
254 | Summary: MinGW32 binary utility development utilities - Fortran |
255 | Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - Fortran | |
d3f237e2 | 256 | Group: Development/Languages |
cae974d4 | 257 | Requires: %{name} = %{epoch}:%{version}-%{release} |
ed6b55ce | 258 | Requires: crossmingw32-libquadmath = %{epoch}:%{version}-%{release} |
37948e2b | 259 | Obsoletes: crossmingw32-gcc-g77 |
d3f237e2 | 260 | |
52a544a1 | 261 | %description fortran |
d3f237e2 JB |
262 | crossmingw32 is a complete cross-compiling development system for |
263 | building stand-alone Microsoft Windows applications under Linux using | |
8c4c66e6 | 264 | the MinGW32 build libraries. This includes a binutils, gcc with g++ |
d3f237e2 JB |
265 | and objc, and libstdc++, all cross targeted to i386-mingw32, along |
266 | with supporting Win32 libraries in 'coff' format from free sources. | |
267 | ||
37948e2b | 268 | This package contains cross targeted Fortran compiler. |
d3f237e2 | 269 | |
4a6c89d0 | 270 | %description fortran -l pl.UTF-8 |
271 | crossmingw32 jest kompletnym systemem do kompilacji skrośnej, | |
272 | pozwalającym budować aplikacje MS Windows pod Linuksem używając | |
8c4c66e6 | 273 | bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc, |
4a6c89d0 | 274 | libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz |
2e5b9011 | 275 | z bibliotek w formacie COFF. |
d790a8ba | 276 | |
4a6c89d0 | 277 | Ten pakiet zawiera kompilator Fortranu generujący kod pod Win32. |
d790a8ba | 278 | |
0d9cd0a8 JB |
279 | %package -n crossmingw32-libgfortran-static |
280 | Summary: Static Fortran library - cross MinGW32 version | |
6a795f6e | 281 | Summary(pl.UTF-8): Statyczna biblioteka Fortranu - wersja skrośna MinGW32 |
0d9cd0a8 JB |
282 | Group: Development/Libraries |
283 | Requires: %{name}-fortran = %{epoch}:%{version}-%{release} | |
284 | ||
285 | %description -n crossmingw32-libgfortran-static | |
286 | Static Fortran library - cross MinGW32 version. | |
287 | ||
288 | %description -n crossmingw32-libgfortran-static -l pl.UTF-8 | |
6a795f6e | 289 | Statyczna biblioteka Fortranu - wersja skrośna MinGW32. |
0d9cd0a8 JB |
290 | |
291 | %package -n crossmingw32-libgfortran-dll | |
292 | Summary: libgfortran DLL library for Windows | |
293 | Summary(pl.UTF-8): Biblioteka DLL libgfortran dla Windows | |
294 | Group: Applications/Emulators | |
b07ce80e | 295 | Requires: crossmingw32-libquadmath-dll |
0d9cd0a8 JB |
296 | |
297 | %description -n crossmingw32-libgfortran-dll | |
298 | libgfortran DLL library for Windows. | |
299 | ||
300 | %description -n crossmingw32-libgfortran-dll -l pl.UTF-8 | |
301 | Biblioteka DLL libgfortran dla Windows. | |
302 | ||
b07ce80e JB |
303 | %package -n crossmingw32-libquadmath |
304 | Summary: GCC __float128 support library - cross MinGW32 version | |
305 | Summary(pl.UTF-8): Biblioteka do obsługi typu __float128 - wersja skrośna MinGW32 | |
306 | License: GPL v2+ with linking exception | |
307 | Group: Development/Libraries | |
308 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
309 | ||
310 | %description -n crossmingw32-libquadmath | |
311 | This package contains cross MinGW32 version of GCC support library | |
312 | which is needed for __float128 math support and for Fortran REAL*16 | |
313 | support. | |
314 | ||
315 | %description -n crossmingw32-libquadmath -l pl.UTF-8 | |
316 | Ten pakiet zawiera wersję skrośną MinGW32 biblioteki GCC do obsługi | |
317 | operacji matematycznych na zmiennych typu __float128 oraz typu REAL*16 | |
318 | w Fortranie. | |
319 | ||
320 | %package -n crossmingw32-libquadmath-static | |
321 | Summary: Static GCC __float128 support library - cross MinGW32 version | |
322 | Summary(pl.UTF-8): Biblioteka statyczna GCC do obsługi typu __float128 - wersja skrośna MinGW32 | |
323 | License: GPL v2+ with linking exception | |
324 | Group: Development/Libraries | |
325 | Requires: crossmingw32-libquadmath = %{epoch}:%{version}-%{release} | |
326 | ||
327 | %description -n crossmingw32-libquadmath-static | |
328 | Static GCC __float128 support library - cross MinGW32 version. | |
329 | ||
330 | %description -n crossmingw32-libquadmath-static -l pl.UTF-8 | |
331 | Biblioteka statyczna GCC do obsługi typu __float128 - wersja skrośna | |
332 | MinGW32. | |
333 | ||
334 | %package -n crossmingw32-libquadmath-dll | |
335 | Summary: DLL GCC __float128 support library for Windows | |
336 | Summary(pl.UTF-8): Biblioteka DLL GCC do obsługi typu __float128 dla Windows | |
337 | License: GPL v2+ with linking exception | |
338 | Group: Applications/Emulators | |
339 | Requires: wine | |
340 | ||
341 | %description -n crossmingw32-libquadmath-dll | |
342 | DLL GCC __float128 support library for Windows. | |
343 | ||
344 | %description -n crossmingw32-libquadmath-dll -l pl.UTF-8 | |
345 | Biblioteka DLL GCC do obsługi typu __float128 dla Windows. | |
346 | ||
d3f237e2 | 347 | %package java |
8c4c66e6 JB |
348 | Summary: MinGW32 binary utility development utilities - Java |
349 | Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - Java | |
d3f237e2 | 350 | Group: Development/Languages |
cae974d4 | 351 | Requires: %{name} = %{epoch}:%{version}-%{release} |
d3f237e2 JB |
352 | |
353 | %description java | |
354 | crossmingw32 is a complete cross-compiling development system for | |
355 | building stand-alone Microsoft Windows applications under Linux using | |
8c4c66e6 | 356 | the MinGW32 build libraries. This includes a binutils, gcc with g++ |
d3f237e2 JB |
357 | and objc, and libstdc++, all cross targeted to i386-mingw32, along |
358 | with supporting Win32 libraries in 'coff' format from free sources. | |
359 | ||
37948e2b | 360 | This package contains cross targeted Java compiler. |
d3f237e2 | 361 | |
4a6c89d0 | 362 | %description java -l pl.UTF-8 |
4a6c89d0 | 363 | crossmingw32 jest kompletnym systemem do kompilacji skrośnej, |
364 | pozwalającym budować aplikacje MS Windows pod Linuksem używając | |
8c4c66e6 | 365 | bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc, |
4a6c89d0 | 366 | libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz |
2e5b9011 | 367 | z bibliotek w formacie COFF. |
d790a8ba | 368 | |
4a6c89d0 | 369 | Ten pakiet zawiera kompilator Javy generujący kod pod Win32. |
d790a8ba | 370 | |
d3f237e2 | 371 | %prep |
dee9b92f | 372 | %setup -q -n gcc-%{version} |
83afd976 ŁK |
373 | %patch100 -p0 |
374 | %patch0 -p1 | |
375 | %patch2 -p1 | |
6ccf21dc JB |
376 | %patch12 -p1 |
377 | %patch13 -p1 | |
83afd976 | 378 | |
b399bc1a | 379 | %if %{with bootstrap} |
ba1fe36b JB |
380 | # note: "winsup" dir is special, handled by gcc's configure |
381 | install -d winsup/mingw | |
382 | tar xf %{SOURCE1} -C winsup/mingw | |
b399bc1a | 383 | %endif |
83afd976 ŁK |
384 | |
385 | # override snapshot version. | |
386 | echo %{version} > gcc/BASE-VER | |
387 | echo "release" > gcc/DEV-PHASE | |
b336056d JB |
388 | |
389 | %build | |
73ff33c1 | 390 | rm -rf builddir && install -d builddir && cd builddir |
b399bc1a | 391 | %if %{with bootstrap} |
73ff33c1 | 392 | install -d %{target}/winsup |
73ff33c1 | 393 | ln -sf ../../../winsup/mingw/lib %{target}/winsup/mingw |
ba1fe36b | 394 | ln -sf ../../../winsup/mingw/include %{target}/winsup/w32api |
73ff33c1 | 395 | WINSUPDIR=$(cd ..; pwd)/winsup |
b399bc1a AF |
396 | %endif |
397 | ||
83afd976 | 398 | CC="%{__cc}" \ |
b4c37c30 | 399 | CFLAGS="%{rpmcflags}" \ |
83afd976 | 400 | CXXFLAGS="%{rpmcxxflags}" \ |
b4c37c30 | 401 | TEXCONFIG=false \ |
b336056d | 402 | ../configure \ |
8f1d5c0c JB |
403 | --prefix=%{sysprefix} \ |
404 | --bindir=%{arch}/bin \ | |
73ff33c1 | 405 | --libdir=%{_libdir} \ |
8f1d5c0c | 406 | --includedir=%{arch}/include \ |
73ff33c1 | 407 | --libexecdir=%{_libdir} \ |
b336056d JB |
408 | --infodir=%{_infodir} \ |
409 | --mandir=%{_mandir} \ | |
6ccf21dc | 410 | --with-build-time-tools=%{arch}/bin \ |
73ff33c1 JB |
411 | %{!?with_bootstrap:--with-headers=%{arch}/include} \ |
412 | --with-libs=%{!?with_bootstrap:%{arch}/lib}%{?with_bootstrap:${WINSUPDIR}/mingw/lib} \ | |
83afd976 ŁK |
413 | --with-dwarf2 \ |
414 | --with-gnu-as \ | |
415 | --with-gnu-ld \ | |
416 | --with-mangler-in-ld \ | |
417 | --with-long-double-128 \ | |
6ccf21dc | 418 | --with-cloog \ |
56c3ae1a | 419 | --with-ppl \ |
6ccf21dc JB |
420 | --disable-isl-version-check \ |
421 | --enable-shared \ | |
0dcd3a97 | 422 | --enable-threads \ |
0d9cd0a8 | 423 | --enable-languages="c,c++,fortran,java,objc" \ |
0dcd3a97 | 424 | --enable-c99 \ |
83afd976 | 425 | --enable-fully-dynamic-string \ |
6ccf21dc | 426 | --enable-libgomp \ |
83afd976 | 427 | --enable-libstdcxx-allocator=new \ |
6ccf21dc | 428 | --enable-long-long \ |
83afd976 | 429 | --enable-version-specific-runtime-libs \ |
6ccf21dc JB |
430 | --disable-libssp \ |
431 | --disable-multilib \ | |
0dcd3a97 | 432 | --disable-nls \ |
83afd976 | 433 | --disable-sjlj-exceptions \ |
6ccf21dc | 434 | --disable-symvers \ |
83afd976 | 435 | --disable-win32-registry \ |
b336056d JB |
436 | --target=%{target} |
437 | ||
83afd976 ŁK |
438 | cd .. |
439 | %{__make} -C builddir all-host | |
440 | patch -p1 <%{PATCH1} | |
441 | %{__make} -C builddir | |
b336056d JB |
442 | |
443 | %install | |
b336056d | 444 | rm -rf $RPM_BUILD_ROOT |
73ff33c1 | 445 | install -d $RPM_BUILD_ROOT%{_bindir} |
b336056d | 446 | |
83afd976 | 447 | %{__make} -C builddir install \ |
d12aabe0 | 448 | DESTDIR=$RPM_BUILD_ROOT |
b336056d | 449 | |
73ff33c1 JB |
450 | mv $RPM_BUILD_ROOT%{gcclibdir}/include-fixed/{limits,syslimits}.h $RPM_BUILD_ROOT%{gcclibdir}/include |
451 | %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/include-fixed | |
452 | %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/install-tools | |
d12aabe0 | 453 | |
82f2d40f JB |
454 | # these must be symlinks: gcclibdir is calculated relatively to real binary path |
455 | ln -sf %{arch}/bin/%{target}-gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc | |
456 | ln -sf %{arch}/bin/%{target}-g++ $RPM_BUILD_ROOT%{_bindir}/%{target}-g++ | |
457 | ln -sf %{arch}/bin/%{target}-cpp $RPM_BUILD_ROOT%{_bindir}/%{target}-cpp | |
458 | ln -sf %{arch}/bin/%{target}-gcov $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov | |
459 | ln -sf %{arch}/bin/%{target}-gcj $RPM_BUILD_ROOT%{_bindir}/%{target}-gcj | |
460 | ln -sf %{arch}/bin/%{target}-jcf-dump $RPM_BUILD_ROOT%{_bindir}/%{target}-jcf-dump | |
461 | ln -sf %{arch}/bin/%{target}-gfortran $RPM_BUILD_ROOT%{_bindir}/%{target}-gfortran | |
83afd976 | 462 | |
73ff33c1 JB |
463 | # DLLs |
464 | install -d $RPM_BUILD_ROOT%{_dlldir} | |
b07ce80e JB |
465 | mv -f $RPM_BUILD_ROOT%{gccarchdir}/*.dll $RPM_BUILD_ROOT%{_dlldir} |
466 | mv -f $RPM_BUILD_ROOT%{gcclibdir}/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
8f1d5c0c JB |
467 | if [ ! -f $RPM_BUILD_ROOT%{_dlldir}/libgcc_s_dw2-1.dll ]; then |
468 | echo "libgcc DLL not installed?" | |
469 | install builddir/i386-mingw32/libgcc/shlib/libgcc_s_dw2-1.dll $RPM_BUILD_ROOT%{_dlldir} | |
470 | fi | |
d12aabe0 | 471 | |
73ff33c1 JB |
472 | %if 0%{!?debug:1} |
473 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll | |
d33f98c7 | 474 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{gcclibdir}/lib*.a |
73ff33c1 | 475 | %endif |
83afd976 | 476 | |
6ccf21dc JB |
477 | # avoid -L poisoning in *.la |
478 | for f in libcaf_single.la libgfortran.la libgfortranbegin.la libobjc.la libquadmath.la %{?with_gomp:libgomp.la} ; do | |
479 | file="$RPM_BUILD_ROOT%{gcclibdir}/$f" | |
480 | %{__perl} %{SOURCE2} "$file" %{gcclibdir} >"${file}.fixed" | |
481 | %{__mv} "${file}.fixed" "$file" | |
482 | done | |
483 | ||
b07ce80e JB |
484 | # for pretty-printers see native gcc |
485 | %{__rm} $RPM_BUILD_ROOT%{gcclibdir}/libstdc++.dll.a-gdb.py | |
486 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/gcc-%{version}/python/libstdcxx | |
4b27d406 JB |
487 | # no plugin development for mingw32 (at least for now) |
488 | %{__rm} $RPM_BUILD_ROOT%{gcclibdir}/liblto_plugin.la | |
b07ce80e | 489 | %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/plugin |
73ff33c1 JB |
490 | # already in native gcc |
491 | %{__rm} -r $RPM_BUILD_ROOT%{_infodir} | |
492 | # common FSF man pages | |
493 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man7/{fsf-funding,gfdl,gpl}.7 | |
7f7a2048 JB |
494 | # programs not packaged |
495 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/%{target}-{aot-compile,gc-analyze,gcj-dbtool,gij,grmic,jv-convert,rebuild-gcj-db}.1 | |
8c4c66e6 | 496 | |
b336056d | 497 | %clean |
b336056d JB |
498 | rm -rf $RPM_BUILD_ROOT |
499 | ||
500 | %files | |
501 | %defattr(644,root,root,755) | |
83afd976 | 502 | %attr(755,root,root) %{_bindir}/%{target}-gcc |
b4c37c30 | 503 | %attr(755,root,root) %{_bindir}/%{target}-cpp |
504 | %attr(755,root,root) %{_bindir}/%{target}-gcov | |
73ff33c1 JB |
505 | %attr(755,root,root) %{arch}/bin/%{target}-gcc |
506 | %attr(755,root,root) %{arch}/bin/%{target}-gcc-%{version} | |
669fa8b1 JB |
507 | %attr(755,root,root) %{arch}/bin/%{target}-gcc-ar |
508 | %attr(755,root,root) %{arch}/bin/%{target}-gcc-nm | |
509 | %attr(755,root,root) %{arch}/bin/%{target}-gcc-ranlib | |
83afd976 ŁK |
510 | %attr(755,root,root) %{arch}/bin/%{target}-cpp |
511 | %attr(755,root,root) %{arch}/bin/%{target}-gcov | |
73ff33c1 JB |
512 | %dir %{gccarchdir} |
513 | %dir %{gcclibdir} | |
514 | %attr(755,root,root) %{gcclibdir}/cc1 | |
515 | %attr(755,root,root) %{gcclibdir}/collect2 | |
516 | %attr(755,root,root) %{gcclibdir}/lto-wrapper | |
4b27d406 JB |
517 | %attr(755,root,root) %{gcclibdir}/lto1 |
518 | %attr(755,root,root) %{gcclibdir}/liblto_plugin.so* | |
73ff33c1 JB |
519 | %{gcclibdir}/libgcc.a |
520 | %{gcclibdir}/libgcc_eh.a | |
521 | %{gcclibdir}/libgcc_s.a | |
522 | %{gcclibdir}/libgcov.a | |
00383376 AF |
523 | %{gcclibdir}/crtbegin.o |
524 | %{gcclibdir}/crtend.o | |
525 | %{gcclibdir}/crtfastmath.o | |
73ff33c1 JB |
526 | %dir %{gcclibdir}/include |
527 | %{gcclibdir}/include/*.h | |
539d7886 | 528 | %{_mandir}/man1/%{target}-cpp.1* |
d3f237e2 | 529 | %{_mandir}/man1/%{target}-gcc.1* |
539d7886 | 530 | %{_mandir}/man1/%{target}-gcov.1* |
d3f237e2 | 531 | |
73ff33c1 JB |
532 | %files -n crossmingw32-libgcc-dll |
533 | %defattr(644,root,root,755) | |
534 | %{_dlldir}/libgcc_s_dw2-1.dll | |
535 | ||
6ccf21dc JB |
536 | %if %{with gomp} |
537 | %files -n crossmingw32-libgomp | |
538 | %defattr(644,root,root,755) | |
539 | %{gcclibdir}/libgomp.dll.a | |
540 | %{gcclibdir}/libgomp.la | |
541 | %{gcclibdir}/libgomp.spec | |
542 | ||
543 | %files -n crossmingw32-libgomp-static | |
544 | %defattr(644,root,root,755) | |
545 | %{gcclibdir}/libgomp.a | |
546 | ||
547 | %files -n crossmingw32-libgomp-dll | |
548 | %defattr(644,root,root,755) | |
549 | %{_dlldir}/libgomp-1.dll | |
550 | %endif | |
551 | ||
d3f237e2 JB |
552 | %files c++ |
553 | %defattr(644,root,root,755) | |
83afd976 ŁK |
554 | %attr(755,root,root) %{_bindir}/%{target}-g++ |
555 | %attr(755,root,root) %{arch}/bin/%{target}-c++ | |
556 | %attr(755,root,root) %{arch}/bin/%{target}-g++ | |
73ff33c1 JB |
557 | %attr(755,root,root) %{gcclibdir}/cc1plus |
558 | %{gcclibdir}/libstdc++.dll.a | |
559 | %{gcclibdir}/libstdc++.la | |
560 | %{gcclibdir}/libsupc++.la | |
561 | %{gcclibdir}/libsupc++.a | |
73ff33c1 | 562 | %{gcclibdir}/include/c++ |
d3f237e2 JB |
563 | %{_mandir}/man1/%{target}-g++.1* |
564 | ||
73ff33c1 JB |
565 | %files -n crossmingw32-libstdc++-static |
566 | %defattr(644,root,root,755) | |
567 | %{gcclibdir}/libstdc++.a | |
568 | ||
569 | %files -n crossmingw32-libstdc++-dll | |
570 | %defattr(644,root,root,755) | |
571 | %{_dlldir}/libstdc++-6.dll | |
572 | ||
d3f237e2 JB |
573 | %files objc |
574 | %defattr(644,root,root,755) | |
8f1d5c0c JB |
575 | %attr(755,root,root) %{gcclibdir}/cc1obj |
576 | %{gcclibdir}/libobjc.dll.a | |
577 | %{gcclibdir}/libobjc.la | |
578 | %{gcclibdir}/include/objc | |
d3f237e2 | 579 | |
8f1d5c0c JB |
580 | %files -n crossmingw32-libobjc-static |
581 | %defattr(644,root,root,755) | |
582 | %{gcclibdir}/libobjc.a | |
583 | ||
584 | %files -n crossmingw32-libobjc-dll | |
585 | %defattr(644,root,root,755) | |
669fa8b1 | 586 | %{_dlldir}/libobjc-4.dll |
8f1d5c0c | 587 | |
52a544a1 | 588 | %files fortran |
d3f237e2 | 589 | %defattr(644,root,root,755) |
52a544a1 | 590 | %attr(755,root,root) %{_bindir}/%{target}-gfortran |
0d9cd0a8 | 591 | %attr(755,root,root) %{arch}/bin/%{target}-gfortran |
7f7a2048 | 592 | %attr(755,root,root) %{gcclibdir}/f951 |
0d9cd0a8 | 593 | %{gcclibdir}/finclude |
669fa8b1 JB |
594 | %{gcclibdir}/libcaf_single.a |
595 | %{gcclibdir}/libcaf_single.la | |
0d9cd0a8 JB |
596 | %{gcclibdir}/libgfortran.dll.a |
597 | %{gcclibdir}/libgfortran.la | |
b07ce80e | 598 | %{gcclibdir}/libgfortran.spec |
0d9cd0a8 JB |
599 | %{gcclibdir}/libgfortranbegin.a |
600 | %{gcclibdir}/libgfortranbegin.la | |
52a544a1 | 601 | %{_mandir}/man1/%{target}-gfortran.1* |
0d9cd0a8 JB |
602 | |
603 | %files -n crossmingw32-libgfortran-static | |
604 | %defattr(644,root,root,755) | |
605 | %{gcclibdir}/libgfortran.a | |
606 | ||
607 | %files -n crossmingw32-libgfortran-dll | |
608 | %defattr(644,root,root,755) | |
609 | %{_dlldir}/libgfortran-3.dll | |
d3f237e2 | 610 | |
b07ce80e JB |
611 | %files -n crossmingw32-libquadmath |
612 | %defattr(644,root,root,755) | |
613 | %{gcclibdir}/libquadmath.dll.a | |
614 | %{gcclibdir}/libquadmath.la | |
615 | ||
616 | %files -n crossmingw32-libquadmath-static | |
617 | %defattr(644,root,root,755) | |
618 | %{gcclibdir}/libquadmath.a | |
619 | ||
620 | %files -n crossmingw32-libquadmath-dll | |
621 | %defattr(644,root,root,755) | |
622 | %{_dlldir}/libquadmath-0.dll | |
623 | ||
d3f237e2 JB |
624 | %files java |
625 | %defattr(644,root,root,755) | |
626 | %attr(755,root,root) %{_bindir}/%{target}-gcj | |
7fc2a2bb | 627 | %attr(755,root,root) %{_bindir}/%{target}-jcf-dump |
7f7a2048 JB |
628 | %attr(755,root,root) %{arch}/bin/%{target}-gcj |
629 | %attr(755,root,root) %{arch}/bin/%{target}-jcf-dump | |
630 | %attr(755,root,root) %{gcclibdir}/jc1 | |
631 | %attr(755,root,root) %{gcclibdir}/jvgenmain | |
d12aabe0 | 632 | %{_mandir}/man1/%{target}-gcj.1* |
539d7886 | 633 | %{_mandir}/man1/%{target}-jcf-dump.1* |