3 %bcond_with bootstrap # bootstrap build (using binary w32api/mingwrt, only C/C++, no gomp)
4 %bcond_without gomp # OpenMP libraries
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
20 Group: Development/Languages
21 Source0: https://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-%{version}.tar.xz
22 # Source0-md5: 0c1f625768840187ef3b10adebe8e3b0
23 %define w32api_ver 5.4.2
24 #Source1Download: https://osdn.net/projects/mingw/releases/
25 Source1: https://osdn.net/projects/mingw/downloads/74926/w32api-%{w32api_ver}-mingw32-dev.tar.xz
26 # Source1-md5: 88b0dc6185079e60d83bdbaec92028b8
27 %define mingw32_ver 5.4.2
28 #Source2Download: https://osdn.net/projects/mingw/releases/
29 Source2: https://osdn.net/projects/mingw/downloads/74925/mingwrt-%{mingw32_ver}-mingw32-dev.tar.xz
30 # Source2-md5: d8dceb05b85602eec82eac4e11d5c027
31 Source3: gcc-optimize-la.pl
32 #Patch100: gcc-branch.diff
33 Patch0: %{name}-buildsystem1.patch
34 Patch1: %{name}-buildsystem2.patch
35 Patch2: %{name}-lfs.patch
36 Patch3: gcc-mingw32.patch
37 Patch4: gcc-build-libvtv.patch
38 URL: http://gcc.gnu.org/
39 BuildRequires: autoconf >= 2.64
40 BuildRequires: automake >= 1:1.11.1
42 BuildRequires: crossmingw32-binutils >= 2.23
43 %{?with_gomp:BuildRequires: crossmingw32-pthreads-w32}
44 %if %{without bootstrap}
45 BuildRequires: crossmingw32-runtime >= 3.5
46 BuildRequires: crossmingw32-w32api >= 3.1
48 BuildRequires: flex >= 2.5.4
49 BuildRequires: gettext-tools >= 0.14.5
50 BuildRequires: gmp-devel >= 4.3.2
51 BuildRequires: isl-devel >= 0.15
52 BuildRequires: libmpc-devel >= 0.8.1
53 BuildRequires: libstdc++-devel
54 BuildRequires: mpfr-devel >= 2.4.2
55 BuildRequires: perl-tools-pod
56 BuildRequires: tar >= 1:1.22
57 BuildRequires: texinfo >= 4.7
59 BuildRequires: zlib-devel
60 BuildConflicts: pdksh < 5.2.14-50
61 Requires: crossmingw32-binutils >= 2.23
63 Requires: gmp >= 4.3.2
65 Requires: libmpc >= 0.8.1
66 Requires: mpfr >= 2.4.2
67 # java support dropped from gcc 7+
68 Obsoletes: crossmingw32-java < 1:7
69 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
71 %define target i386-mingw32
72 %define sysprefix /usr
73 %define archprefix %{sysprefix}/%{target}
74 %define archbindir %{archprefix}/bin
75 %define archincludedir %{archprefix}/include
76 %define archlibdir %{archprefix}/lib
77 %define gccarchdir %{_libdir}/gcc/%{target}
78 %define gcclibdir %{gccarchdir}/%{version}
79 %define _dlldir /usr/share/wine/windows/system
81 %define _noautostrip .*/lib.*\\.a
83 %define _enable_debug_packages 0
85 # functions with printf format attribute but with special parser and also
86 # receiving non constant format strings
87 %define Werror_cflags %{nil}
88 %define _ssp_cflags %{nil}
89 # -fPIC is not valid for target platform
90 %define filterout_c -fPIC
93 crossmingw32 is a complete cross-compiling development system for
94 building stand-alone Microsoft Windows applications under Linux using
95 the MinGW32 build libraries. This includes a binutils, gcc with g++
96 and objc, and libstdc++, all cross targeted to i386-mingw32, along
97 with supporting Win32 libraries in 'coff' format from free sources.
99 This package contains cross targeted gcc.
101 %description -l de.UTF-8
102 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
103 anderem Rechner Code für Win32 zu generieren.
105 %description -l pl.UTF-8
106 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
107 pozwalającym budować aplikacje MS Windows pod Linuksem używając
108 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
109 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
110 z bibliotek w formacie COFF.
112 Ten pakiet zawiera gcc generujące skrośnie kod dla Win32.
114 %package -n crossmingw32-libgcc-dll
115 Summary: libgcc DLL library for Windows
116 Summary(pl.UTF-8): Biblioteka DLL libgcc dla Windows
117 Group: Applications/Emulators
120 %description -n crossmingw32-libgcc-dll
121 libgcc DLL library for Windows.
123 %description -n crossmingw32-libgcc-dll -l pl.UTF-8
124 Biblioteka DLL libgcc dla Windows.
126 %package -n crossmingw32-libatomic
127 Summary: The GNU Atomic library - cross MinGW32 version
128 Summary(pl.UTF-8): Biblioteka GNU Atomic - wersja skrośna MinGW32
129 License: GPL v3+ with GCC Runtime Library Exception v3.1
130 Group: Development/Libraries
131 Requires: %{name} = %{epoch}:%{version}-%{release}
133 %description -n crossmingw32-libatomic
134 This package contains cross MinGW32 version of the GNU Atomic library
135 which is a GCC support library for atomic operations not supported by
138 %description -n crossmingw32-libatomic -l pl.UTF-8
139 Ten pakiet zawiera wersję skrośną MinGW32 biblioteki GNU Atomic,
140 będącej biblioteką GCC, wspierającej operacje atomowe na sprzęcie ich
143 %package -n crossmingw32-libatomic-static
144 Summary: The GNU Atomic static library - cross MinGW32 version
145 Summary(pl.UTF-8): Statyczna biblioteka GNU Atomic - wersja skrośna MinGW32
146 License: GPL v3+ with GCC Runtime Library Exception v3.1
147 Group: Development/Libraries
148 Requires: crossmingw32-libatomic = %{epoch}:%{version}-%{release}
150 %description -n crossmingw32-libatomic-static
151 The GNU Atomic static library - cross MinGW32 version.
153 %description -n crossmingw32-libatomic-static -l pl.UTF-8
154 Statyczna biblioteka GNU Atomic - wersja skrośna MinGW32.
156 %package -n crossmingw32-libatomic-dll
157 Summary: DLL GNU Atomic library for Windows
158 Summary(pl.UTF-8): Biblioteka DLL GNU Atomic dla Windows
159 License: GPL v3+ with GCC Runtime Library Exception v3.1
160 Group: Applications/Emulators
163 %description -n crossmingw32-libatomic-dll
164 DLL GNU Atomic library for Windows.
166 %description -n crossmingw32-libatomic-dll -l pl.UTF-8
167 Biblioteka DLL GNU Atomic dla Windows.
169 %package -n crossmingw32-libgomp
170 Summary: GNU OpenMP library - cross MinGW32 version
171 Summary(pl.UTF-8): Biblioteka GNU OpenMP - wersja skrośna MinGW32
172 License: GPL v3+ with GCC Runtime Library Exception v3.1
173 Group: Development/Libraries
174 Requires: %{name} = %{epoch}:%{version}-%{release}
176 %description -n crossmingw32-libgomp
177 This package contains cross MinGW32 version of GNU OpenMP library.
179 %description -n crossmingw32-libgomp -l pl.UTF-8
180 Ten pakiet zawiera wersję skrośną MinGW32 biblioteki GNU OpenMP.
182 %package -n crossmingw32-libgomp-static
183 Summary: Static GNU OpenMP library - cross MinGW32 version
184 Summary(pl.UTF-8): Statyczna biblioteka GNU OpenMP - wersja skrośna MinGW32
185 License: GPL v3+ with GCC Runtime Library Exception v3.1
186 Group: Development/Libraries
187 Requires: crossmingw32-libgomp = %{epoch}:%{version}-%{release}
189 %description -n crossmingw32-libgomp-static
190 Static GNU OpenMP library - cross MinGW32 version.
192 %description -n crossmingw32-libgomp-static -l pl.UTF-8
193 Statyczna biblioteka GNU OpenMP - wersja skrośna MinGW32.
195 %package -n crossmingw32-libgomp-dll
196 Summary: DLL GNU OpenMP library for Windows
197 Summary(pl.UTF-8): Biblioteka DLL GNU OpenMP dla Windows
198 License: GPL v3+ with GCC Runtime Library Exception v3.1
199 Group: Applications/Emulators
200 Requires: crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release}
201 Requires: crossmingw32-pthreads-w32-dll
203 %description -n crossmingw32-libgomp-dll
204 DLL GNU OpenMP library for Windows.
206 %description -n crossmingw32-libgomp-dll -l pl.UTF-8
207 Biblioteka DLL GNU OpenMP dla Windows.
209 %package -n crossmingw32-libvtv
210 Summary: The Virtual Table Verification library - cross MinGW32 version
211 Summary(pl.UTF-8): Biblioteka Virtual Table Verification do weryfikacji tablicy wirtualnej - wersja skrośna MinGW32
212 License: GPL v3+ with GCC Runtime Library Exception v3.1
213 Group: Development/Libraries
214 URL: https://gcc.gnu.org/wiki/vtv
215 Requires: %{name} = %{epoch}:%{version}-%{release}
217 %description -n crossmingw32-libvtv
218 This package contains cross MinGW32 version of the Virtual Table
219 Verification library which is used for -fvtable-verify=...
220 instrumented programs.
222 %description -n crossmingw32-libvtv -l pl.UTF-8
223 Ten pakiet zawiera wersję skrośną MinGW32 biblioteki Virtual Table
224 Verification, służącej do weryfikacji tablicy wirtualnej w programach
225 kompilowanych z opcją -fvtable-verify=....
227 %package -n crossmingw32-libvtv-static
228 Summary: The Virtual Table Verification static library - cross MinGW32 version
229 Summary(pl.UTF-8): Statyczna biblioteka Virtual Table Verification - wersja skrośna MinGW32
230 License: GPL v3+ with GCC Runtime Library Exception v3.1
231 Group: Development/Libraries
232 URL: https://gcc.gnu.org/wiki/vtv
233 Requires: crossmingw32-libvtv = %{epoch}:%{version}-%{release}
235 %description -n crossmingw32-libvtv-static
236 The Virtual Table Verification static library - cross MinGW32 version.
238 %description -n crossmingw32-libvtv-static -l pl.UTF-8
239 Statyczna biblioteka Virtual Table Verification - wersja skrośna
242 %package -n crossmingw32-libvtv-dll
243 Summary: DLL Virtual Table Verification libraries for Windows
244 Summary(pl.UTF-8): Biblioteki DLL Virtual Table Verification dla Windows
245 License: GPL v3+ with GCC Runtime Library Exception v3.1
246 Group: Applications/Emulators
247 URL: https://gcc.gnu.org/wiki/vtv
248 Requires: crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release}
250 %description -n crossmingw32-libvtv-dll
251 DLL Virtual Table Verification libraries for Windows.
253 %description -n crossmingw32-libvtv-dll -l pl.UTF-8
254 Biblioteki DLL Virtual Table Verification dla Windows.
257 Summary: MinGW32 binary utility development utilities - g++
258 Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - g++
259 Group: Development/Languages
260 Requires: %{name} = %{epoch}:%{version}-%{release}
263 crossmingw32 is a complete cross-compiling development system for
264 building stand-alone Microsoft Windows applications under Linux using
265 the MinGW32 build libraries. This includes a binutils, gcc with g++
266 and objc, and libstdc++, all cross targeted to i386-mingw32, along
267 with supporting Win32 libraries in 'coff' format from free sources.
269 This package contains cross targeted g++ and (static) libstdc++.
271 %description c++ -l pl.UTF-8
272 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
273 pozwalającym budować aplikacje MS Windows pod Linuksem używając
274 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
275 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
276 z bibliotek w formacie COFF.
278 Ten pakiet zawiera g++ generujące kod pod Win32 oraz bibliotekę
281 %package -n crossmingw32-libstdc++-static
282 Summary: Static standard C++ library - cross MinGW32 version
283 Summary(pl.UTF-8): Statyczna biblioteka standardowa C++ - wersja skrośna MinGW32
284 Group: Development/Libraries
285 Requires: %{name}-c++ = %{epoch}:%{version}-%{release}
287 %description -n crossmingw32-libstdc++-static
288 Static standard C++ library - cross MinGW32 version.
290 %description -n crossmingw32-libstdc++-static -l pl.UTF-8
291 Statyczna biblioteka standardowa C++ - wersja skrośna MinGW32.
293 %package -n crossmingw32-libstdc++-dll
294 Summary: libstdc++ DLL library for Windows
295 Summary(pl.UTF-8): Biblioteka DLL libstdc++ dla Windows
296 Group: Applications/Emulators
297 Requires: crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release}
300 %description -n crossmingw32-libstdc++-dll
301 libstdc++ DLL library for Windows.
303 %description -n crossmingw32-libstdc++-dll -l pl.UTF-8
304 Biblioteka DLL libstdc++ dla Windows.
307 Summary: MinGW32 binary utility development utilities - objc
308 Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - objc
309 Group: Development/Languages
310 Requires: %{name} = %{epoch}:%{version}-%{release}
313 crossmingw32 is a complete cross-compiling development system for
314 building stand-alone Microsoft Windows applications under Linux using
315 the MinGW32 build libraries. This includes a binutils, gcc with g++
316 and objc, and libstdc++, all cross targeted to i386-mingw32, along
317 with supporting Win32 libraries in 'coff' format from free sources.
319 This package contains cross targeted objc compiler.
321 %description objc -l pl.UTF-8
322 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
323 pozwalającym budować aplikacje MS Windows pod Linuksem używając
324 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
325 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
326 z bibliotek w formacie COFF.
328 Ten pakiet zawiera kompilator objc generujący kod pod Win32.
331 Summary: MinGW32 binary utility development utilities - objc++
332 Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - objc++
333 Group: Development/Languages
334 Requires: %{name}-objc = %{epoch}:%{version}-%{release}
337 crossmingw32 is a complete cross-compiling development system for
338 building stand-alone Microsoft Windows applications under Linux using
339 the MinGW32 build libraries. This includes a binutils, gcc with g++
340 and objc, and libstdc++, all cross targeted to i386-mingw32, along
341 with supporting Win32 libraries in 'coff' format from free sources.
343 This package contains Objective C++ support.
345 %description objc++ -l pl.UTF-8
346 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
347 pozwalającym budować aplikacje MS Windows pod Linuksem używając
348 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
349 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
350 z bibliotek w formacie COFF.
352 Ten pakiet zawiera obsługę języka Objective C++.
354 %package -n crossmingw32-libobjc-static
355 Summary: Static Objective C library - cross MinGW32 version
356 Summary(pl.UTF-8): Statyczna biblioteka Objective C - wersja skrośna MinGW32
357 Group: Development/Libraries
358 Requires: %{name}-objc = %{epoch}:%{version}-%{release}
360 %description -n crossmingw32-libobjc-static
361 Static Objective C library - cross MinGW32 version.
363 %description -n crossmingw32-libobjc-static -l pl.UTF-8
364 Statyczna biblioteka Objective C - wersja skrośna MinGW32.
366 %package -n crossmingw32-libobjc-dll
367 Summary: libobjc DLL library for Windows
368 Summary(pl.UTF-8): Biblioteka DLL libobjc dla Windows
369 Group: Applications/Emulators
370 Requires: crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release}
373 %description -n crossmingw32-libobjc-dll
374 libobjc DLL library for Windows.
376 %description -n crossmingw32-libobjc-dll -l pl.UTF-8
377 Biblioteka DLL libobjc dla Windows.
380 Summary: MinGW32 binary utility development utilities - Fortran
381 Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - Fortran
382 Group: Development/Languages
383 Requires: %{name} = %{epoch}:%{version}-%{release}
384 Requires: crossmingw32-libquadmath = %{epoch}:%{version}-%{release}
385 Obsoletes: crossmingw32-gcc-g77 < 1:4
388 crossmingw32 is a complete cross-compiling development system for
389 building stand-alone Microsoft Windows applications under Linux using
390 the MinGW32 build libraries. This includes a binutils, gcc with g++
391 and objc, and libstdc++, all cross targeted to i386-mingw32, along
392 with supporting Win32 libraries in 'coff' format from free sources.
394 This package contains cross targeted Fortran compiler.
396 %description fortran -l pl.UTF-8
397 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
398 pozwalającym budować aplikacje MS Windows pod Linuksem używając
399 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
400 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
401 z bibliotek w formacie COFF.
403 Ten pakiet zawiera kompilator Fortranu generujący kod pod Win32.
405 %package -n crossmingw32-libgfortran-static
406 Summary: Static Fortran library - cross MinGW32 version
407 Summary(pl.UTF-8): Statyczna biblioteka Fortranu - wersja skrośna MinGW32
408 Group: Development/Libraries
409 Requires: %{name}-fortran = %{epoch}:%{version}-%{release}
411 %description -n crossmingw32-libgfortran-static
412 Static Fortran library - cross MinGW32 version.
414 %description -n crossmingw32-libgfortran-static -l pl.UTF-8
415 Statyczna biblioteka Fortranu - wersja skrośna MinGW32.
417 %package -n crossmingw32-libgfortran-dll
418 Summary: libgfortran DLL library for Windows
419 Summary(pl.UTF-8): Biblioteka DLL libgfortran dla Windows
420 Group: Applications/Emulators
421 Requires: crossmingw32-libquadmath-dll
423 %description -n crossmingw32-libgfortran-dll
424 libgfortran DLL library for Windows.
426 %description -n crossmingw32-libgfortran-dll -l pl.UTF-8
427 Biblioteka DLL libgfortran dla Windows.
429 %package -n crossmingw32-libquadmath
430 Summary: GCC __float128 support library - cross MinGW32 version
431 Summary(pl.UTF-8): Biblioteka do obsługi typu __float128 - wersja skrośna MinGW32
432 License: GPL v2+ with linking exception
433 Group: Development/Libraries
434 Requires: %{name} = %{epoch}:%{version}-%{release}
436 %description -n crossmingw32-libquadmath
437 This package contains cross MinGW32 version of GCC support library
438 which is needed for __float128 math support and for Fortran REAL*16
441 %description -n crossmingw32-libquadmath -l pl.UTF-8
442 Ten pakiet zawiera wersję skrośną MinGW32 biblioteki GCC do obsługi
443 operacji matematycznych na zmiennych typu __float128 oraz typu REAL*16
446 %package -n crossmingw32-libquadmath-static
447 Summary: Static GCC __float128 support library - cross MinGW32 version
448 Summary(pl.UTF-8): Biblioteka statyczna GCC do obsługi typu __float128 - wersja skrośna MinGW32
449 License: GPL v2+ with linking exception
450 Group: Development/Libraries
451 Requires: crossmingw32-libquadmath = %{epoch}:%{version}-%{release}
453 %description -n crossmingw32-libquadmath-static
454 Static GCC __float128 support library - cross MinGW32 version.
456 %description -n crossmingw32-libquadmath-static -l pl.UTF-8
457 Biblioteka statyczna GCC do obsługi typu __float128 - wersja skrośna
460 %package -n crossmingw32-libquadmath-dll
461 Summary: DLL GCC __float128 support library for Windows
462 Summary(pl.UTF-8): Biblioteka DLL GCC do obsługi typu __float128 dla Windows
463 License: GPL v2+ with linking exception
464 Group: Applications/Emulators
467 %description -n crossmingw32-libquadmath-dll
468 DLL GCC __float128 support library for Windows.
470 %description -n crossmingw32-libquadmath-dll -l pl.UTF-8
471 Biblioteka DLL GCC do obsługi typu __float128 dla Windows.
474 %setup -q -n gcc-%{version}
481 %if %{with bootstrap}
482 # note: "winsup" dirs are special, handled by gcc's configure
483 install -d winsup/{mingw,w32api}
484 tar xf %{SOURCE1} -C winsup/w32api
485 tar xf %{SOURCE2} -C winsup/mingw
486 # required by _mingw.h
487 touch winsup/mingw/include/features.h
490 # override snapshot version.
491 echo %{version} > gcc/BASE-VER
492 echo "release" > gcc/DEV-PHASE
496 %{__aclocal} -I .. -I ../config
501 rm -rf builddir && install -d builddir && cd builddir
502 %if %{with bootstrap}
503 install -d %{target}/winsup
504 ln -sf ../../../winsup/mingw/lib %{target}/winsup/mingw
505 ln -sf ../../../winsup/w32api %{target}/winsup/w32api
506 WINSUPDIR=$(cd ..; pwd)/winsup
509 # note: libbacktrace requires at least i486 now
511 CFLAGS="%{rpmcflags}" \
512 CXXFLAGS="%{rpmcxxflags}" \
514 CFLAGS_FOR_TARGET="-O2 -march=i486" \
515 CXXFLAGS_FOR_TARGET="-O2 -march=i486" \
517 --prefix=%{sysprefix} \
518 --bindir=%{archbindir} \
519 --libdir=%{_libdir} \
520 --includedir=%{archincludedir} \
521 --libexecdir=%{_libdir} \
522 --infodir=%{_infodir} \
523 --mandir=%{_mandir} \
524 --with-bugurl="http://bugs.pld-linux.org" \
525 --with-build-time-tools=%{archbindir} \
526 %{!?with_bootstrap:--with-headers=%{archincludedir}} \
527 --with-libs=%{!?with_bootstrap:%{archlibdir}}%{?with_bootstrap:${WINSUPDIR}/mingw/lib} \
528 --with-demangler-in-ld \
532 --with-long-double-128 \
533 --with-pkgversion="PLD-Linux" \
535 --enable-fully-dynamic-string \
536 --disable-isl-version-check \
537 --enable-languages="c,c++%{!?with_bootstrap:,fortran,objc,obj-c++}" \
538 %{?with_bootstrap:--disable-libatomic} \
540 --enable-libgomp%{!?with_gomp:=no} \
541 %{?with_bootstrap:--disable-libquadmath} \
543 --enable-libstdcxx-allocator=new \
544 %{?with_bootstrap:--disable-libvtv} \
545 --enable-linker-build-id \
551 --disable-sjlj-exceptions \
555 --disable-win32-registry \
559 %{__make} -C builddir all-host
561 %{__make} -C builddir
564 rm -rf $RPM_BUILD_ROOT
565 install -d $RPM_BUILD_ROOT%{_bindir}
567 %{__make} -C builddir install \
568 DESTDIR=$RPM_BUILD_ROOT
570 %{__mv} $RPM_BUILD_ROOT%{gcclibdir}/include-fixed/{limits,syslimits}.h $RPM_BUILD_ROOT%{gcclibdir}/include
571 %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/include-fixed
572 %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/install-tools
574 # these must be symlinks: gcclibdir is calculated relatively to real binary path
575 ln -sf %{archbindir}/%{target}-gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
576 ln -sf %{archbindir}/%{target}-g++ $RPM_BUILD_ROOT%{_bindir}/%{target}-g++
577 ln -sf %{archbindir}/%{target}-cpp $RPM_BUILD_ROOT%{_bindir}/%{target}-cpp
578 ln -sf %{archbindir}/%{target}-gcov $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov
579 ln -sf %{archbindir}/%{target}-gcov-dump $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov-dump
580 ln -sf %{archbindir}/%{target}-gcov-tool $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov-tool
581 ln -sf %{archbindir}/%{target}-gfortran $RPM_BUILD_ROOT%{_bindir}/%{target}-gfortran
584 install -d $RPM_BUILD_ROOT%{_dlldir}
585 %{__mv} $RPM_BUILD_ROOT%{archlibdir}/*.dll $RPM_BUILD_ROOT%{_dlldir}
586 if [ ! -f $RPM_BUILD_ROOT%{_dlldir}/libgcc_s_dw2-1.dll ]; then
587 echo "libgcc DLL not installed?"
588 install builddir/i386-mingw32/libgcc/shlib/libgcc_s_dw2-1.dll $RPM_BUILD_ROOT%{_dlldir}
592 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
593 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{archlibdir}/lib*.a
594 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{gcclibdir}/lib*.a
597 # avoid -L poisoning in *.la
598 %if %{without bootstrap}
599 for f in libatomic.la libgfortran.la libobjc.la libquadmath.la %{?with_gomp:libgomp.la} ; do
600 file="$RPM_BUILD_ROOT%{archlibdir}/$f"
601 %{__perl} %{SOURCE3} "$file" %{gcclibdir} >"${file}.fixed"
602 %{__mv} "${file}.fixed" "$file"
604 for f in libcaf_single.la ; do
605 file="$RPM_BUILD_ROOT%{gcclibdir}/$f"
606 %{__perl} %{SOURCE3} "$file" %{gcclibdir} >"${file}.fixed"
607 %{__mv} "${file}.fixed" "$file"
611 # for pretty-printers see native gcc
612 %{__rm} $RPM_BUILD_ROOT%{archlibdir}/libstdc++.dll.a-gdb.py
613 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/gcc-%{version}/python/libstdcxx
614 # no plugin development for mingw32 (at least for now)
615 %{__rm} $RPM_BUILD_ROOT%{gcclibdir}/liblto_plugin.la
616 %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/plugin
617 # already in native gcc
618 %{__rm} -r $RPM_BUILD_ROOT%{_infodir}
619 # common FSF man pages
620 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man7/{fsf-funding,gfdl,gpl}.7
623 rm -rf $RPM_BUILD_ROOT
626 %defattr(644,root,root,755)
627 %attr(755,root,root) %{_bindir}/%{target}-gcc
628 %attr(755,root,root) %{_bindir}/%{target}-cpp
629 %attr(755,root,root) %{_bindir}/%{target}-gcov
630 %attr(755,root,root) %{_bindir}/%{target}-gcov-dump
631 %attr(755,root,root) %{_bindir}/%{target}-gcov-tool
632 %attr(755,root,root) %{archbindir}/%{target}-cpp
633 %attr(755,root,root) %{archbindir}/%{target}-gcc
634 %attr(755,root,root) %{archbindir}/%{target}-gcc-%{version}
635 %attr(755,root,root) %{archbindir}/%{target}-gcc-ar
636 %attr(755,root,root) %{archbindir}/%{target}-gcc-nm
637 %attr(755,root,root) %{archbindir}/%{target}-gcc-ranlib
638 %attr(755,root,root) %{archbindir}/%{target}-gcov
639 %attr(755,root,root) %{archbindir}/%{target}-gcov-dump
640 %attr(755,root,root) %{archbindir}/%{target}-gcov-tool
641 %{archlibdir}/libgcc_s.a
644 %attr(755,root,root) %{gcclibdir}/cc1
645 %attr(755,root,root) %{gcclibdir}/collect2
646 %attr(755,root,root) %{gcclibdir}/lto-wrapper
647 %attr(755,root,root) %{gcclibdir}/lto1
648 %attr(755,root,root) %{gcclibdir}/liblto_plugin.so*
649 %{gcclibdir}/libgcc.a
650 %{gcclibdir}/libgcc_eh.a
651 %{gcclibdir}/libgcov.a
652 %{gcclibdir}/crtbegin.o
653 %{gcclibdir}/crtend.o
654 %{gcclibdir}/crtfastmath.o
655 %dir %{gcclibdir}/include
656 %{gcclibdir}/include/*.h
657 %{_mandir}/man1/%{target}-cpp.1*
658 %{_mandir}/man1/%{target}-gcc.1*
659 %{_mandir}/man1/%{target}-gcov.1*
660 %{_mandir}/man1/%{target}-gcov-dump.1*
661 %{_mandir}/man1/%{target}-gcov-tool.1*
663 %files -n crossmingw32-libgcc-dll
664 %defattr(644,root,root,755)
665 %{_dlldir}/libgcc_s_dw2-1.dll
667 %if %{without bootstrap}
668 %files -n crossmingw32-libatomic
669 %defattr(644,root,root,755)
670 %{archlibdir}/libatomic.dll.a
671 %{archlibdir}/libatomic.la
673 %files -n crossmingw32-libatomic-static
674 %defattr(644,root,root,755)
675 %{archlibdir}/libatomic.a
677 %files -n crossmingw32-libatomic-dll
678 %defattr(644,root,root,755)
679 %{_dlldir}/libatomic-1.dll
683 %files -n crossmingw32-libgomp
684 %defattr(644,root,root,755)
685 %{archlibdir}/libgomp.dll.a
686 %{archlibdir}/libgomp.la
687 %{archlibdir}/libgomp.spec
689 %files -n crossmingw32-libgomp-static
690 %defattr(644,root,root,755)
691 %{archlibdir}/libgomp.a
693 %files -n crossmingw32-libgomp-dll
694 %defattr(644,root,root,755)
695 %{_dlldir}/libgomp-1.dll
698 %if %{without bootstrap}
699 %files -n crossmingw32-libvtv
700 %defattr(644,root,root,755)
701 %{archlibdir}/libvtv.dll.a
702 %{archlibdir}/libvtv.la
703 %{archlibdir}/libvtv_stubs.dll.a
704 %{archlibdir}/libvtv_stubs.la
706 %files -n crossmingw32-libvtv-static
707 %defattr(644,root,root,755)
708 %{archlibdir}/libvtv.a
709 %{archlibdir}/libvtv_stubs.a
711 %files -n crossmingw32-libvtv-dll
712 %defattr(644,root,root,755)
713 %{_dlldir}/libvtv-0.dll
714 %{_dlldir}/libvtv_stubs-0.dll
718 %defattr(644,root,root,755)
719 %attr(755,root,root) %{_bindir}/%{target}-g++
720 %attr(755,root,root) %{archbindir}/%{target}-c++
721 %attr(755,root,root) %{archbindir}/%{target}-g++
722 %attr(755,root,root) %{gcclibdir}/cc1plus
723 %{archlibdir}/libstdc++.dll.a
724 %{archlibdir}/libstdc++.la
725 %{archlibdir}/libsupc++.la
726 %{archlibdir}/libsupc++.a
727 %{archincludedir}/c++
728 %{_mandir}/man1/%{target}-g++.1*
730 %files -n crossmingw32-libstdc++-static
731 %defattr(644,root,root,755)
732 %{archlibdir}/libstdc++.a
734 %files -n crossmingw32-libstdc++-dll
735 %defattr(644,root,root,755)
736 %{_dlldir}/libstdc++-6.dll
738 %if %{without bootstrap}
740 %defattr(644,root,root,755)
742 %attr(755,root,root) %{gcclibdir}/cc1obj
743 %{archlibdir}/libobjc.dll.a
744 %{archlibdir}/libobjc.la
745 %{gcclibdir}/include/objc
748 %defattr(644,root,root,755)
749 %doc gcc/objcp/ChangeLog
750 %attr(755,root,root) %{gcclibdir}/cc1objplus
752 %files -n crossmingw32-libobjc-static
753 %defattr(644,root,root,755)
754 %{archlibdir}/libobjc.a
756 %files -n crossmingw32-libobjc-dll
757 %defattr(644,root,root,755)
758 %{_dlldir}/libobjc-4.dll
761 %defattr(644,root,root,755)
762 %attr(755,root,root) %{_bindir}/%{target}-gfortran
763 %attr(755,root,root) %{archbindir}/%{target}-gfortran
764 %attr(755,root,root) %{gcclibdir}/f951
765 %{archlibdir}/libgfortran.dll.a
766 %{archlibdir}/libgfortran.la
767 %{archlibdir}/libgfortran.spec
768 %{gcclibdir}/finclude
769 %{gcclibdir}/libcaf_single.a
770 %{gcclibdir}/libcaf_single.la
771 %{_mandir}/man1/%{target}-gfortran.1*
773 %files -n crossmingw32-libgfortran-static
774 %defattr(644,root,root,755)
775 %{archlibdir}/libgfortran.a
777 %files -n crossmingw32-libgfortran-dll
778 %defattr(644,root,root,755)
779 %{_dlldir}/libgfortran-5.dll
781 %files -n crossmingw32-libquadmath
782 %defattr(644,root,root,755)
783 %{archlibdir}/libquadmath.dll.a
784 %{archlibdir}/libquadmath.la
786 %files -n crossmingw32-libquadmath-static
787 %defattr(644,root,root,755)
788 %{archlibdir}/libquadmath.a
790 %files -n crossmingw32-libquadmath-dll
791 %defattr(644,root,root,755)
792 %{_dlldir}/libquadmath-0.dll