3 %bcond_with bootstrap # bootstrap build (using binary w32api/mingwrt, only C/C++, no gomp)
4 %bcond_without pthreads # POSIX threads support (needed for GOMP and C++ 11 thread/mutex support)
5 %bcond_without gomp # OpenMP libraries
8 %undefine with_pthreads
10 %if %{without pthreads}
13 Summary: Cross MinGW32 GNU binary utility development utilities - gcc
14 Summary(es.UTF-8): Utilitarios para desarrollo de binarios de la GNU - MinGW32 gcc
15 Summary(fr.UTF-8): Utilitaires de développement binaire de GNU - MinGW32 gcc
16 Summary(pl.UTF-8): Skrośne narzędzia programistyczne GNU dla MinGW32 - gcc
17 Summary(pt_BR.UTF-8): Utilitários para desenvolvimento de binários da GNU - MinGW32 gcc
18 Summary(tr.UTF-8): GNU geliştirme araçları - MinGW32 gcc
19 Name: crossmingw32-gcc
24 Group: Development/Languages
25 Source0: https://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-%{version}.tar.xz
26 # Source0-md5: c7d1958570fbd1cd859b015774b9987a
27 %define w32api_ver 5.4.2
28 #Source1Download: https://osdn.net/projects/mingw/releases/
29 Source1: https://osdn.net/projects/mingw/downloads/74926/w32api-%{w32api_ver}-mingw32-dev.tar.xz
30 # Source1-md5: 88b0dc6185079e60d83bdbaec92028b8
31 %define mingw32_ver 5.4.2
32 #Source2Download: https://osdn.net/projects/mingw/releases/
33 Source2: https://osdn.net/projects/mingw/downloads/74925/mingwrt-%{mingw32_ver}-mingw32-dev.tar.xz
34 # Source2-md5: d8dceb05b85602eec82eac4e11d5c027
35 Source3: gcc-optimize-la.pl
36 #Patch100: gcc-branch.diff
37 Patch0: %{name}-buildsystem1.patch
38 Patch1: %{name}-buildsystem2.patch
39 Patch2: %{name}-lfs.patch
40 Patch3: gcc-mingw32.patch
41 Patch4: gcc-build-libvtv.patch
42 Patch5: gcc-pthreads-w32.patch
43 URL: http://gcc.gnu.org/
44 BuildRequires: autoconf >= 2.64
45 BuildRequires: automake >= 1:1.11.1
47 BuildRequires: crossmingw32-binutils >= 2.30
48 %{?with_pthreads:BuildRequires: crossmingw32-pthreads-w32}
49 %if %{without bootstrap}
50 BuildRequires: crossmingw32-runtime >= 3.5
51 BuildRequires: crossmingw32-w32api >= 1:5.4.2-3
53 BuildRequires: flex >= 2.5.4
54 BuildRequires: gettext-tools >= 0.14.5
55 BuildRequires: gmp-devel >= 4.3.2
56 BuildRequires: isl-devel >= 0.15
57 BuildRequires: libmpc-devel >= 0.8.1
58 BuildRequires: libstdc++-devel
59 BuildRequires: mpfr-devel >= 3.1.0
60 BuildRequires: perl-tools-pod
61 BuildRequires: tar >= 1:1.22
62 BuildRequires: texinfo >= 4.7
64 BuildRequires: zlib-devel
65 BuildConflicts: pdksh < 5.2.14-50
66 Requires: crossmingw32-binutils >= 2.30
68 Requires: gmp >= 4.3.2
70 Requires: libmpc >= 0.8.1
71 Requires: mpfr >= 3.1.0
72 # java support dropped from gcc 7+
73 Obsoletes: crossmingw32-java < 1:7
74 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
76 %define target i386-mingw32
77 %define sysprefix /usr
78 %define archprefix %{sysprefix}/%{target}
79 %define archbindir %{archprefix}/bin
80 %define archincludedir %{archprefix}/include
81 %define archlibdir %{archprefix}/lib
82 %define gccarchdir %{_libdir}/gcc/%{target}
83 %define gcclibdir %{gccarchdir}/%{version}
84 %define _dlldir /usr/share/wine/windows/system
86 %define _noautostrip .*/lib.*\\.a
88 %define _enable_debug_packages 0
90 # functions with printf format attribute but with special parser and also
91 # receiving non constant format strings
92 %define Werror_cflags %{nil}
93 %define _ssp_cflags %{nil}
94 # -fPIC is not valid for target platform
95 %define filterout_c -fPIC
98 crossmingw32 is a complete cross-compiling development system for
99 building stand-alone Microsoft Windows applications under Linux using
100 the MinGW32 build libraries. This includes a binutils, gcc with g++
101 and objc, and libstdc++, all cross targeted to i386-mingw32, along
102 with supporting Win32 libraries in 'coff' format from free sources.
104 This package contains cross targeted gcc.
106 %description -l de.UTF-8
107 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
108 anderem Rechner Code für Win32 zu generieren.
110 %description -l pl.UTF-8
111 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
112 pozwalającym budować aplikacje MS Windows pod Linuksem używając
113 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
114 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
115 z bibliotek w formacie COFF.
117 Ten pakiet zawiera gcc generujące skrośnie kod dla Win32.
119 %package -n crossmingw32-libgcc-dll
120 Summary: libgcc DLL library for Windows
121 Summary(pl.UTF-8): Biblioteka DLL libgcc dla Windows
122 Group: Applications/Emulators
125 %description -n crossmingw32-libgcc-dll
126 libgcc DLL library for Windows.
128 %description -n crossmingw32-libgcc-dll -l pl.UTF-8
129 Biblioteka DLL libgcc dla Windows.
131 %package -n crossmingw32-libatomic
132 Summary: The GNU Atomic library - cross MinGW32 version
133 Summary(pl.UTF-8): Biblioteka GNU Atomic - wersja skrośna MinGW32
134 License: GPL v3+ with GCC Runtime Library Exception v3.1
135 Group: Development/Libraries
136 Requires: %{name} = %{epoch}:%{version}-%{release}
138 %description -n crossmingw32-libatomic
139 This package contains cross MinGW32 version of the GNU Atomic library
140 which is a GCC support library for atomic operations not supported by
143 %description -n crossmingw32-libatomic -l pl.UTF-8
144 Ten pakiet zawiera wersję skrośną MinGW32 biblioteki GNU Atomic,
145 będącej biblioteką GCC, wspierającej operacje atomowe na sprzęcie ich
148 %package -n crossmingw32-libatomic-static
149 Summary: The GNU Atomic static library - cross MinGW32 version
150 Summary(pl.UTF-8): Statyczna biblioteka GNU Atomic - wersja skrośna MinGW32
151 License: GPL v3+ with GCC Runtime Library Exception v3.1
152 Group: Development/Libraries
153 Requires: crossmingw32-libatomic = %{epoch}:%{version}-%{release}
155 %description -n crossmingw32-libatomic-static
156 The GNU Atomic static library - cross MinGW32 version.
158 %description -n crossmingw32-libatomic-static -l pl.UTF-8
159 Statyczna biblioteka GNU Atomic - wersja skrośna MinGW32.
161 %package -n crossmingw32-libatomic-dll
162 Summary: DLL GNU Atomic library for Windows
163 Summary(pl.UTF-8): Biblioteka DLL GNU Atomic dla Windows
164 License: GPL v3+ with GCC Runtime Library Exception v3.1
165 Group: Applications/Emulators
168 %description -n crossmingw32-libatomic-dll
169 DLL GNU Atomic library for Windows.
171 %description -n crossmingw32-libatomic-dll -l pl.UTF-8
172 Biblioteka DLL GNU Atomic dla Windows.
174 %package -n crossmingw32-libgomp
175 Summary: GNU OpenMP library - cross MinGW32 version
176 Summary(pl.UTF-8): Biblioteka GNU OpenMP - wersja skrośna MinGW32
177 License: GPL v3+ with GCC Runtime Library Exception v3.1
178 Group: Development/Libraries
179 Requires: %{name} = %{epoch}:%{version}-%{release}
181 %description -n crossmingw32-libgomp
182 This package contains cross MinGW32 version of GNU OpenMP library.
184 %description -n crossmingw32-libgomp -l pl.UTF-8
185 Ten pakiet zawiera wersję skrośną MinGW32 biblioteki GNU OpenMP.
187 %package -n crossmingw32-libgomp-static
188 Summary: Static GNU OpenMP library - cross MinGW32 version
189 Summary(pl.UTF-8): Statyczna biblioteka GNU OpenMP - wersja skrośna MinGW32
190 License: GPL v3+ with GCC Runtime Library Exception v3.1
191 Group: Development/Libraries
192 Requires: crossmingw32-libgomp = %{epoch}:%{version}-%{release}
194 %description -n crossmingw32-libgomp-static
195 Static GNU OpenMP library - cross MinGW32 version.
197 %description -n crossmingw32-libgomp-static -l pl.UTF-8
198 Statyczna biblioteka GNU OpenMP - wersja skrośna MinGW32.
200 %package -n crossmingw32-libgomp-dll
201 Summary: DLL GNU OpenMP library for Windows
202 Summary(pl.UTF-8): Biblioteka DLL GNU OpenMP dla Windows
203 License: GPL v3+ with GCC Runtime Library Exception v3.1
204 Group: Applications/Emulators
205 Requires: crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release}
206 Requires: crossmingw32-pthreads-w32-dll
208 %description -n crossmingw32-libgomp-dll
209 DLL GNU OpenMP library for Windows.
211 %description -n crossmingw32-libgomp-dll -l pl.UTF-8
212 Biblioteka DLL GNU OpenMP dla Windows.
214 %package -n crossmingw32-libvtv
215 Summary: The Virtual Table Verification library - cross MinGW32 version
216 Summary(pl.UTF-8): Biblioteka Virtual Table Verification do weryfikacji tablicy wirtualnej - wersja skrośna MinGW32
217 License: GPL v3+ with GCC Runtime Library Exception v3.1
218 Group: Development/Libraries
219 URL: https://gcc.gnu.org/wiki/vtv
220 Requires: %{name} = %{epoch}:%{version}-%{release}
222 %description -n crossmingw32-libvtv
223 This package contains cross MinGW32 version of the Virtual Table
224 Verification library which is used for -fvtable-verify=...
225 instrumented programs.
227 %description -n crossmingw32-libvtv -l pl.UTF-8
228 Ten pakiet zawiera wersję skrośną MinGW32 biblioteki Virtual Table
229 Verification, służącej do weryfikacji tablicy wirtualnej w programach
230 kompilowanych z opcją -fvtable-verify=....
232 %package -n crossmingw32-libvtv-static
233 Summary: The Virtual Table Verification static library - cross MinGW32 version
234 Summary(pl.UTF-8): Statyczna biblioteka Virtual Table Verification - wersja skrośna MinGW32
235 License: GPL v3+ with GCC Runtime Library Exception v3.1
236 Group: Development/Libraries
237 URL: https://gcc.gnu.org/wiki/vtv
238 Requires: crossmingw32-libvtv = %{epoch}:%{version}-%{release}
240 %description -n crossmingw32-libvtv-static
241 The Virtual Table Verification static library - cross MinGW32 version.
243 %description -n crossmingw32-libvtv-static -l pl.UTF-8
244 Statyczna biblioteka Virtual Table Verification - wersja skrośna
247 %package -n crossmingw32-libvtv-dll
248 Summary: DLL Virtual Table Verification libraries for Windows
249 Summary(pl.UTF-8): Biblioteki DLL Virtual Table Verification dla Windows
250 License: GPL v3+ with GCC Runtime Library Exception v3.1
251 Group: Applications/Emulators
252 URL: https://gcc.gnu.org/wiki/vtv
253 Requires: crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release}
255 %description -n crossmingw32-libvtv-dll
256 DLL Virtual Table Verification libraries for Windows.
258 %description -n crossmingw32-libvtv-dll -l pl.UTF-8
259 Biblioteki DLL Virtual Table Verification dla Windows.
262 Summary: MinGW32 binary utility development utilities - g++
263 Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - g++
264 Group: Development/Languages
265 Requires: %{name} = %{epoch}:%{version}-%{release}
268 crossmingw32 is a complete cross-compiling development system for
269 building stand-alone Microsoft Windows applications under Linux using
270 the MinGW32 build libraries. This includes a binutils, gcc with g++
271 and objc, and libstdc++, all cross targeted to i386-mingw32, along
272 with supporting Win32 libraries in 'coff' format from free sources.
274 This package contains cross targeted g++ and (static) libstdc++.
276 %description c++ -l pl.UTF-8
277 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
278 pozwalającym budować aplikacje MS Windows pod Linuksem używając
279 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
280 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
281 z bibliotek w formacie COFF.
283 Ten pakiet zawiera g++ generujące kod pod Win32 oraz bibliotekę
286 %package -n crossmingw32-libstdc++-static
287 Summary: Static standard C++ library - cross MinGW32 version
288 Summary(pl.UTF-8): Statyczna biblioteka standardowa C++ - wersja skrośna MinGW32
289 Group: Development/Libraries
290 Requires: %{name}-c++ = %{epoch}:%{version}-%{release}
292 %description -n crossmingw32-libstdc++-static
293 Static standard C++ library - cross MinGW32 version.
295 %description -n crossmingw32-libstdc++-static -l pl.UTF-8
296 Statyczna biblioteka standardowa C++ - wersja skrośna MinGW32.
298 %package -n crossmingw32-libstdc++-dll
299 Summary: libstdc++ DLL library for Windows
300 Summary(pl.UTF-8): Biblioteka DLL libstdc++ dla Windows
301 Group: Applications/Emulators
302 Requires: crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release}
305 %description -n crossmingw32-libstdc++-dll
306 libstdc++ DLL library for Windows.
308 %description -n crossmingw32-libstdc++-dll -l pl.UTF-8
309 Biblioteka DLL libstdc++ dla Windows.
312 Summary: MinGW32 binary utility development utilities - objc
313 Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - objc
314 Group: Development/Languages
315 Requires: %{name} = %{epoch}:%{version}-%{release}
318 crossmingw32 is a complete cross-compiling development system for
319 building stand-alone Microsoft Windows applications under Linux using
320 the MinGW32 build libraries. This includes a binutils, gcc with g++
321 and objc, and libstdc++, all cross targeted to i386-mingw32, along
322 with supporting Win32 libraries in 'coff' format from free sources.
324 This package contains cross targeted objc compiler.
326 %description objc -l pl.UTF-8
327 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
328 pozwalającym budować aplikacje MS Windows pod Linuksem używając
329 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
330 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
331 z bibliotek w formacie COFF.
333 Ten pakiet zawiera kompilator objc generujący kod pod Win32.
336 Summary: MinGW32 binary utility development utilities - objc++
337 Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - objc++
338 Group: Development/Languages
339 Requires: %{name}-objc = %{epoch}:%{version}-%{release}
342 crossmingw32 is a complete cross-compiling development system for
343 building stand-alone Microsoft Windows applications under Linux using
344 the MinGW32 build libraries. This includes a binutils, gcc with g++
345 and objc, and libstdc++, all cross targeted to i386-mingw32, along
346 with supporting Win32 libraries in 'coff' format from free sources.
348 This package contains Objective C++ support.
350 %description objc++ -l pl.UTF-8
351 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
352 pozwalającym budować aplikacje MS Windows pod Linuksem używając
353 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
354 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
355 z bibliotek w formacie COFF.
357 Ten pakiet zawiera obsługę języka Objective C++.
359 %package -n crossmingw32-libobjc-static
360 Summary: Static Objective C library - cross MinGW32 version
361 Summary(pl.UTF-8): Statyczna biblioteka Objective C - wersja skrośna MinGW32
362 Group: Development/Libraries
363 Requires: %{name}-objc = %{epoch}:%{version}-%{release}
365 %description -n crossmingw32-libobjc-static
366 Static Objective C library - cross MinGW32 version.
368 %description -n crossmingw32-libobjc-static -l pl.UTF-8
369 Statyczna biblioteka Objective C - wersja skrośna MinGW32.
371 %package -n crossmingw32-libobjc-dll
372 Summary: libobjc DLL library for Windows
373 Summary(pl.UTF-8): Biblioteka DLL libobjc dla Windows
374 Group: Applications/Emulators
375 Requires: crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release}
378 %description -n crossmingw32-libobjc-dll
379 libobjc DLL library for Windows.
381 %description -n crossmingw32-libobjc-dll -l pl.UTF-8
382 Biblioteka DLL libobjc dla Windows.
385 Summary: MinGW32 binary utility development utilities - Fortran
386 Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - Fortran
387 Group: Development/Languages
388 Requires: %{name} = %{epoch}:%{version}-%{release}
389 Requires: crossmingw32-libquadmath = %{epoch}:%{version}-%{release}
390 Obsoletes: crossmingw32-gcc-g77 < 1:4
393 crossmingw32 is a complete cross-compiling development system for
394 building stand-alone Microsoft Windows applications under Linux using
395 the MinGW32 build libraries. This includes a binutils, gcc with g++
396 and objc, and libstdc++, all cross targeted to i386-mingw32, along
397 with supporting Win32 libraries in 'coff' format from free sources.
399 This package contains cross targeted Fortran compiler.
401 %description fortran -l pl.UTF-8
402 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
403 pozwalającym budować aplikacje MS Windows pod Linuksem używając
404 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
405 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
406 z bibliotek w formacie COFF.
408 Ten pakiet zawiera kompilator Fortranu generujący kod pod Win32.
410 %package -n crossmingw32-libgfortran-static
411 Summary: Static Fortran library - cross MinGW32 version
412 Summary(pl.UTF-8): Statyczna biblioteka Fortranu - wersja skrośna MinGW32
413 Group: Development/Libraries
414 Requires: %{name}-fortran = %{epoch}:%{version}-%{release}
416 %description -n crossmingw32-libgfortran-static
417 Static Fortran library - cross MinGW32 version.
419 %description -n crossmingw32-libgfortran-static -l pl.UTF-8
420 Statyczna biblioteka Fortranu - wersja skrośna MinGW32.
422 %package -n crossmingw32-libgfortran-dll
423 Summary: libgfortran DLL library for Windows
424 Summary(pl.UTF-8): Biblioteka DLL libgfortran dla Windows
425 Group: Applications/Emulators
426 Requires: crossmingw32-libquadmath-dll
428 %description -n crossmingw32-libgfortran-dll
429 libgfortran DLL library for Windows.
431 %description -n crossmingw32-libgfortran-dll -l pl.UTF-8
432 Biblioteka DLL libgfortran dla Windows.
434 %package -n crossmingw32-libquadmath
435 Summary: GCC __float128 support library - cross MinGW32 version
436 Summary(pl.UTF-8): Biblioteka do obsługi typu __float128 - wersja skrośna MinGW32
437 License: GPL v2+ with linking exception
438 Group: Development/Libraries
439 Requires: %{name} = %{epoch}:%{version}-%{release}
441 %description -n crossmingw32-libquadmath
442 This package contains cross MinGW32 version of GCC support library
443 which is needed for __float128 math support and for Fortran REAL*16
446 %description -n crossmingw32-libquadmath -l pl.UTF-8
447 Ten pakiet zawiera wersję skrośną MinGW32 biblioteki GCC do obsługi
448 operacji matematycznych na zmiennych typu __float128 oraz typu REAL*16
451 %package -n crossmingw32-libquadmath-static
452 Summary: Static GCC __float128 support library - cross MinGW32 version
453 Summary(pl.UTF-8): Biblioteka statyczna GCC do obsługi typu __float128 - wersja skrośna MinGW32
454 License: GPL v2+ with linking exception
455 Group: Development/Libraries
456 Requires: crossmingw32-libquadmath = %{epoch}:%{version}-%{release}
458 %description -n crossmingw32-libquadmath-static
459 Static GCC __float128 support library - cross MinGW32 version.
461 %description -n crossmingw32-libquadmath-static -l pl.UTF-8
462 Biblioteka statyczna GCC do obsługi typu __float128 - wersja skrośna
465 %package -n crossmingw32-libquadmath-dll
466 Summary: DLL GCC __float128 support library for Windows
467 Summary(pl.UTF-8): Biblioteka DLL GCC do obsługi typu __float128 dla Windows
468 License: GPL v2+ with linking exception
469 Group: Applications/Emulators
472 %description -n crossmingw32-libquadmath-dll
473 DLL GCC __float128 support library for Windows.
475 %description -n crossmingw32-libquadmath-dll -l pl.UTF-8
476 Biblioteka DLL GCC do obsługi typu __float128 dla Windows.
479 %setup -q -n gcc-%{version}
487 %if %{with bootstrap}
488 # note: "winsup" dirs are special, handled by gcc's configure
489 install -d winsup/{mingw,w32api}
490 tar xf %{SOURCE1} -C winsup/w32api
491 tar xf %{SOURCE2} -C winsup/mingw
492 # required by _mingw.h
493 touch winsup/mingw/include/features.h
496 # override snapshot version.
497 echo %{version} > gcc/BASE-VER
498 echo "release" > gcc/DEV-PHASE
502 %{__aclocal} -I .. -I ../config
507 rm -rf builddir && install -d builddir && cd builddir
508 %if %{with bootstrap}
509 install -d %{target}/winsup
510 ln -sf ../../../winsup/mingw/lib %{target}/winsup/mingw
511 ln -sf ../../../winsup/w32api %{target}/winsup/w32api
512 WINSUPDIR=$(cd ..; pwd)/winsup
515 # note: libbacktrace requires at least i486 now
517 CFLAGS="%{rpmcflags}" \
518 CXXFLAGS="%{rpmcxxflags}" \
520 CFLAGS_FOR_TARGET="-O2 -march=i486" \
521 CXXFLAGS_FOR_TARGET="-O2 -march=i486" \
523 --prefix=%{sysprefix} \
524 --bindir=%{archbindir} \
525 --libdir=%{_libdir} \
526 --includedir=%{archincludedir} \
527 --libexecdir=%{_libdir} \
528 --infodir=%{_infodir} \
529 --mandir=%{_mandir} \
530 --with-bugurl="http://bugs.pld-linux.org" \
531 --with-build-time-tools=%{archbindir} \
532 %{!?with_bootstrap:--with-headers=%{archincludedir}} \
533 --with-libs=%{!?with_bootstrap:%{archlibdir}}%{?with_bootstrap:${WINSUPDIR}/mingw/lib} \
534 --with-demangler-in-ld \
538 --with-long-double-128 \
539 --with-pkgversion="PLD-Linux" \
541 --enable-fully-dynamic-string \
542 --disable-isl-version-check \
543 --enable-languages="c,c++%{!?with_bootstrap:,fortran,objc,obj-c++}" \
544 %{?with_bootstrap:--disable-libatomic} \
546 --enable-libgomp%{!?with_gomp:=no} \
547 %{?with_bootstrap:--disable-libquadmath} \
549 --enable-libstdcxx-allocator=new \
550 %{?with_bootstrap:--disable-libvtv} \
551 --enable-linker-build-id \
557 --disable-sjlj-exceptions \
559 --enable-threads%{?with_pthreads:=posix} \
561 --disable-win32-registry \
565 %{__make} -C builddir all-host
567 %{__make} -C builddir
570 rm -rf $RPM_BUILD_ROOT
571 install -d $RPM_BUILD_ROOT%{_bindir}
573 %{__make} -C builddir install \
574 DESTDIR=$RPM_BUILD_ROOT
576 %{__mv} $RPM_BUILD_ROOT%{gcclibdir}/include-fixed/{limits,syslimits}.h $RPM_BUILD_ROOT%{gcclibdir}/include
577 %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/include-fixed
578 %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/install-tools
580 # these must be symlinks: gcclibdir is calculated relatively to real binary path
581 ln -sf %{archbindir}/%{target}-gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
582 ln -sf %{archbindir}/%{target}-g++ $RPM_BUILD_ROOT%{_bindir}/%{target}-g++
583 ln -sf %{archbindir}/%{target}-cpp $RPM_BUILD_ROOT%{_bindir}/%{target}-cpp
584 ln -sf %{archbindir}/%{target}-gcov $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov
585 ln -sf %{archbindir}/%{target}-gcov-dump $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov-dump
586 ln -sf %{archbindir}/%{target}-gcov-tool $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov-tool
587 ln -sf %{archbindir}/%{target}-gfortran $RPM_BUILD_ROOT%{_bindir}/%{target}-gfortran
588 ln -sf %{archbindir}/%{target}-lto-dump $RPM_BUILD_ROOT%{_bindir}/%{target}-lto-dump
591 install -d $RPM_BUILD_ROOT%{_dlldir}
592 %{__mv} $RPM_BUILD_ROOT%{archlibdir}/*.dll $RPM_BUILD_ROOT%{_dlldir}
593 if [ ! -f $RPM_BUILD_ROOT%{_dlldir}/libgcc_s_dw2-1.dll ]; then
594 echo "libgcc DLL not installed?"
595 install builddir/i386-mingw32/libgcc/shlib/libgcc_s_dw2-1.dll $RPM_BUILD_ROOT%{_dlldir}
599 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
600 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{archlibdir}/lib*.a
601 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{gcclibdir}/lib*.a
604 # avoid -L poisoning in *.la
605 %if %{without bootstrap}
606 for f in libatomic.la libgfortran.la libobjc.la libquadmath.la %{?with_gomp:libgomp.la} ; do
607 file="$RPM_BUILD_ROOT%{archlibdir}/$f"
608 %{__perl} %{SOURCE3} "$file" %{gcclibdir} >"${file}.fixed"
609 %{__mv} "${file}.fixed" "$file"
611 for f in libcaf_single.la ; do
612 file="$RPM_BUILD_ROOT%{gcclibdir}/$f"
613 %{__perl} %{SOURCE3} "$file" %{gcclibdir} >"${file}.fixed"
614 %{__mv} "${file}.fixed" "$file"
618 # for pretty-printers see native gcc
619 %{__rm} $RPM_BUILD_ROOT%{archlibdir}/libstdc++.dll.a-gdb.py
620 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/gcc-%{version}/python/libstdcxx
621 # no plugin development for mingw32 (at least for now)
622 %{__rm} $RPM_BUILD_ROOT%{gcclibdir}/liblto_plugin.la
623 %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/plugin
624 # already in native gcc
625 %{__rm} -r $RPM_BUILD_ROOT%{_infodir}
626 # common FSF man pages
627 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man7/{fsf-funding,gfdl,gpl}.7
630 rm -rf $RPM_BUILD_ROOT
633 %defattr(644,root,root,755)
634 %attr(755,root,root) %{_bindir}/%{target}-gcc
635 %attr(755,root,root) %{_bindir}/%{target}-cpp
636 %attr(755,root,root) %{_bindir}/%{target}-gcov
637 %attr(755,root,root) %{_bindir}/%{target}-gcov-dump
638 %attr(755,root,root) %{_bindir}/%{target}-gcov-tool
639 %attr(755,root,root) %{_bindir}/%{target}-lto-dump
640 %attr(755,root,root) %{archbindir}/%{target}-cpp
641 %attr(755,root,root) %{archbindir}/%{target}-gcc
642 %attr(755,root,root) %{archbindir}/%{target}-gcc-%{version}
643 %attr(755,root,root) %{archbindir}/%{target}-gcc-ar
644 %attr(755,root,root) %{archbindir}/%{target}-gcc-nm
645 %attr(755,root,root) %{archbindir}/%{target}-gcc-ranlib
646 %attr(755,root,root) %{archbindir}/%{target}-gcov
647 %attr(755,root,root) %{archbindir}/%{target}-gcov-dump
648 %attr(755,root,root) %{archbindir}/%{target}-gcov-tool
649 %attr(755,root,root) %{archbindir}/%{target}-lto-dump
650 %{archlibdir}/libgcc_s.a
653 %attr(755,root,root) %{gcclibdir}/cc1
654 %attr(755,root,root) %{gcclibdir}/collect2
655 %attr(755,root,root) %{gcclibdir}/lto-wrapper
656 %attr(755,root,root) %{gcclibdir}/lto1
657 %attr(755,root,root) %{gcclibdir}/liblto_plugin.so*
658 %{gcclibdir}/libgcc.a
659 %{gcclibdir}/libgcc_eh.a
660 %{gcclibdir}/libgcov.a
661 %{gcclibdir}/crtbegin.o
662 %{gcclibdir}/crtend.o
663 %{gcclibdir}/crtfastmath.o
664 %dir %{gcclibdir}/include
665 %{gcclibdir}/include/*.h
666 %{_mandir}/man1/%{target}-cpp.1*
667 %{_mandir}/man1/%{target}-gcc.1*
668 %{_mandir}/man1/%{target}-gcov.1*
669 %{_mandir}/man1/%{target}-gcov-dump.1*
670 %{_mandir}/man1/%{target}-gcov-tool.1*
671 %{_mandir}/man1/%{target}-lto-dump.1*
673 %files -n crossmingw32-libgcc-dll
674 %defattr(644,root,root,755)
675 %{_dlldir}/libgcc_s_dw2-1.dll
677 %if %{without bootstrap}
678 %files -n crossmingw32-libatomic
679 %defattr(644,root,root,755)
680 %{archlibdir}/libatomic.dll.a
681 %{archlibdir}/libatomic.la
683 %files -n crossmingw32-libatomic-static
684 %defattr(644,root,root,755)
685 %{archlibdir}/libatomic.a
687 %files -n crossmingw32-libatomic-dll
688 %defattr(644,root,root,755)
689 %{_dlldir}/libatomic-1.dll
693 %files -n crossmingw32-libgomp
694 %defattr(644,root,root,755)
695 %{archlibdir}/libgomp.dll.a
696 %{archlibdir}/libgomp.la
697 %{archlibdir}/libgomp.spec
699 %files -n crossmingw32-libgomp-static
700 %defattr(644,root,root,755)
701 %{archlibdir}/libgomp.a
703 %files -n crossmingw32-libgomp-dll
704 %defattr(644,root,root,755)
705 %{_dlldir}/libgomp-1.dll
708 %if %{without bootstrap}
709 %files -n crossmingw32-libvtv
710 %defattr(644,root,root,755)
711 %{archlibdir}/libvtv.dll.a
712 %{archlibdir}/libvtv.la
713 %{archlibdir}/libvtv_stubs.dll.a
714 %{archlibdir}/libvtv_stubs.la
716 %files -n crossmingw32-libvtv-static
717 %defattr(644,root,root,755)
718 %{archlibdir}/libvtv.a
719 %{archlibdir}/libvtv_stubs.a
721 %files -n crossmingw32-libvtv-dll
722 %defattr(644,root,root,755)
723 %{_dlldir}/libvtv-0.dll
724 %{_dlldir}/libvtv_stubs-0.dll
728 %defattr(644,root,root,755)
729 %attr(755,root,root) %{_bindir}/%{target}-g++
730 %attr(755,root,root) %{archbindir}/%{target}-c++
731 %attr(755,root,root) %{archbindir}/%{target}-g++
732 %attr(755,root,root) %{gcclibdir}/cc1plus
733 %{archlibdir}/libstdc++.dll.a
734 %{archlibdir}/libstdc++.la
735 %{archlibdir}/libstdc++fs.a
736 %{archlibdir}/libstdc++fs.la
737 %{archlibdir}/libsupc++.la
738 %{archlibdir}/libsupc++.a
739 %{archincludedir}/c++
740 %{_mandir}/man1/%{target}-g++.1*
742 %files -n crossmingw32-libstdc++-static
743 %defattr(644,root,root,755)
744 %{archlibdir}/libstdc++.a
746 %files -n crossmingw32-libstdc++-dll
747 %defattr(644,root,root,755)
748 %{_dlldir}/libstdc++-6.dll
750 %if %{without bootstrap}
752 %defattr(644,root,root,755)
754 %attr(755,root,root) %{gcclibdir}/cc1obj
755 %{archlibdir}/libobjc.dll.a
756 %{archlibdir}/libobjc.la
757 %{gcclibdir}/include/objc
760 %defattr(644,root,root,755)
761 %doc gcc/objcp/ChangeLog
762 %attr(755,root,root) %{gcclibdir}/cc1objplus
764 %files -n crossmingw32-libobjc-static
765 %defattr(644,root,root,755)
766 %{archlibdir}/libobjc.a
768 %files -n crossmingw32-libobjc-dll
769 %defattr(644,root,root,755)
770 %{_dlldir}/libobjc-4.dll
773 %defattr(644,root,root,755)
774 %attr(755,root,root) %{_bindir}/%{target}-gfortran
775 %attr(755,root,root) %{archbindir}/%{target}-gfortran
776 %attr(755,root,root) %{gcclibdir}/f951
777 %{archlibdir}/libgfortran.dll.a
778 %{archlibdir}/libgfortran.la
779 %{archlibdir}/libgfortran.spec
780 %{gcclibdir}/finclude
781 %{gcclibdir}/libcaf_single.a
782 %{gcclibdir}/libcaf_single.la
783 %{_mandir}/man1/%{target}-gfortran.1*
785 %files -n crossmingw32-libgfortran-static
786 %defattr(644,root,root,755)
787 %{archlibdir}/libgfortran.a
789 %files -n crossmingw32-libgfortran-dll
790 %defattr(644,root,root,755)
791 %{_dlldir}/libgfortran-5.dll
793 %files -n crossmingw32-libquadmath
794 %defattr(644,root,root,755)
795 %{archlibdir}/libquadmath.dll.a
796 %{archlibdir}/libquadmath.la
798 %files -n crossmingw32-libquadmath-static
799 %defattr(644,root,root,755)
800 %{archlibdir}/libquadmath.a
802 %files -n crossmingw32-libquadmath-dll
803 %defattr(644,root,root,755)
804 %{_dlldir}/libquadmath-0.dll