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: 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
488 # override snapshot version.
489 echo %{version} > gcc/BASE-VER
490 echo "release" > gcc/DEV-PHASE
494 %{__aclocal} -I .. -I ../config
499 rm -rf builddir && install -d builddir && cd builddir
500 %if %{with bootstrap}
501 install -d %{target}/winsup
502 ln -sf ../../../winsup/mingw/lib %{target}/winsup/mingw
503 ln -sf ../../../winsup/w32api %{target}/winsup/w32api
504 WINSUPDIR=$(cd ..; pwd)/winsup
507 # note: libbacktrace requires at least i486 now
509 CFLAGS="%{rpmcflags}" \
510 CXXFLAGS="%{rpmcxxflags}" \
512 CFLAGS_FOR_TARGET="-O2 -march=i486" \
513 CXXFLAGS_FOR_TARGET="-O2 -march=i486" \
515 --prefix=%{sysprefix} \
516 --bindir=%{archbindir} \
517 --libdir=%{_libdir} \
518 --includedir=%{archincludedir} \
519 --libexecdir=%{_libdir} \
520 --infodir=%{_infodir} \
521 --mandir=%{_mandir} \
522 --with-bugurl="http://bugs.pld-linux.org" \
523 --with-build-time-tools=%{archbindir} \
524 %{!?with_bootstrap:--with-headers=%{archincludedir}} \
525 --with-libs=%{!?with_bootstrap:%{archlibdir}}%{?with_bootstrap:${WINSUPDIR}/mingw/lib} \
526 --with-demangler-in-ld \
530 --with-long-double-128 \
531 --with-pkgversion="PLD-Linux" \
533 --enable-fully-dynamic-string \
534 --disable-isl-version-check \
535 --enable-languages="c,c++,fortran,objc,obj-c++" \
537 --enable-libgomp%{!?with_gomp:=no} \
539 --enable-libstdcxx-allocator=new \
540 --enable-linker-build-id \
546 --disable-sjlj-exceptions \
550 --disable-win32-registry \
554 %{__make} -C builddir all-host
556 %{__make} -C builddir
559 rm -rf $RPM_BUILD_ROOT
560 install -d $RPM_BUILD_ROOT%{_bindir}
562 %{__make} -C builddir install \
563 DESTDIR=$RPM_BUILD_ROOT
565 %{__mv} $RPM_BUILD_ROOT%{gcclibdir}/include-fixed/{limits,syslimits}.h $RPM_BUILD_ROOT%{gcclibdir}/include
566 %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/include-fixed
567 %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/install-tools
569 # these must be symlinks: gcclibdir is calculated relatively to real binary path
570 ln -sf %{archbindir}/%{target}-gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
571 ln -sf %{archbindir}/%{target}-g++ $RPM_BUILD_ROOT%{_bindir}/%{target}-g++
572 ln -sf %{archbindir}/%{target}-cpp $RPM_BUILD_ROOT%{_bindir}/%{target}-cpp
573 ln -sf %{archbindir}/%{target}-gcov $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov
574 ln -sf %{archbindir}/%{target}-gcov-dump $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov-dump
575 ln -sf %{archbindir}/%{target}-gcov-tool $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov-tool
576 ln -sf %{archbindir}/%{target}-gfortran $RPM_BUILD_ROOT%{_bindir}/%{target}-gfortran
579 install -d $RPM_BUILD_ROOT%{_dlldir}
580 %{__mv} $RPM_BUILD_ROOT%{archlibdir}/*.dll $RPM_BUILD_ROOT%{_dlldir}
581 if [ ! -f $RPM_BUILD_ROOT%{_dlldir}/libgcc_s_dw2-1.dll ]; then
582 echo "libgcc DLL not installed?"
583 install builddir/i386-mingw32/libgcc/shlib/libgcc_s_dw2-1.dll $RPM_BUILD_ROOT%{_dlldir}
587 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
588 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{archlibdir}/lib*.a
589 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{gcclibdir}/lib*.a
592 # avoid -L poisoning in *.la
593 for f in libatomic.la libgfortran.la libobjc.la libquadmath.la %{?with_gomp:libgomp.la} ; do
594 file="$RPM_BUILD_ROOT%{archlibdir}/$f"
595 %{__perl} %{SOURCE3} "$file" %{gcclibdir} >"${file}.fixed"
596 %{__mv} "${file}.fixed" "$file"
598 for f in libcaf_single.la ; do
599 file="$RPM_BUILD_ROOT%{gcclibdir}/$f"
600 %{__perl} %{SOURCE3} "$file" %{gcclibdir} >"${file}.fixed"
601 %{__mv} "${file}.fixed" "$file"
604 # for pretty-printers see native gcc
605 %{__rm} $RPM_BUILD_ROOT%{archlibdir}/libstdc++.dll.a-gdb.py
606 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/gcc-%{version}/python/libstdcxx
607 # no plugin development for mingw32 (at least for now)
608 %{__rm} $RPM_BUILD_ROOT%{gcclibdir}/liblto_plugin.la
609 %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/plugin
610 # already in native gcc
611 %{__rm} -r $RPM_BUILD_ROOT%{_infodir}
612 # common FSF man pages
613 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man7/{fsf-funding,gfdl,gpl}.7
616 rm -rf $RPM_BUILD_ROOT
619 %defattr(644,root,root,755)
620 %attr(755,root,root) %{_bindir}/%{target}-gcc
621 %attr(755,root,root) %{_bindir}/%{target}-cpp
622 %attr(755,root,root) %{_bindir}/%{target}-gcov
623 %attr(755,root,root) %{_bindir}/%{target}-gcov-dump
624 %attr(755,root,root) %{_bindir}/%{target}-gcov-tool
625 %attr(755,root,root) %{archbindir}/%{target}-cpp
626 %attr(755,root,root) %{archbindir}/%{target}-gcc
627 %attr(755,root,root) %{archbindir}/%{target}-gcc-%{version}
628 %attr(755,root,root) %{archbindir}/%{target}-gcc-ar
629 %attr(755,root,root) %{archbindir}/%{target}-gcc-nm
630 %attr(755,root,root) %{archbindir}/%{target}-gcc-ranlib
631 %attr(755,root,root) %{archbindir}/%{target}-gcov
632 %attr(755,root,root) %{archbindir}/%{target}-gcov-dump
633 %attr(755,root,root) %{archbindir}/%{target}-gcov-tool
634 %{archlibdir}/libgcc_s.a
637 %attr(755,root,root) %{gcclibdir}/cc1
638 %attr(755,root,root) %{gcclibdir}/collect2
639 %attr(755,root,root) %{gcclibdir}/lto-wrapper
640 %attr(755,root,root) %{gcclibdir}/lto1
641 %attr(755,root,root) %{gcclibdir}/liblto_plugin.so*
642 %{gcclibdir}/libgcc.a
643 %{gcclibdir}/libgcc_eh.a
644 %{gcclibdir}/libgcov.a
645 %{gcclibdir}/crtbegin.o
646 %{gcclibdir}/crtend.o
647 %{gcclibdir}/crtfastmath.o
648 %dir %{gcclibdir}/include
649 %{gcclibdir}/include/*.h
650 %{_mandir}/man1/%{target}-cpp.1*
651 %{_mandir}/man1/%{target}-gcc.1*
652 %{_mandir}/man1/%{target}-gcov.1*
653 %{_mandir}/man1/%{target}-gcov-dump.1*
654 %{_mandir}/man1/%{target}-gcov-tool.1*
656 %files -n crossmingw32-libgcc-dll
657 %defattr(644,root,root,755)
658 %{_dlldir}/libgcc_s_dw2-1.dll
660 %files -n crossmingw32-libatomic
661 %defattr(644,root,root,755)
662 %{archlibdir}/libatomic.dll.a
663 %{archlibdir}/libatomic.la
665 %files -n crossmingw32-libatomic-static
666 %defattr(644,root,root,755)
667 %{archlibdir}/libatomic.a
669 %files -n crossmingw32-libatomic-dll
670 %defattr(644,root,root,755)
671 %{_dlldir}/libatomic-1.dll
674 %files -n crossmingw32-libgomp
675 %defattr(644,root,root,755)
676 %{archlibdir}/libgomp.dll.a
677 %{archlibdir}/libgomp.la
678 %{archlibdir}/libgomp.spec
680 %files -n crossmingw32-libgomp-static
681 %defattr(644,root,root,755)
682 %{archlibdir}/libgomp.a
684 %files -n crossmingw32-libgomp-dll
685 %defattr(644,root,root,755)
686 %{_dlldir}/libgomp-1.dll
689 %files -n crossmingw32-libvtv
690 %defattr(644,root,root,755)
691 %{archlibdir}/libvtv.dll.a
692 %{archlibdir}/libvtv.la
693 %{archlibdir}/libvtv_stubs.dll.a
694 %{archlibdir}/libvtv_stubs.la
696 %files -n crossmingw32-libvtv-static
697 %defattr(644,root,root,755)
698 %{archlibdir}/libvtv.a
699 %{archlibdir}/libvtv_stubs.a
701 %files -n crossmingw32-libvtv-dll
702 %defattr(644,root,root,755)
703 %{_dlldir}/libvtv-0.dll
704 %{_dlldir}/libvtv_stubs-0.dll
707 %defattr(644,root,root,755)
708 %attr(755,root,root) %{_bindir}/%{target}-g++
709 %attr(755,root,root) %{archbindir}/%{target}-c++
710 %attr(755,root,root) %{archbindir}/%{target}-g++
711 %attr(755,root,root) %{gcclibdir}/cc1plus
712 %{archlibdir}/libstdc++.dll.a
713 %{archlibdir}/libstdc++.la
714 %{archlibdir}/libsupc++.la
715 %{archlibdir}/libsupc++.a
716 %{archincludedir}/c++
717 %{_mandir}/man1/%{target}-g++.1*
719 %files -n crossmingw32-libstdc++-static
720 %defattr(644,root,root,755)
721 %{archlibdir}/libstdc++.a
723 %files -n crossmingw32-libstdc++-dll
724 %defattr(644,root,root,755)
725 %{_dlldir}/libstdc++-6.dll
728 %defattr(644,root,root,755)
730 %attr(755,root,root) %{gcclibdir}/cc1obj
731 %{archlibdir}/libobjc.dll.a
732 %{archlibdir}/libobjc.la
733 %{gcclibdir}/include/objc
736 %defattr(644,root,root,755)
737 %doc gcc/objcp/ChangeLog
738 %attr(755,root,root) %{gcclibdir}/cc1objplus
740 %files -n crossmingw32-libobjc-static
741 %defattr(644,root,root,755)
742 %{archlibdir}/libobjc.a
744 %files -n crossmingw32-libobjc-dll
745 %defattr(644,root,root,755)
746 %{_dlldir}/libobjc-4.dll
749 %defattr(644,root,root,755)
750 %attr(755,root,root) %{_bindir}/%{target}-gfortran
751 %attr(755,root,root) %{archbindir}/%{target}-gfortran
752 %attr(755,root,root) %{gcclibdir}/f951
753 %{archlibdir}/libgfortran.dll.a
754 %{archlibdir}/libgfortran.la
755 %{archlibdir}/libgfortran.spec
756 %{gcclibdir}/finclude
757 %{gcclibdir}/libcaf_single.a
758 %{gcclibdir}/libcaf_single.la
759 %{_mandir}/man1/%{target}-gfortran.1*
761 %files -n crossmingw32-libgfortran-static
762 %defattr(644,root,root,755)
763 %{archlibdir}/libgfortran.a
765 %files -n crossmingw32-libgfortran-dll
766 %defattr(644,root,root,755)
767 %{_dlldir}/libgfortran-5.dll
769 %files -n crossmingw32-libquadmath
770 %defattr(644,root,root,755)
771 %{archlibdir}/libquadmath.dll.a
772 %{archlibdir}/libquadmath.la
774 %files -n crossmingw32-libquadmath-static
775 %defattr(644,root,root,755)
776 %{archlibdir}/libquadmath.a
778 %files -n crossmingw32-libquadmath-dll
779 %defattr(644,root,root,755)
780 %{_dlldir}/libquadmath-0.dll