3 %bcond_with bootstrap # bootstrap build (using binary w32api/mingwrt, 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: 11ba51a0cfb8471927f387c8895fe232
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
26 Source2: gcc-optimize-la.pl
27 # svn diff -x --ignore-eol-style --force svn://gcc.gnu.org/svn/gcc/tags/gcc_5_4_0_release svn://gcc.gnu.org/svn/gcc/branches/gcc-5-branch > gcc-branch.diff
28 Patch100: gcc-branch.diff
29 # Patch100-md5: 1d4bc26154e47de7d727d6767215e776
30 Patch0: %{name}-buildsystem1.patch
31 Patch1: %{name}-buildsystem2.patch
32 Patch2: %{name}-lfs.patch
33 Patch3: gcc-mingw32.patch
34 Patch4: gcc-build-libvtv.patch
35 URL: http://gcc.gnu.org/
36 BuildRequires: autoconf >= 2.64
37 BuildRequires: automake >= 1:1.11.1
39 BuildRequires: crossmingw32-binutils >= 2.23
40 %{?with_gomp:BuildRequires: crossmingw32-pthreads-w32}
41 %if %{without bootstrap}
42 BuildRequires: crossmingw32-runtime >= 3.5
43 BuildRequires: crossmingw32-w32api >= 3.1
45 BuildRequires: flex >= 2.5.4
46 BuildRequires: gettext-tools >= 0.14.5
47 BuildRequires: gmp-devel >= 4.3.2
48 BuildRequires: isl-devel >= 0.15
49 BuildRequires: libmpc-devel >= 0.8.1
50 BuildRequires: libstdc++-devel
51 BuildRequires: mpfr-devel >= 2.4.2
52 BuildRequires: perl-tools-pod
53 BuildRequires: tar >= 1:1.22
54 BuildRequires: texinfo >= 4.7
56 BuildRequires: zlib-devel
57 BuildConflicts: pdksh < 5.2.14-50
58 Requires: crossmingw32-binutils >= 2.23
60 Requires: gmp >= 4.3.2
62 Requires: libmpc >= 0.8.1
63 Requires: mpfr >= 2.4.2
64 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
66 %define target i386-mingw32
67 %define sysprefix /usr
68 %define arch %{sysprefix}/%{target}
69 %define gccarchdir %{_libdir}/gcc/%{target}
70 %define gcclibdir %{gccarchdir}/%{version}
71 %define _dlldir /usr/share/wine/windows/system
73 %define _noautostrip .*/lib.*\\.a
75 %define _enable_debug_packages 0
77 # functions with printf format attribute but with special parser and also
78 # receiving non constant format strings
79 %define Werror_cflags %{nil}
80 %define _ssp_cflags %{nil}
81 # -fPIC is not valid for target platform
82 %define filterout_c -fPIC
85 crossmingw32 is a complete cross-compiling development system for
86 building stand-alone Microsoft Windows applications under Linux using
87 the MinGW32 build libraries. This includes a binutils, gcc with g++
88 and objc, and libstdc++, all cross targeted to i386-mingw32, along
89 with supporting Win32 libraries in 'coff' format from free sources.
91 This package contains cross targeted gcc.
93 %description -l de.UTF-8
94 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
95 anderem Rechner Code für Win32 zu generieren.
97 %description -l pl.UTF-8
98 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
99 pozwalającym budować aplikacje MS Windows pod Linuksem używając
100 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
101 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
102 z bibliotek w formacie COFF.
104 Ten pakiet zawiera gcc generujące skrośnie kod dla Win32.
106 %package -n crossmingw32-libgcc-dll
107 Summary: libgcc DLL library for Windows
108 Summary(pl.UTF-8): Biblioteka DLL libgcc dla Windows
109 Group: Applications/Emulators
112 %description -n crossmingw32-libgcc-dll
113 libgcc DLL library for Windows.
115 %description -n crossmingw32-libgcc-dll -l pl.UTF-8
116 Biblioteka DLL libgcc dla Windows.
118 %package -n crossmingw32-libatomic
119 Summary: The GNU Atomic library - cross MinGW32 version
120 Summary(pl.UTF-8): Biblioteka GNU Atomic - wersja skrośna MinGW32
121 License: GPL v3+ with GCC Runtime Library Exception v3.1
122 Group: Development/Libraries
123 Requires: %{name} = %{epoch}:%{version}-%{release}
125 %description -n crossmingw32-libatomic
126 This package contains cross MinGW32 version of the GNU Atomic library
127 which is a GCC support library for atomic operations not supported by
130 %description -n crossmingw32-libatomic -l pl.UTF-8
131 Ten pakiet zawiera wersję skrośną MinGW32 biblioteki GNU Atomic,
132 będącej biblioteką GCC, wspierającej operacje atomowe na sprzęcie ich
135 %package -n crossmingw32-libatomic-static
136 Summary: The GNU Atomic static library - cross MinGW32 version
137 Summary(pl.UTF-8): Statyczna biblioteka GNU Atomic - wersja skrośna MinGW32
138 License: GPL v3+ with GCC Runtime Library Exception v3.1
139 Group: Development/Libraries
140 Requires: crossmingw32-libatomic = %{epoch}:%{version}-%{release}
142 %description -n crossmingw32-libatomic-static
143 The GNU Atomic static library - cross MinGW32 version.
145 %description -n crossmingw32-libatomic-static
146 Statyczna biblioteka GNU Atomic - wersja skrośna MinGW32.
148 %package -n crossmingw32-libatomic-dll
149 Summary: DLL GNU Atomic library for Windows
150 Summary(pl.UTF-8): Biblioteka DLL GNU Atomic dla Windows
151 License: GPL v3+ with GCC Runtime Library Exception v3.1
152 Group: Applications/Emulators
155 %description -n crossmingw32-libatomic-dll
156 DLL GNU Atomic library for Windows.
158 %description -n crossmingw32-libatomic-dll -l pl.UTF-8
159 Biblioteka DLL GNU Atomic dla Windows.
161 %package -n crossmingw32-libgomp
162 Summary: GNU OpenMP library - cross MinGW32 version
163 Summary(pl.UTF-8): Biblioteka GNU OpenMP - wersja skrośna MinGW32
164 License: GPL v3+ with GCC Runtime Library Exception v3.1
165 Group: Development/Libraries
166 Requires: %{name} = %{epoch}:%{version}-%{release}
168 %description -n crossmingw32-libgomp
169 This package contains cross MinGW32 version of GNU OpenMP library.
171 %description -n crossmingw32-libgomp -l pl.UTF-8
172 Ten pakiet zawiera wersję skrośną MinGW32 biblioteki GNU OpenMP.
174 %package -n crossmingw32-libgomp-static
175 Summary: Static GNU OpenMP library - cross MinGW32 version
176 Summary(pl.UTF-8): Statyczna biblioteka GNU OpenMP - wersja skrośna MinGW32
177 License: GPL v3+ with GCC Runtime Library Exception v3.1
178 Group: Development/Libraries
179 Requires: crossmingw32-libgomp = %{epoch}:%{version}-%{release}
181 %description -n crossmingw32-libgomp-static
182 Static GNU OpenMP library - cross MinGW32 version.
184 %description -n crossmingw32-libgomp-static -l pl.UTF-8
185 Statyczna biblioteka GNU OpenMP - wersja skrośna MinGW32.
187 %package -n crossmingw32-libgomp-dll
188 Summary: DLL GNU OpenMP library for Windows
189 Summary(pl.UTF-8): Biblioteka DLL GNU OpenMP dla Windows
190 License: GPL v3+ with GCC Runtime Library Exception v3.1
191 Group: Applications/Emulators
192 Requires: crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release}
193 Requires: crossmingw32-pthreads-w32-dll
195 %description -n crossmingw32-libgomp-dll
196 DLL GNU OpenMP library for Windows.
198 %description -n crossmingw32-libgomp-dll -l pl.UTF-8
199 Biblioteka DLL GNU OpenMP dla Windows.
201 %package -n crossmingw32-libvtv
202 Summary: The Virtual Table Verification library - cross MinGW32 version
203 Summary(pl.UTF-8): Biblioteka Virtual Table Verification do weryfikacji tablicy wirtualnej - wersja skrośna MinGW32
204 License: GPL v3+ with GCC Runtime Library Exception v3.1
205 Group: Development/Libraries
206 URL: https://gcc.gnu.org/wiki/vtv
207 Requires: %{name} = %{epoch}:%{version}-%{release}
209 %description -n crossmingw32-libvtv
210 This package contains cross MinGW32 version of the Virtual Table
211 Verification library which is used for -fvtable-verify=...
212 instrumented programs.
214 %description -n crossmingw32-libvtv -l pl.UTF-8
215 Ten pakiet zawiera wersję skrośną MinGW32 biblioteki Virtual Table
216 Verification, służącej do weryfikacji tablicy wirtualnej w programach
217 kompilowanych z opcją -fvtable-verify=....
219 %package -n crossmingw32-libvtv-static
220 Summary: The Virtual Table Verification static library - cross MinGW32 version
221 Summary(pl.UTF-8): Statyczna biblioteka Virtual Table Verification - wersja skrośna MinGW32
222 License: GPL v3+ with GCC Runtime Library Exception v3.1
223 Group: Development/Libraries
224 URL: https://gcc.gnu.org/wiki/vtv
225 Requires: crossmingw32-libvtv = %{epoch}:%{version}-%{release}
227 %description -n crossmingw32-libvtv-static
228 The Virtual Table Verification static library - cross MinGW32 version.
230 %description -n crossmingw32-libvtv-static -l pl.UTF-8
231 Statyczna biblioteka Virtual Table Verification - wersja skrośna
234 %package -n crossmingw32-libvtv-dll
235 Summary: DLL Virtual Table Verification libraries for Windows
236 Summary(pl.UTF-8): Biblioteki DLL Virtual Table Verification dla Windows
237 License: GPL v3+ with GCC Runtime Library Exception v3.1
238 Group: Applications/Emulators
239 URL: https://gcc.gnu.org/wiki/vtv
240 Requires: crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release}
242 %description -n crossmingw32-libvtv-dll
243 DLL Virtual Table Verification libraries for Windows.
245 %description -n crossmingw32-libvtv-dll -l pl.UTF-8
246 Biblioteki DLL Virtual Table Verification dla Windows.
249 Summary: MinGW32 binary utility development utilities - g++
250 Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - g++
251 Group: Development/Languages
252 Requires: %{name} = %{epoch}:%{version}-%{release}
255 crossmingw32 is a complete cross-compiling development system for
256 building stand-alone Microsoft Windows applications under Linux using
257 the MinGW32 build libraries. This includes a binutils, gcc with g++
258 and objc, and libstdc++, all cross targeted to i386-mingw32, along
259 with supporting Win32 libraries in 'coff' format from free sources.
261 This package contains cross targeted g++ and (static) libstdc++.
263 %description c++ -l pl.UTF-8
264 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
265 pozwalającym budować aplikacje MS Windows pod Linuksem używając
266 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
267 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
268 z bibliotek w formacie COFF.
270 Ten pakiet zawiera g++ generujące kod pod Win32 oraz bibliotekę
273 %package -n crossmingw32-libstdc++-static
274 Summary: Static standard C++ library - cross MinGW32 version
275 Summary(pl.UTF-8): Statyczna biblioteka standardowa C++ - wersja skrośna MinGW32
276 Group: Development/Libraries
277 Requires: %{name}-c++ = %{epoch}:%{version}-%{release}
279 %description -n crossmingw32-libstdc++-static
280 Static standard C++ library - cross MinGW32 version.
282 %description -n crossmingw32-libstdc++-static -l pl.UTF-8
283 Statyczna biblioteka standardowa C++ - wersja skrośna MinGW32.
285 %package -n crossmingw32-libstdc++-dll
286 Summary: libstdc++ DLL library for Windows
287 Summary(pl.UTF-8): Biblioteka DLL libstdc++ dla Windows
288 Group: Applications/Emulators
289 Requires: crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release}
292 %description -n crossmingw32-libstdc++-dll
293 libstdc++ DLL library for Windows.
295 %description -n crossmingw32-libstdc++-dll -l pl.UTF-8
296 Biblioteka DLL libstdc++ dla Windows.
299 Summary: MinGW32 binary utility development utilities - objc
300 Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - objc
301 Group: Development/Languages
302 Requires: %{name} = %{epoch}:%{version}-%{release}
305 crossmingw32 is a complete cross-compiling development system for
306 building stand-alone Microsoft Windows applications under Linux using
307 the MinGW32 build libraries. This includes a binutils, gcc with g++
308 and objc, and libstdc++, all cross targeted to i386-mingw32, along
309 with supporting Win32 libraries in 'coff' format from free sources.
311 This package contains cross targeted objc compiler.
313 %description objc -l pl.UTF-8
314 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
315 pozwalającym budować aplikacje MS Windows pod Linuksem używając
316 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
317 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
318 z bibliotek w formacie COFF.
320 Ten pakiet zawiera kompilator objc generujący kod pod Win32.
323 Summary: MinGW32 binary utility development utilities - objc++
324 Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - objc++
325 Group: Development/Languages
326 Requires: %{name}-objc = %{epoch}:%{version}-%{release}
329 crossmingw32 is a complete cross-compiling development system for
330 building stand-alone Microsoft Windows applications under Linux using
331 the MinGW32 build libraries. This includes a binutils, gcc with g++
332 and objc, and libstdc++, all cross targeted to i386-mingw32, along
333 with supporting Win32 libraries in 'coff' format from free sources.
335 This package contains Objective C++ support.
337 %description objc++ -l pl.UTF-8
338 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
339 pozwalającym budować aplikacje MS Windows pod Linuksem używając
340 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
341 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
342 z bibliotek w formacie COFF.
344 Ten pakiet zawiera obsługę języka Objective C++.
346 %package -n crossmingw32-libobjc-static
347 Summary: Static Objective C library - cross MinGW32 version
348 Summary(pl.UTF-8): Statyczna biblioteka Objective C - wersja skrośna MinGW32
349 Group: Development/Libraries
350 Requires: %{name}-objc = %{epoch}:%{version}-%{release}
352 %description -n crossmingw32-libobjc-static
353 Static Objective C library - cross MinGW32 version.
355 %description -n crossmingw32-libobjc-static -l pl.UTF-8
356 Statyczna biblioteka Objective C - wersja skrośna MinGW32.
358 %package -n crossmingw32-libobjc-dll
359 Summary: libobjc DLL library for Windows
360 Summary(pl.UTF-8): Biblioteka DLL libobjc dla Windows
361 Group: Applications/Emulators
362 Requires: crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release}
365 %description -n crossmingw32-libobjc-dll
366 libobjc DLL library for Windows.
368 %description -n crossmingw32-libobjc-dll -l pl.UTF-8
369 Biblioteka DLL libobjc dla Windows.
372 Summary: MinGW32 binary utility development utilities - Fortran
373 Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - Fortran
374 Group: Development/Languages
375 Requires: %{name} = %{epoch}:%{version}-%{release}
376 Requires: crossmingw32-libquadmath = %{epoch}:%{version}-%{release}
377 Obsoletes: crossmingw32-gcc-g77
380 crossmingw32 is a complete cross-compiling development system for
381 building stand-alone Microsoft Windows applications under Linux using
382 the MinGW32 build libraries. This includes a binutils, gcc with g++
383 and objc, and libstdc++, all cross targeted to i386-mingw32, along
384 with supporting Win32 libraries in 'coff' format from free sources.
386 This package contains cross targeted Fortran compiler.
388 %description fortran -l pl.UTF-8
389 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
390 pozwalającym budować aplikacje MS Windows pod Linuksem używając
391 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
392 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
393 z bibliotek w formacie COFF.
395 Ten pakiet zawiera kompilator Fortranu generujący kod pod Win32.
397 %package -n crossmingw32-libgfortran-static
398 Summary: Static Fortran library - cross MinGW32 version
399 Summary(pl.UTF-8): Statyczna biblioteka Fortranu - wersja skrośna MinGW32
400 Group: Development/Libraries
401 Requires: %{name}-fortran = %{epoch}:%{version}-%{release}
403 %description -n crossmingw32-libgfortran-static
404 Static Fortran library - cross MinGW32 version.
406 %description -n crossmingw32-libgfortran-static -l pl.UTF-8
407 Statyczna biblioteka Fortranu - wersja skrośna MinGW32.
409 %package -n crossmingw32-libgfortran-dll
410 Summary: libgfortran DLL library for Windows
411 Summary(pl.UTF-8): Biblioteka DLL libgfortran dla Windows
412 Group: Applications/Emulators
413 Requires: crossmingw32-libquadmath-dll
415 %description -n crossmingw32-libgfortran-dll
416 libgfortran DLL library for Windows.
418 %description -n crossmingw32-libgfortran-dll -l pl.UTF-8
419 Biblioteka DLL libgfortran dla Windows.
421 %package -n crossmingw32-libquadmath
422 Summary: GCC __float128 support library - cross MinGW32 version
423 Summary(pl.UTF-8): Biblioteka do obsługi typu __float128 - wersja skrośna MinGW32
424 License: GPL v2+ with linking exception
425 Group: Development/Libraries
426 Requires: %{name} = %{epoch}:%{version}-%{release}
428 %description -n crossmingw32-libquadmath
429 This package contains cross MinGW32 version of GCC support library
430 which is needed for __float128 math support and for Fortran REAL*16
433 %description -n crossmingw32-libquadmath -l pl.UTF-8
434 Ten pakiet zawiera wersję skrośną MinGW32 biblioteki GCC do obsługi
435 operacji matematycznych na zmiennych typu __float128 oraz typu REAL*16
438 %package -n crossmingw32-libquadmath-static
439 Summary: Static GCC __float128 support library - cross MinGW32 version
440 Summary(pl.UTF-8): Biblioteka statyczna GCC do obsługi typu __float128 - wersja skrośna MinGW32
441 License: GPL v2+ with linking exception
442 Group: Development/Libraries
443 Requires: crossmingw32-libquadmath = %{epoch}:%{version}-%{release}
445 %description -n crossmingw32-libquadmath-static
446 Static GCC __float128 support library - cross MinGW32 version.
448 %description -n crossmingw32-libquadmath-static -l pl.UTF-8
449 Biblioteka statyczna GCC do obsługi typu __float128 - wersja skrośna
452 %package -n crossmingw32-libquadmath-dll
453 Summary: DLL GCC __float128 support library for Windows
454 Summary(pl.UTF-8): Biblioteka DLL GCC do obsługi typu __float128 dla Windows
455 License: GPL v2+ with linking exception
456 Group: Applications/Emulators
459 %description -n crossmingw32-libquadmath-dll
460 DLL GCC __float128 support library for Windows.
462 %description -n crossmingw32-libquadmath-dll -l pl.UTF-8
463 Biblioteka DLL GCC do obsługi typu __float128 dla Windows.
466 Summary: MinGW32 binary utility development utilities - Java
467 Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - Java
468 Group: Development/Languages
469 Requires: %{name} = %{epoch}:%{version}-%{release}
472 crossmingw32 is a complete cross-compiling development system for
473 building stand-alone Microsoft Windows applications under Linux using
474 the MinGW32 build libraries. This includes a binutils, gcc with g++
475 and objc, and libstdc++, all cross targeted to i386-mingw32, along
476 with supporting Win32 libraries in 'coff' format from free sources.
478 This package contains cross targeted Java compiler.
480 %description java -l pl.UTF-8
481 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
482 pozwalającym budować aplikacje MS Windows pod Linuksem używając
483 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
484 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
485 z bibliotek w formacie COFF.
487 Ten pakiet zawiera kompilator Javy generujący kod pod Win32.
490 %setup -q -n gcc-%{version}
497 %if %{with bootstrap}
498 # note: "winsup" dir is special, handled by gcc's configure
499 install -d winsup/mingw
500 tar xf %{SOURCE1} -C winsup/mingw
503 # override snapshot version.
504 echo %{version} > gcc/BASE-VER
505 echo "release" > gcc/DEV-PHASE
509 %{__aclocal} -I .. -I ../config
514 rm -rf builddir && install -d builddir && cd builddir
515 %if %{with bootstrap}
516 install -d %{target}/winsup
517 ln -sf ../../../winsup/mingw/lib %{target}/winsup/mingw
518 ln -sf ../../../winsup/mingw/include %{target}/winsup/w32api
519 WINSUPDIR=$(cd ..; pwd)/winsup
522 # note: libbacktrace requires at least i486 now
524 CFLAGS="%{rpmcflags}" \
525 CXXFLAGS="%{rpmcxxflags}" \
527 CFLAGS_FOR_TARGET="-O2 -march=i486" \
528 CXXFLAGS_FOR_TARGET="-O2 -march=i486" \
530 --prefix=%{sysprefix} \
531 --bindir=%{arch}/bin \
532 --libdir=%{_libdir} \
533 --includedir=%{arch}/include \
534 --libexecdir=%{_libdir} \
535 --infodir=%{_infodir} \
536 --mandir=%{_mandir} \
537 --with-build-time-tools=%{arch}/bin \
538 %{!?with_bootstrap:--with-headers=%{arch}/include} \
539 --with-libs=%{!?with_bootstrap:%{arch}/lib}%{?with_bootstrap:${WINSUPDIR}/mingw/lib} \
540 --with-demangler-in-ld \
544 --with-long-double-128 \
546 --enable-fully-dynamic-string \
547 --disable-isl-version-check \
548 --enable-languages="c,c++,fortran,java,objc,obj-c++" \
550 --enable-libgomp%{!?with_gomp:=no} \
552 --enable-libstdcxx-allocator=new \
553 --enable-linker-build-id \
559 --disable-sjlj-exceptions \
562 --enable-version-specific-runtime-libs \
564 --disable-win32-registry \
568 %{__make} -C builddir all-host
570 %{__make} -C builddir
573 rm -rf $RPM_BUILD_ROOT
574 install -d $RPM_BUILD_ROOT%{_bindir}
576 %{__make} -C builddir install \
577 DESTDIR=$RPM_BUILD_ROOT
579 %{__mv} $RPM_BUILD_ROOT%{gcclibdir}/include-fixed/{limits,syslimits}.h $RPM_BUILD_ROOT%{gcclibdir}/include
580 %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/include-fixed
581 %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/install-tools
583 # these must be symlinks: gcclibdir is calculated relatively to real binary path
584 ln -sf %{arch}/bin/%{target}-gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
585 ln -sf %{arch}/bin/%{target}-g++ $RPM_BUILD_ROOT%{_bindir}/%{target}-g++
586 ln -sf %{arch}/bin/%{target}-cpp $RPM_BUILD_ROOT%{_bindir}/%{target}-cpp
587 ln -sf %{arch}/bin/%{target}-gcov $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov
588 ln -sf %{arch}/bin/%{target}-gcov-dump $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov-dump
589 ln -sf %{arch}/bin/%{target}-gcov-tool $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov-tool
590 ln -sf %{arch}/bin/%{target}-gcj $RPM_BUILD_ROOT%{_bindir}/%{target}-gcj
591 ln -sf %{arch}/bin/%{target}-jcf-dump $RPM_BUILD_ROOT%{_bindir}/%{target}-jcf-dump
592 ln -sf %{arch}/bin/%{target}-gfortran $RPM_BUILD_ROOT%{_bindir}/%{target}-gfortran
595 install -d $RPM_BUILD_ROOT%{_dlldir}
596 %{__mv} $RPM_BUILD_ROOT%{gccarchdir}/*.dll $RPM_BUILD_ROOT%{_dlldir}
597 %{__mv} $RPM_BUILD_ROOT%{gcclibdir}/*.dll $RPM_BUILD_ROOT%{_dlldir}
598 if [ ! -f $RPM_BUILD_ROOT%{_dlldir}/libgcc_s_dw2-1.dll ]; then
599 echo "libgcc DLL not installed?"
600 install builddir/i386-mingw32/libgcc/shlib/libgcc_s_dw2-1.dll $RPM_BUILD_ROOT%{_dlldir}
604 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
605 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{gcclibdir}/lib*.a
608 # avoid -L poisoning in *.la
609 for f in libatomic.la libcaf_single.la libgfortran.la libobjc.la libquadmath.la %{?with_gomp:libgomp.la} ; do
610 file="$RPM_BUILD_ROOT%{gcclibdir}/$f"
611 %{__perl} %{SOURCE2} "$file" %{gcclibdir} >"${file}.fixed"
612 %{__mv} "${file}.fixed" "$file"
615 # for pretty-printers see native gcc
616 %{__rm} $RPM_BUILD_ROOT%{gcclibdir}/libstdc++.dll.a-gdb.py
617 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/gcc-%{version}/python/libstdcxx
618 # no plugin development for mingw32 (at least for now)
619 %{__rm} $RPM_BUILD_ROOT%{gcclibdir}/liblto_plugin.la
620 %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/plugin
621 # already in native gcc
622 %{__rm} -r $RPM_BUILD_ROOT%{_infodir}
623 # common FSF man pages
624 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man7/{fsf-funding,gfdl,gpl}.7
625 # programs not packaged
626 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/%{target}-{aot-compile,gc-analyze,gcj-dbtool,gij,grmic,jv-convert,rebuild-gcj-db}.1
629 rm -rf $RPM_BUILD_ROOT
632 %defattr(644,root,root,755)
633 %attr(755,root,root) %{_bindir}/%{target}-gcc
634 %attr(755,root,root) %{_bindir}/%{target}-cpp
635 %attr(755,root,root) %{_bindir}/%{target}-gcov
636 %attr(755,root,root) %{_bindir}/%{target}-gcov-dump
637 %attr(755,root,root) %{_bindir}/%{target}-gcov-tool
638 %attr(755,root,root) %{arch}/bin/%{target}-gcc
639 %attr(755,root,root) %{arch}/bin/%{target}-gcc-%{version}
640 %attr(755,root,root) %{arch}/bin/%{target}-gcc-ar
641 %attr(755,root,root) %{arch}/bin/%{target}-gcc-nm
642 %attr(755,root,root) %{arch}/bin/%{target}-gcc-ranlib
643 %attr(755,root,root) %{arch}/bin/%{target}-cpp
644 %attr(755,root,root) %{arch}/bin/%{target}-gcov
645 %attr(755,root,root) %{arch}/bin/%{target}-gcov-dump
646 %attr(755,root,root) %{arch}/bin/%{target}-gcov-tool
649 %attr(755,root,root) %{gcclibdir}/cc1
650 %attr(755,root,root) %{gcclibdir}/collect2
651 %attr(755,root,root) %{gcclibdir}/lto-wrapper
652 %attr(755,root,root) %{gcclibdir}/lto1
653 %attr(755,root,root) %{gcclibdir}/liblto_plugin.so*
654 %{gcclibdir}/libgcc.a
655 %{gcclibdir}/libgcc_eh.a
656 %{gcclibdir}/libgcc_s.a
657 %{gcclibdir}/libgcov.a
658 %{gcclibdir}/crtbegin.o
659 %{gcclibdir}/crtend.o
660 %{gcclibdir}/crtfastmath.o
661 %dir %{gcclibdir}/include
662 %{gcclibdir}/include/*.h
663 %{_mandir}/man1/%{target}-cpp.1*
664 %{_mandir}/man1/%{target}-gcc.1*
665 %{_mandir}/man1/%{target}-gcov.1*
666 %{_mandir}/man1/%{target}-gcov-dump.1*
667 %{_mandir}/man1/%{target}-gcov-tool.1*
669 %files -n crossmingw32-libgcc-dll
670 %defattr(644,root,root,755)
671 %{_dlldir}/libgcc_s_dw2-1.dll
673 %files -n crossmingw32-libatomic
674 %defattr(644,root,root,755)
675 %{gcclibdir}/libatomic.dll.a
676 %{gcclibdir}/libatomic.la
678 %files -n crossmingw32-libatomic-static
679 %defattr(644,root,root,755)
680 %{gcclibdir}/libatomic.a
682 %files -n crossmingw32-libatomic-dll
683 %defattr(644,root,root,755)
684 %{_dlldir}/libatomic-1.dll
687 %files -n crossmingw32-libgomp
688 %defattr(644,root,root,755)
689 %{gcclibdir}/libgomp.dll.a
690 %{gcclibdir}/libgomp.la
691 %{gcclibdir}/libgomp.spec
693 %files -n crossmingw32-libgomp-static
694 %defattr(644,root,root,755)
695 %{gcclibdir}/libgomp.a
697 %files -n crossmingw32-libgomp-dll
698 %defattr(644,root,root,755)
699 %{_dlldir}/libgomp-1.dll
702 %files -n crossmingw32-libvtv
703 %defattr(644,root,root,755)
704 %{gcclibdir}/libvtv.dll.a
705 %{gcclibdir}/libvtv.la
706 %{gcclibdir}/libvtv_stubs.dll.a
707 %{gcclibdir}/libvtv_stubs.la
709 %files -n crossmingw32-libvtv-static
710 %defattr(644,root,root,755)
711 %{gcclibdir}/libvtv.a
712 %{gcclibdir}/libvtv_stubs.a
714 %files -n crossmingw32-libvtv-dll
715 %defattr(644,root,root,755)
716 %{_dlldir}/libvtv-0.dll
717 %{_dlldir}/libvtv_stubs-0.dll
720 %defattr(644,root,root,755)
721 %attr(755,root,root) %{_bindir}/%{target}-g++
722 %attr(755,root,root) %{arch}/bin/%{target}-c++
723 %attr(755,root,root) %{arch}/bin/%{target}-g++
724 %attr(755,root,root) %{gcclibdir}/cc1plus
725 %{gcclibdir}/libstdc++.dll.a
726 %{gcclibdir}/libstdc++.la
727 %{gcclibdir}/libsupc++.la
728 %{gcclibdir}/libsupc++.a
729 %{gcclibdir}/include/c++
730 %{_mandir}/man1/%{target}-g++.1*
732 %files -n crossmingw32-libstdc++-static
733 %defattr(644,root,root,755)
734 %{gcclibdir}/libstdc++.a
736 %files -n crossmingw32-libstdc++-dll
737 %defattr(644,root,root,755)
738 %{_dlldir}/libstdc++-6.dll
741 %defattr(644,root,root,755)
743 %attr(755,root,root) %{gcclibdir}/cc1obj
744 %{gcclibdir}/libobjc.dll.a
745 %{gcclibdir}/libobjc.la
746 %{gcclibdir}/include/objc
749 %defattr(644,root,root,755)
750 %doc gcc/objcp/ChangeLog
751 %attr(755,root,root) %{gcclibdir}/cc1objplus
753 %files -n crossmingw32-libobjc-static
754 %defattr(644,root,root,755)
755 %{gcclibdir}/libobjc.a
757 %files -n crossmingw32-libobjc-dll
758 %defattr(644,root,root,755)
759 %{_dlldir}/libobjc-4.dll
762 %defattr(644,root,root,755)
763 %attr(755,root,root) %{_bindir}/%{target}-gfortran
764 %attr(755,root,root) %{arch}/bin/%{target}-gfortran
765 %attr(755,root,root) %{gcclibdir}/f951
766 %{gcclibdir}/finclude
767 %{gcclibdir}/libcaf_single.a
768 %{gcclibdir}/libcaf_single.la
769 %{gcclibdir}/libgfortran.dll.a
770 %{gcclibdir}/libgfortran.la
771 %{gcclibdir}/libgfortran.spec
772 %{_mandir}/man1/%{target}-gfortran.1*
774 %files -n crossmingw32-libgfortran-static
775 %defattr(644,root,root,755)
776 %{gcclibdir}/libgfortran.a
778 %files -n crossmingw32-libgfortran-dll
779 %defattr(644,root,root,755)
780 %{_dlldir}/libgfortran-3.dll
782 %files -n crossmingw32-libquadmath
783 %defattr(644,root,root,755)
784 %{gcclibdir}/libquadmath.dll.a
785 %{gcclibdir}/libquadmath.la
787 %files -n crossmingw32-libquadmath-static
788 %defattr(644,root,root,755)
789 %{gcclibdir}/libquadmath.a
791 %files -n crossmingw32-libquadmath-dll
792 %defattr(644,root,root,755)
793 %{_dlldir}/libquadmath-0.dll
796 %defattr(644,root,root,755)
797 %attr(755,root,root) %{_bindir}/%{target}-gcj
798 %attr(755,root,root) %{_bindir}/%{target}-jcf-dump
799 %attr(755,root,root) %{arch}/bin/%{target}-gcj
800 %attr(755,root,root) %{arch}/bin/%{target}-jcf-dump
801 %attr(755,root,root) %{gcclibdir}/jc1
802 %attr(755,root,root) %{gcclibdir}/jvgenmain
803 %{_mandir}/man1/%{target}-gcj.1*
804 %{_mandir}/man1/%{target}-jcf-dump.1*