]> git.pld-linux.org Git - packages/crossmingw32-gcc.git/blob - crossmingw32-gcc.spec
61fa5fc68a72c7c4085488d76ff17e28f2a9b749
[packages/crossmingw32-gcc.git] / crossmingw32-gcc.spec
1 #
2 # Conditional build:
3 %bcond_with     bootstrap       # bootstrap build (using binary w32api/mingwrt, no gomp)
4 %bcond_without  gomp            # OpenMP libraries
5 #
6 %if %{with bootstrap}
7 %undefine       with_gomp
8 %endif
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
15 Name:           crossmingw32-gcc
16 Version:        7.5.0
17 Release:        1
18 Epoch:          1
19 License:        GPL v3+
20 Group:          Development/Languages
21 Source0:        https://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-%{version}.tar.xz
22 # Source0-md5:  79cb8a65d44dfc8a2402b46395535c9a
23 %define         w32api_ver      5.0.2
24 Source1:        http://downloads.sourceforge.net/mingw/w32api-%{w32api_ver}-mingw32-dev.tar.xz
25 # Source1-md5:  78aa3ed3964f32aec8c0d40521c40eb8
26 %define         mingw32_ver     5.0.2
27 Source2:        http://downloads.sourceforge.net/mingw/mingwrt-%{mingw32_ver}-mingw32-dev.tar.xz
28 # Source2-md5:  ebb43675d02887e045812debfbabe061
29 Source3:        gcc-optimize-la.pl
30 #Patch100:      gcc-branch.diff
31 Patch0:         %{name}-buildsystem1.patch
32 Patch1:         %{name}-buildsystem2.patch
33 Patch2:         %{name}-lfs.patch
34 Patch3:         gcc-mingw32.patch
35 Patch4:         gcc-build-libvtv.patch
36 URL:            http://gcc.gnu.org/
37 BuildRequires:  autoconf >= 2.64
38 BuildRequires:  automake >= 1:1.11.1
39 BuildRequires:  bison
40 BuildRequires:  crossmingw32-binutils >= 2.23
41 %{?with_gomp:BuildRequires:     crossmingw32-pthreads-w32}
42 %if %{without bootstrap}
43 BuildRequires:  crossmingw32-runtime >= 3.5
44 BuildRequires:  crossmingw32-w32api >= 3.1
45 %endif
46 BuildRequires:  flex >= 2.5.4
47 BuildRequires:  gettext-tools >= 0.14.5
48 BuildRequires:  gmp-devel >= 4.3.2
49 BuildRequires:  isl-devel >= 0.15
50 BuildRequires:  libmpc-devel >= 0.8.1
51 BuildRequires:  libstdc++-devel
52 BuildRequires:  mpfr-devel >= 2.4.2
53 BuildRequires:  perl-tools-pod
54 BuildRequires:  tar >= 1:1.22
55 BuildRequires:  texinfo >= 4.7
56 BuildRequires:  xz
57 BuildRequires:  zlib-devel
58 BuildConflicts: pdksh < 5.2.14-50
59 Requires:       crossmingw32-binutils >= 2.23
60 Requires:       gcc-dirs
61 Requires:       gmp >= 4.3.2
62 Requires:       isl >= 0.15
63 Requires:       libmpc >= 0.8.1
64 Requires:       mpfr >= 2.4.2
65 # java support dropped from gcc 7+
66 Obsoletes:      crossmingw32-java < 1:7
67 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
68
69 %define         target          i386-mingw32
70 %define         sysprefix       /usr
71 %define         archprefix      %{sysprefix}/%{target}
72 %define         archbindir      %{archprefix}/bin
73 %define         archincludedir  %{archprefix}/include
74 %define         archlibdir      %{archprefix}/lib
75 %define         gccarchdir      %{_libdir}/gcc/%{target}
76 %define         gcclibdir       %{gccarchdir}/%{version}
77 %define         _dlldir         /usr/share/wine/windows/system
78
79 %define         _noautostrip    .*/lib.*\\.a
80
81 %define         _enable_debug_packages 0
82
83 # functions with printf format attribute but with special parser and also
84 # receiving non constant format strings
85 %define         Werror_cflags   %{nil}
86 %define         _ssp_cflags     %{nil}
87 # -fPIC is not valid for target platform
88 %define         filterout_c     -fPIC
89
90 %description
91 crossmingw32 is a complete cross-compiling development system for
92 building stand-alone Microsoft Windows applications under Linux using
93 the MinGW32 build libraries. This includes a binutils, gcc with g++
94 and objc, and libstdc++, all cross targeted to i386-mingw32, along
95 with supporting Win32 libraries in 'coff' format from free sources.
96
97 This package contains cross targeted gcc.
98
99 %description -l de.UTF-8
100 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
101 anderem Rechner Code für Win32 zu generieren.
102
103 %description -l pl.UTF-8
104 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
105 pozwalającym budować aplikacje MS Windows pod Linuksem używając
106 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
107 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
108 z bibliotek w formacie COFF.
109
110 Ten pakiet zawiera gcc generujące skrośnie kod dla Win32.
111
112 %package -n crossmingw32-libgcc-dll
113 Summary:        libgcc DLL library for Windows
114 Summary(pl.UTF-8):      Biblioteka DLL libgcc dla Windows
115 Group:          Applications/Emulators
116 Requires:       wine
117
118 %description -n crossmingw32-libgcc-dll
119 libgcc DLL library for Windows.
120
121 %description -n crossmingw32-libgcc-dll -l pl.UTF-8
122 Biblioteka DLL libgcc dla Windows.
123
124 %package -n crossmingw32-libatomic
125 Summary:        The GNU Atomic library - cross MinGW32 version
126 Summary(pl.UTF-8):      Biblioteka GNU Atomic - wersja skrośna MinGW32
127 License:        GPL v3+ with GCC Runtime Library Exception v3.1
128 Group:          Development/Libraries
129 Requires:       %{name} = %{epoch}:%{version}-%{release}
130
131 %description -n crossmingw32-libatomic
132 This package contains cross MinGW32 version of the GNU Atomic library
133 which is a GCC support library for atomic operations not supported by
134 hardware.
135
136 %description -n crossmingw32-libatomic -l pl.UTF-8
137 Ten pakiet zawiera wersję skrośną MinGW32 biblioteki GNU Atomic,
138 będącej biblioteką GCC, wspierającej operacje atomowe na sprzęcie ich
139 nie obsługującym.
140
141 %package -n crossmingw32-libatomic-static
142 Summary:        The GNU Atomic static library - cross MinGW32 version
143 Summary(pl.UTF-8):      Statyczna biblioteka GNU Atomic - wersja skrośna MinGW32
144 License:        GPL v3+ with GCC Runtime Library Exception v3.1
145 Group:          Development/Libraries
146 Requires:       crossmingw32-libatomic = %{epoch}:%{version}-%{release}
147
148 %description -n crossmingw32-libatomic-static
149 The GNU Atomic static library - cross MinGW32 version.
150
151 %description -n crossmingw32-libatomic-static
152 Statyczna biblioteka GNU Atomic - wersja skrośna MinGW32.
153
154 %package -n crossmingw32-libatomic-dll
155 Summary:        DLL GNU Atomic library for Windows
156 Summary(pl.UTF-8):      Biblioteka DLL GNU Atomic dla Windows
157 License:        GPL v3+ with GCC Runtime Library Exception v3.1
158 Group:          Applications/Emulators
159 Requires:       wine
160
161 %description -n crossmingw32-libatomic-dll
162 DLL GNU Atomic library for Windows.
163
164 %description -n crossmingw32-libatomic-dll -l pl.UTF-8
165 Biblioteka DLL GNU Atomic dla Windows.
166
167 %package -n crossmingw32-libgomp
168 Summary:        GNU OpenMP library - cross MinGW32 version
169 Summary(pl.UTF-8):      Biblioteka GNU OpenMP - wersja skrośna MinGW32
170 License:        GPL v3+ with GCC Runtime Library Exception v3.1
171 Group:          Development/Libraries
172 Requires:       %{name} = %{epoch}:%{version}-%{release}
173
174 %description -n crossmingw32-libgomp
175 This package contains cross MinGW32 version of GNU OpenMP library.
176
177 %description -n crossmingw32-libgomp -l pl.UTF-8
178 Ten pakiet zawiera wersję skrośną MinGW32 biblioteki GNU OpenMP.
179
180 %package -n crossmingw32-libgomp-static
181 Summary:        Static GNU OpenMP library - cross MinGW32 version
182 Summary(pl.UTF-8):      Statyczna biblioteka GNU OpenMP - wersja skrośna MinGW32
183 License:        GPL v3+ with GCC Runtime Library Exception v3.1
184 Group:          Development/Libraries
185 Requires:       crossmingw32-libgomp = %{epoch}:%{version}-%{release}
186
187 %description -n crossmingw32-libgomp-static
188 Static GNU OpenMP library - cross MinGW32 version.
189
190 %description -n crossmingw32-libgomp-static -l pl.UTF-8
191 Statyczna biblioteka GNU OpenMP - wersja skrośna MinGW32.
192
193 %package -n crossmingw32-libgomp-dll
194 Summary:        DLL GNU OpenMP library for Windows
195 Summary(pl.UTF-8):      Biblioteka DLL GNU OpenMP dla Windows
196 License:        GPL v3+ with GCC Runtime Library Exception v3.1
197 Group:          Applications/Emulators
198 Requires:       crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release}
199 Requires:       crossmingw32-pthreads-w32-dll
200
201 %description -n crossmingw32-libgomp-dll
202 DLL GNU OpenMP library for Windows.
203
204 %description -n crossmingw32-libgomp-dll -l pl.UTF-8
205 Biblioteka DLL GNU OpenMP dla Windows.
206
207 %package -n crossmingw32-libvtv
208 Summary:        The Virtual Table Verification library - cross MinGW32 version
209 Summary(pl.UTF-8):      Biblioteka Virtual Table Verification do weryfikacji tablicy wirtualnej - wersja skrośna MinGW32
210 License:        GPL v3+ with GCC Runtime Library Exception v3.1
211 Group:          Development/Libraries
212 URL:            https://gcc.gnu.org/wiki/vtv
213 Requires:       %{name} = %{epoch}:%{version}-%{release}
214
215 %description -n crossmingw32-libvtv
216 This package contains cross MinGW32 version of the Virtual Table
217 Verification library which is used for -fvtable-verify=...
218 instrumented programs.
219
220 %description -n crossmingw32-libvtv -l pl.UTF-8
221 Ten pakiet zawiera wersję skrośną MinGW32 biblioteki Virtual Table
222 Verification, służącej do weryfikacji tablicy wirtualnej w programach
223 kompilowanych z opcją -fvtable-verify=....
224
225 %package -n crossmingw32-libvtv-static
226 Summary:        The Virtual Table Verification static library - cross MinGW32 version
227 Summary(pl.UTF-8):      Statyczna biblioteka Virtual Table Verification - wersja skrośna MinGW32
228 License:        GPL v3+ with GCC Runtime Library Exception v3.1
229 Group:          Development/Libraries
230 URL:            https://gcc.gnu.org/wiki/vtv
231 Requires:       crossmingw32-libvtv = %{epoch}:%{version}-%{release}
232
233 %description -n crossmingw32-libvtv-static
234 The Virtual Table Verification static library - cross MinGW32 version.
235
236 %description -n crossmingw32-libvtv-static -l pl.UTF-8
237 Statyczna biblioteka Virtual Table Verification - wersja skrośna
238 MinGW32.
239
240 %package -n crossmingw32-libvtv-dll
241 Summary:        DLL Virtual Table Verification libraries for Windows
242 Summary(pl.UTF-8):      Biblioteki DLL Virtual Table Verification dla Windows
243 License:        GPL v3+ with GCC Runtime Library Exception v3.1
244 Group:          Applications/Emulators
245 URL:            https://gcc.gnu.org/wiki/vtv
246 Requires:       crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release}
247
248 %description -n crossmingw32-libvtv-dll
249 DLL Virtual Table Verification libraries for Windows.
250
251 %description -n crossmingw32-libvtv-dll -l pl.UTF-8
252 Biblioteki DLL Virtual Table Verification dla Windows.
253
254 %package c++
255 Summary:        MinGW32 binary utility development utilities - g++
256 Summary(pl.UTF-8):      Zestaw narzędzi MinGW32 - g++
257 Group:          Development/Languages
258 Requires:       %{name} = %{epoch}:%{version}-%{release}
259
260 %description c++
261 crossmingw32 is a complete cross-compiling development system for
262 building stand-alone Microsoft Windows applications under Linux using
263 the MinGW32 build libraries. This includes a binutils, gcc with g++
264 and objc, and libstdc++, all cross targeted to i386-mingw32, along
265 with supporting Win32 libraries in 'coff' format from free sources.
266
267 This package contains cross targeted g++ and (static) libstdc++.
268
269 %description c++ -l pl.UTF-8
270 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
271 pozwalającym budować aplikacje MS Windows pod Linuksem używając
272 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
273 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
274 z bibliotek w formacie COFF.
275
276 Ten pakiet zawiera g++ generujące kod pod Win32 oraz bibliotekę
277 libstdc++.
278
279 %package -n crossmingw32-libstdc++-static
280 Summary:        Static standard C++ library - cross MinGW32 version
281 Summary(pl.UTF-8):      Statyczna biblioteka standardowa C++ - wersja skrośna MinGW32
282 Group:          Development/Libraries
283 Requires:       %{name}-c++ = %{epoch}:%{version}-%{release}
284
285 %description -n crossmingw32-libstdc++-static
286 Static standard C++ library - cross MinGW32 version.
287
288 %description -n crossmingw32-libstdc++-static -l pl.UTF-8
289 Statyczna biblioteka standardowa C++ - wersja skrośna MinGW32.
290
291 %package -n crossmingw32-libstdc++-dll
292 Summary:        libstdc++ DLL library for Windows
293 Summary(pl.UTF-8):      Biblioteka DLL libstdc++ dla Windows
294 Group:          Applications/Emulators
295 Requires:       crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release}
296 Requires:       wine
297
298 %description -n crossmingw32-libstdc++-dll
299 libstdc++ DLL library for Windows.
300
301 %description -n crossmingw32-libstdc++-dll -l pl.UTF-8
302 Biblioteka DLL libstdc++ dla Windows.
303
304 %package objc
305 Summary:        MinGW32 binary utility development utilities - objc
306 Summary(pl.UTF-8):      Zestaw narzędzi MinGW32 - objc
307 Group:          Development/Languages
308 Requires:       %{name} = %{epoch}:%{version}-%{release}
309
310 %description objc
311 crossmingw32 is a complete cross-compiling development system for
312 building stand-alone Microsoft Windows applications under Linux using
313 the MinGW32 build libraries. This includes a binutils, gcc with g++
314 and objc, and libstdc++, all cross targeted to i386-mingw32, along
315 with supporting Win32 libraries in 'coff' format from free sources.
316
317 This package contains cross targeted objc compiler.
318
319 %description objc -l pl.UTF-8
320 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
321 pozwalającym budować aplikacje MS Windows pod Linuksem używając
322 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
323 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
324 z bibliotek w formacie COFF.
325
326 Ten pakiet zawiera kompilator objc generujący kod pod Win32.
327
328 %package objc++
329 Summary:        MinGW32 binary utility development utilities - objc++
330 Summary(pl.UTF-8):      Zestaw narzędzi MinGW32 - objc++
331 Group:          Development/Languages
332 Requires:       %{name}-objc = %{epoch}:%{version}-%{release}
333
334 %description objc++
335 crossmingw32 is a complete cross-compiling development system for
336 building stand-alone Microsoft Windows applications under Linux using
337 the MinGW32 build libraries. This includes a binutils, gcc with g++
338 and objc, and libstdc++, all cross targeted to i386-mingw32, along
339 with supporting Win32 libraries in 'coff' format from free sources.
340
341 This package contains Objective C++ support.
342
343 %description objc++ -l pl.UTF-8
344 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
345 pozwalającym budować aplikacje MS Windows pod Linuksem używając
346 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
347 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
348 z bibliotek w formacie COFF.
349
350 Ten pakiet zawiera obsługę języka Objective C++.
351
352 %package -n crossmingw32-libobjc-static
353 Summary:        Static Objective C library - cross MinGW32 version
354 Summary(pl.UTF-8):      Statyczna biblioteka Objective C - wersja skrośna MinGW32
355 Group:          Development/Libraries
356 Requires:       %{name}-objc = %{epoch}:%{version}-%{release}
357
358 %description -n crossmingw32-libobjc-static
359 Static Objective C library - cross MinGW32 version.
360
361 %description -n crossmingw32-libobjc-static -l pl.UTF-8
362 Statyczna biblioteka Objective C - wersja skrośna MinGW32.
363
364 %package -n crossmingw32-libobjc-dll
365 Summary:        libobjc DLL library for Windows
366 Summary(pl.UTF-8):      Biblioteka DLL libobjc dla Windows
367 Group:          Applications/Emulators
368 Requires:       crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release}
369 Requires:       wine
370
371 %description -n crossmingw32-libobjc-dll
372 libobjc DLL library for Windows.
373
374 %description -n crossmingw32-libobjc-dll -l pl.UTF-8
375 Biblioteka DLL libobjc dla Windows.
376
377 %package fortran
378 Summary:        MinGW32 binary utility development utilities - Fortran
379 Summary(pl.UTF-8):      Zestaw narzędzi MinGW32 - Fortran
380 Group:          Development/Languages
381 Requires:       %{name} = %{epoch}:%{version}-%{release}
382 Requires:       crossmingw32-libquadmath = %{epoch}:%{version}-%{release}
383 Obsoletes:      crossmingw32-gcc-g77
384
385 %description fortran
386 crossmingw32 is a complete cross-compiling development system for
387 building stand-alone Microsoft Windows applications under Linux using
388 the MinGW32 build libraries. This includes a binutils, gcc with g++
389 and objc, and libstdc++, all cross targeted to i386-mingw32, along
390 with supporting Win32 libraries in 'coff' format from free sources.
391
392 This package contains cross targeted Fortran compiler.
393
394 %description fortran -l pl.UTF-8
395 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
396 pozwalającym budować aplikacje MS Windows pod Linuksem używając
397 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
398 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
399 z bibliotek w formacie COFF.
400
401 Ten pakiet zawiera kompilator Fortranu generujący kod pod Win32.
402
403 %package -n crossmingw32-libgfortran-static
404 Summary:        Static Fortran library - cross MinGW32 version
405 Summary(pl.UTF-8):      Statyczna biblioteka Fortranu - wersja skrośna MinGW32
406 Group:          Development/Libraries
407 Requires:       %{name}-fortran = %{epoch}:%{version}-%{release}
408
409 %description -n crossmingw32-libgfortran-static
410 Static Fortran library - cross MinGW32 version.
411
412 %description -n crossmingw32-libgfortran-static -l pl.UTF-8
413 Statyczna biblioteka Fortranu - wersja skrośna MinGW32.
414
415 %package -n crossmingw32-libgfortran-dll
416 Summary:        libgfortran DLL library for Windows
417 Summary(pl.UTF-8):      Biblioteka DLL libgfortran dla Windows
418 Group:          Applications/Emulators
419 Requires:       crossmingw32-libquadmath-dll
420
421 %description -n crossmingw32-libgfortran-dll
422 libgfortran DLL library for Windows.
423
424 %description -n crossmingw32-libgfortran-dll -l pl.UTF-8
425 Biblioteka DLL libgfortran dla Windows.
426
427 %package -n crossmingw32-libquadmath
428 Summary:        GCC __float128 support library - cross MinGW32 version
429 Summary(pl.UTF-8):      Biblioteka do obsługi typu __float128 - wersja skrośna MinGW32
430 License:        GPL v2+ with linking exception
431 Group:          Development/Libraries
432 Requires:       %{name} = %{epoch}:%{version}-%{release}
433
434 %description -n crossmingw32-libquadmath
435 This package contains cross MinGW32 version of GCC support library
436 which is needed for __float128 math support and for Fortran REAL*16
437 support.
438
439 %description -n crossmingw32-libquadmath -l pl.UTF-8
440 Ten pakiet zawiera wersję skrośną MinGW32 biblioteki GCC do obsługi
441 operacji matematycznych na zmiennych typu __float128 oraz typu REAL*16
442 w Fortranie.
443
444 %package -n crossmingw32-libquadmath-static
445 Summary:        Static GCC __float128 support library - cross MinGW32 version
446 Summary(pl.UTF-8):      Biblioteka statyczna GCC do obsługi typu __float128 - wersja skrośna MinGW32
447 License:        GPL v2+ with linking exception
448 Group:          Development/Libraries
449 Requires:       crossmingw32-libquadmath = %{epoch}:%{version}-%{release}
450
451 %description -n crossmingw32-libquadmath-static
452 Static GCC __float128 support library - cross MinGW32 version.
453
454 %description -n crossmingw32-libquadmath-static -l pl.UTF-8
455 Biblioteka statyczna GCC do obsługi typu __float128 - wersja skrośna
456 MinGW32.
457
458 %package -n crossmingw32-libquadmath-dll
459 Summary:        DLL GCC __float128 support library for Windows
460 Summary(pl.UTF-8):      Biblioteka DLL GCC do obsługi typu __float128 dla Windows
461 License:        GPL v2+ with linking exception
462 Group:          Applications/Emulators
463 Requires:       wine
464
465 %description -n crossmingw32-libquadmath-dll
466 DLL GCC __float128 support library for Windows.
467
468 %description -n crossmingw32-libquadmath-dll -l pl.UTF-8
469 Biblioteka DLL GCC do obsługi typu __float128 dla Windows.
470
471 %prep
472 %setup -q -n gcc-%{version}
473 #patch100 -p0
474 %patch0 -p1
475 %patch2 -p1
476 %patch3 -p1
477 %patch4 -p1
478
479 %if %{with bootstrap}
480 # note: "winsup" dirs are special, handled by gcc's configure
481 install -d winsup/{mingw,w32api}
482 tar xf %{SOURCE1} -C winsup/w32api
483 tar xf %{SOURCE2} -C winsup/mingw
484 %endif
485
486 # override snapshot version.
487 echo %{version} > gcc/BASE-VER
488 echo "release" > gcc/DEV-PHASE
489
490 %build
491 cd libvtv
492 %{__aclocal} -I .. -I ../config
493 %{__autoconf}
494 %{__automake}
495 cd ..
496
497 rm -rf builddir && install -d builddir && cd builddir
498 %if %{with bootstrap}
499 install -d %{target}/winsup
500 ln -sf ../../../winsup/mingw/lib %{target}/winsup/mingw
501 ln -sf ../../../winsup/w32api %{target}/winsup/w32api
502 WINSUPDIR=$(cd ..; pwd)/winsup
503 %endif
504
505 # note: libbacktrace requires at least i486 now
506 CC="%{__cc}" \
507 CFLAGS="%{rpmcflags}" \
508 CXXFLAGS="%{rpmcxxflags}" \
509 TEXCONFIG=false \
510 CFLAGS_FOR_TARGET="-O2 -march=i486" \
511 CXXFLAGS_FOR_TARGET="-O2 -march=i486" \
512 ../configure \
513         --prefix=%{sysprefix} \
514         --bindir=%{archbindir} \
515         --libdir=%{_libdir} \
516         --includedir=%{archincludedir} \
517         --libexecdir=%{_libdir} \
518         --infodir=%{_infodir} \
519         --mandir=%{_mandir} \
520         --with-bugurl="http://bugs.pld-linux.org" \
521         --with-build-time-tools=%{archbindir} \
522         %{!?with_bootstrap:--with-headers=%{archincludedir}} \
523         --with-libs=%{!?with_bootstrap:%{archlibdir}}%{?with_bootstrap:${WINSUPDIR}/mingw/lib} \
524         --with-demangler-in-ld \
525         --with-dwarf2 \
526         --with-gnu-as \
527         --with-gnu-ld \
528         --with-long-double-128 \
529         --with-pkgversion="PLD-Linux" \
530         --enable-c99 \
531         --enable-fully-dynamic-string \
532         --disable-isl-version-check \
533         --enable-languages="c,c++,fortran,objc,obj-c++" \
534         --disable-libcc1 \
535         --enable-libgomp%{!?with_gomp:=no} \
536         --disable-libssp \
537         --enable-libstdcxx-allocator=new \
538         --enable-linker-build-id \
539         --enable-long-long \
540         --enable-lto \
541         --disable-multilib \
542         --disable-nls \
543         --enable-shared \
544         --disable-sjlj-exceptions \
545         --disable-symvers \
546         --enable-threads \
547         --disable-werror \
548         --disable-win32-registry \
549         --target=%{target}
550
551 cd ..
552 %{__make} -C builddir all-host
553 patch -p1 <%{PATCH1}
554 %{__make} -C builddir
555
556 %install
557 rm -rf $RPM_BUILD_ROOT
558 install -d $RPM_BUILD_ROOT%{_bindir}
559
560 %{__make} -C builddir install \
561         DESTDIR=$RPM_BUILD_ROOT
562
563 %{__mv} $RPM_BUILD_ROOT%{gcclibdir}/include-fixed/{limits,syslimits}.h $RPM_BUILD_ROOT%{gcclibdir}/include
564 %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/include-fixed
565 %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/install-tools
566
567 # these must be symlinks: gcclibdir is calculated relatively to real binary path
568 ln -sf %{archbindir}/%{target}-gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
569 ln -sf %{archbindir}/%{target}-g++ $RPM_BUILD_ROOT%{_bindir}/%{target}-g++
570 ln -sf %{archbindir}/%{target}-cpp $RPM_BUILD_ROOT%{_bindir}/%{target}-cpp
571 ln -sf %{archbindir}/%{target}-gcov $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov
572 ln -sf %{archbindir}/%{target}-gcov-dump $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov-dump
573 ln -sf %{archbindir}/%{target}-gcov-tool $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov-tool
574 ln -sf %{archbindir}/%{target}-gfortran $RPM_BUILD_ROOT%{_bindir}/%{target}-gfortran
575
576 # DLLs
577 install -d $RPM_BUILD_ROOT%{_dlldir}
578 %{__mv} $RPM_BUILD_ROOT%{archlibdir}/*.dll $RPM_BUILD_ROOT%{_dlldir}
579 if [ ! -f $RPM_BUILD_ROOT%{_dlldir}/libgcc_s_dw2-1.dll ]; then
580         echo "libgcc DLL not installed?"
581         install builddir/i386-mingw32/libgcc/shlib/libgcc_s_dw2-1.dll $RPM_BUILD_ROOT%{_dlldir}
582 fi
583
584 %if 0%{!?debug:1}
585 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
586 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{archlibdir}/lib*.a
587 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{gcclibdir}/lib*.a
588 %endif
589
590 # avoid -L poisoning in *.la
591 for f in libatomic.la libgfortran.la libobjc.la libquadmath.la %{?with_gomp:libgomp.la} ; do
592         file="$RPM_BUILD_ROOT%{archlibdir}/$f"
593         %{__perl} %{SOURCE3} "$file" %{gcclibdir} >"${file}.fixed"
594         %{__mv} "${file}.fixed" "$file"
595 done
596 for f in libcaf_single.la ; do
597         file="$RPM_BUILD_ROOT%{gcclibdir}/$f"
598         %{__perl} %{SOURCE3} "$file" %{gcclibdir} >"${file}.fixed"
599         %{__mv} "${file}.fixed" "$file"
600 done
601
602 # for pretty-printers see native gcc
603 %{__rm} $RPM_BUILD_ROOT%{archlibdir}/libstdc++.dll.a-gdb.py
604 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/gcc-%{version}/python/libstdcxx
605 # no plugin development for mingw32 (at least for now)
606 %{__rm} $RPM_BUILD_ROOT%{gcclibdir}/liblto_plugin.la
607 %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/plugin
608 # already in native gcc
609 %{__rm} -r $RPM_BUILD_ROOT%{_infodir}
610 # common FSF man pages
611 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man7/{fsf-funding,gfdl,gpl}.7
612
613 %clean
614 rm -rf $RPM_BUILD_ROOT
615
616 %files
617 %defattr(644,root,root,755)
618 %attr(755,root,root) %{_bindir}/%{target}-gcc
619 %attr(755,root,root) %{_bindir}/%{target}-cpp
620 %attr(755,root,root) %{_bindir}/%{target}-gcov
621 %attr(755,root,root) %{_bindir}/%{target}-gcov-dump
622 %attr(755,root,root) %{_bindir}/%{target}-gcov-tool
623 %attr(755,root,root) %{archbindir}/%{target}-cpp
624 %attr(755,root,root) %{archbindir}/%{target}-gcc
625 %attr(755,root,root) %{archbindir}/%{target}-gcc-%{version}
626 %attr(755,root,root) %{archbindir}/%{target}-gcc-ar
627 %attr(755,root,root) %{archbindir}/%{target}-gcc-nm
628 %attr(755,root,root) %{archbindir}/%{target}-gcc-ranlib
629 %attr(755,root,root) %{archbindir}/%{target}-gcov
630 %attr(755,root,root) %{archbindir}/%{target}-gcov-dump
631 %attr(755,root,root) %{archbindir}/%{target}-gcov-tool
632 %{archlibdir}/libgcc_s.a
633 %dir %{gccarchdir}
634 %dir %{gcclibdir}
635 %attr(755,root,root) %{gcclibdir}/cc1
636 %attr(755,root,root) %{gcclibdir}/collect2
637 %attr(755,root,root) %{gcclibdir}/lto-wrapper
638 %attr(755,root,root) %{gcclibdir}/lto1
639 %attr(755,root,root) %{gcclibdir}/liblto_plugin.so*
640 %{gcclibdir}/libgcc.a
641 %{gcclibdir}/libgcc_eh.a
642 %{gcclibdir}/libgcov.a
643 %{gcclibdir}/crtbegin.o
644 %{gcclibdir}/crtend.o
645 %{gcclibdir}/crtfastmath.o
646 %dir %{gcclibdir}/include
647 %{gcclibdir}/include/*.h
648 %{_mandir}/man1/%{target}-cpp.1*
649 %{_mandir}/man1/%{target}-gcc.1*
650 %{_mandir}/man1/%{target}-gcov.1*
651 %{_mandir}/man1/%{target}-gcov-dump.1*
652 %{_mandir}/man1/%{target}-gcov-tool.1*
653
654 %files -n crossmingw32-libgcc-dll
655 %defattr(644,root,root,755)
656 %{_dlldir}/libgcc_s_dw2-1.dll
657
658 %files -n crossmingw32-libatomic
659 %defattr(644,root,root,755)
660 %{archlibdir}/libatomic.dll.a
661 %{archlibdir}/libatomic.la
662
663 %files -n crossmingw32-libatomic-static
664 %defattr(644,root,root,755)
665 %{archlibdir}/libatomic.a
666
667 %files -n crossmingw32-libatomic-dll
668 %defattr(644,root,root,755)
669 %{_dlldir}/libatomic-1.dll
670
671 %if %{with gomp}
672 %files -n crossmingw32-libgomp
673 %defattr(644,root,root,755)
674 %{archlibdir}/libgomp.dll.a
675 %{archlibdir}/libgomp.la
676 %{archlibdir}/libgomp.spec
677
678 %files -n crossmingw32-libgomp-static
679 %defattr(644,root,root,755)
680 %{archlibdir}/libgomp.a
681
682 %files -n crossmingw32-libgomp-dll
683 %defattr(644,root,root,755)
684 %{_dlldir}/libgomp-1.dll
685 %endif
686
687 %files -n crossmingw32-libvtv
688 %defattr(644,root,root,755)
689 %{archlibdir}/libvtv.dll.a
690 %{archlibdir}/libvtv.la
691 %{archlibdir}/libvtv_stubs.dll.a
692 %{archlibdir}/libvtv_stubs.la
693
694 %files -n crossmingw32-libvtv-static
695 %defattr(644,root,root,755)
696 %{archlibdir}/libvtv.a
697 %{archlibdir}/libvtv_stubs.a
698
699 %files -n crossmingw32-libvtv-dll
700 %defattr(644,root,root,755)
701 %{_dlldir}/libvtv-0.dll
702 %{_dlldir}/libvtv_stubs-0.dll
703
704 %files c++
705 %defattr(644,root,root,755)
706 %attr(755,root,root) %{_bindir}/%{target}-g++
707 %attr(755,root,root) %{archbindir}/%{target}-c++
708 %attr(755,root,root) %{archbindir}/%{target}-g++
709 %attr(755,root,root) %{gcclibdir}/cc1plus
710 %{archlibdir}/libstdc++.dll.a
711 %{archlibdir}/libstdc++.la
712 %{archlibdir}/libsupc++.la
713 %{archlibdir}/libsupc++.a
714 %{archincludedir}/c++
715 %{_mandir}/man1/%{target}-g++.1*
716
717 %files -n crossmingw32-libstdc++-static
718 %defattr(644,root,root,755)
719 %{archlibdir}/libstdc++.a
720
721 %files -n crossmingw32-libstdc++-dll
722 %defattr(644,root,root,755)
723 %{_dlldir}/libstdc++-6.dll
724
725 %files objc
726 %defattr(644,root,root,755)
727 %doc libobjc/README
728 %attr(755,root,root) %{gcclibdir}/cc1obj
729 %{archlibdir}/libobjc.dll.a
730 %{archlibdir}/libobjc.la
731 %{gcclibdir}/include/objc
732
733 %files objc++
734 %defattr(644,root,root,755)
735 %doc gcc/objcp/ChangeLog
736 %attr(755,root,root) %{gcclibdir}/cc1objplus
737
738 %files -n crossmingw32-libobjc-static
739 %defattr(644,root,root,755)
740 %{archlibdir}/libobjc.a
741
742 %files -n crossmingw32-libobjc-dll
743 %defattr(644,root,root,755)
744 %{_dlldir}/libobjc-4.dll
745
746 %files fortran
747 %defattr(644,root,root,755)
748 %attr(755,root,root) %{_bindir}/%{target}-gfortran
749 %attr(755,root,root) %{archbindir}/%{target}-gfortran
750 %attr(755,root,root) %{gcclibdir}/f951
751 %{archlibdir}/libgfortran.dll.a
752 %{archlibdir}/libgfortran.la
753 %{archlibdir}/libgfortran.spec
754 %{gcclibdir}/finclude
755 %{gcclibdir}/libcaf_single.a
756 %{gcclibdir}/libcaf_single.la
757 %{_mandir}/man1/%{target}-gfortran.1*
758
759 %files -n crossmingw32-libgfortran-static
760 %defattr(644,root,root,755)
761 %{archlibdir}/libgfortran.a
762
763 %files -n crossmingw32-libgfortran-dll
764 %defattr(644,root,root,755)
765 %{_dlldir}/libgfortran-4.dll
766
767 %files -n crossmingw32-libquadmath
768 %defattr(644,root,root,755)
769 %{archlibdir}/libquadmath.dll.a
770 %{archlibdir}/libquadmath.la
771
772 %files -n crossmingw32-libquadmath-static
773 %defattr(644,root,root,755)
774 %{archlibdir}/libquadmath.a
775
776 %files -n crossmingw32-libquadmath-dll
777 %defattr(644,root,root,755)
778 %{_dlldir}/libquadmath-0.dll
This page took 0.130595 seconds and 2 git commands to generate.