3 # - restore languages other than c, c++
7 %bcond_with bootstrap # bootstrap build (using binary w32api/mingwrt)
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: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
22 # Source0-md5: 48231a8e33ed6e058a341c53b819de1a
24 Source1: http://downloads.sourceforge.net/mingw/w32api-%{apiver}-1-mingw32-dev.tar.lzma
25 # Source1-md5: efcbcadd0299a6413d95b9ce919ede9f
27 Source2: http://downloads.sourceforge.net/mingw/mingwrt-%{runver}-mingw32-dev.tar.gz
28 # Source2-md5: e49803d8c14b1ffa6e24e5b5fee31a3d
29 # svn diff -x --ignore-eol-style svn://gcc.gnu.org/svn/gcc/tags/gcc_4_5_1_release svn://gcc.gnu.org/svn/gcc/branches/gcc-4_5-branch > gcc-branch.diff
30 Patch100: gcc-branch.diff
31 Patch0: %{name}-buildsystem1.patch
32 Patch1: %{name}-buildsystem2.patch
33 Patch2: %{name}-lfs.patch
34 BuildRequires: autoconf
35 BuildRequires: automake
37 BuildRequires: crossmingw32-binutils >= 2.15.91.0.2-2
39 BuildRequires: libmpc-devel
40 %if %{without bootstrap}
41 BuildRequires: crossmingw32-runtime >= 3.5
42 BuildRequires: crossmingw32-w32api >= 3.1
44 BuildRequires: mpfr-devel
45 BuildRequires: texinfo >= 4.2
46 %if %{with booststrap}
47 BuildRequires: tar >= 1:1.22
50 Requires: crossmingw32-binutils >= 2.15.91.0.2-2
52 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54 %define target i386-mingw32
55 %define arch %{_prefix}/%{target}
56 %define gccarchdir %{_libdir}/gcc/%{target}
57 %define gcclibdir %{gccarchdir}/%{version}
58 %define _dlldir /usr/share/wine/windows/system
60 %define _noautostrip .*/lib.*\\.a
62 %define _enable_debug_packages 0
65 crossmingw32 is a complete cross-compiling development system for
66 building stand-alone Microsoft Windows applications under Linux using
67 the MinGW32 build libraries. This includes a binutils, gcc with g++
68 and objc, and libstdc++, all cross targeted to i386-mingw32, along
69 with supporting Win32 libraries in 'coff' format from free sources.
71 This package contains cross targeted gcc.
73 %description -l de.UTF-8
74 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
75 anderem Rechner Code für Win32 zu generieren.
77 %description -l pl.UTF-8
78 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
79 pozwalającym budować aplikacje MS Windows pod Linuksem używając
80 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
81 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
82 z bibliotek w formacie COFF.
84 Ten pakiet zawiera gcc generujące skrośnie kod dla Win32.
86 %package -n crossmingw32-libgcc-dll
87 Summary: libgcc DLL library for Windows
88 Summary(pl.UTF-8): Biblioteka DLL libgcc dla Windows
89 Group: Applications/Emulators
92 %description -n crossmingw32-libgcc-dll
93 libgcc DLL library for Windows.
95 %description -n crossmingw32-libgcc-dll -l pl.UTF-8
96 Biblioteka DLL libgcc dla Windows.
99 Summary: MinGW32 binary utility development utilities - g++
100 Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - g++
101 Group: Development/Languages
102 Requires: %{name} = %{epoch}:%{version}-%{release}
105 crossmingw32 is a complete cross-compiling development system for
106 building stand-alone Microsoft Windows applications under Linux using
107 the MinGW32 build libraries. This includes a binutils, gcc with g++
108 and objc, and libstdc++, all cross targeted to i386-mingw32, along
109 with supporting Win32 libraries in 'coff' format from free sources.
111 This package contains cross targeted g++ and (static) libstdc++.
113 %description c++ -l pl.UTF-8
114 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
115 pozwalającym budować aplikacje MS Windows pod Linuksem używając
116 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
117 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
118 z bibliotek w formacie COFF.
120 Ten pakiet zawiera g++ generujące kod pod Win32 oraz bibliotekę
123 %package -n crossmingw32-libstdc++-static
124 Summary: Static standard C++ library - cross MinGW32 version
125 Summary(pl.UTF-8): Statyczna biblioteka standardowa C++ - wersja skrośna MinGW32
126 Group: Development/Libraries
127 Requires: %{name}-c++ = %{epoch}:%{version}-%{release}
129 %description -n crossmingw32-libstdc++-static
130 Static standard C++ library - cross MinGW32 version.
132 %description -n crossmingw32-libstdc++-static -l pl.UTF-8
133 Statyczna biblioteka standardowa C++ - wersja skrośna MinGW32.
135 %package -n crossmingw32-libstdc++-dll
136 Summary: libstdc++ DLL library for Windows
137 Summary(pl.UTF-8): Biblioteka DLL libstdc++ dla Windows
138 Group: Applications/Emulators
139 Requires: crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release}
142 %description -n crossmingw32-libstdc++-dll
143 libstdc++ DLL library for Windows.
145 %description -n crossmingw32-libstdc++-dll -l pl.UTF-8
146 Biblioteka DLL libstdc++ dla Windows.
148 # does this even work?
150 Summary: MinGW32 binary utility development utilities - objc
151 Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - objc
152 Group: Development/Languages
153 Requires: %{name} = %{epoch}:%{version}-%{release}
156 crossmingw32 is a complete cross-compiling development system for
157 building stand-alone Microsoft Windows applications under Linux using
158 the MinGW32 build libraries. This includes a binutils, gcc with g++
159 and objc, and libstdc++, all cross targeted to i386-mingw32, along
160 with supporting Win32 libraries in 'coff' format from free sources.
162 This package contains cross targeted objc compiler.
164 %description objc -l pl.UTF-8
165 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
166 pozwalającym budować aplikacje MS Windows pod Linuksem używając
167 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
168 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
169 z bibliotek w formacie COFF.
171 Ten pakiet zawiera kompilator objc generujący kod pod Win32.
173 # does this even work?
175 Summary: MinGW32 binary utility development utilities - Fortran
176 Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - Fortran
177 Group: Development/Languages
178 Requires: %{name} = %{epoch}:%{version}-%{release}
179 Obsoletes: crossmingw32-gcc-g77
182 crossmingw32 is a complete cross-compiling development system for
183 building stand-alone Microsoft Windows applications under Linux using
184 the MinGW32 build libraries. This includes a binutils, gcc with g++
185 and objc, and libstdc++, all cross targeted to i386-mingw32, along
186 with supporting Win32 libraries in 'coff' format from free sources.
188 This package contains cross targeted Fortran compiler.
190 %description fortran -l pl.UTF-8
191 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
192 pozwalającym budować aplikacje MS Windows pod Linuksem używając
193 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
194 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
195 z bibliotek w formacie COFF.
197 Ten pakiet zawiera kompilator Fortranu generujący kod pod Win32.
199 # does this even work?
201 Summary: MinGW32 binary utility development utilities - Java
202 Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - Java
203 Group: Development/Languages
204 Requires: %{name} = %{epoch}:%{version}-%{release}
207 crossmingw32 is a complete cross-compiling development system for
208 building stand-alone Microsoft Windows applications under Linux using
209 the MinGW32 build libraries. This includes a binutils, gcc with g++
210 and objc, and libstdc++, all cross targeted to i386-mingw32, along
211 with supporting Win32 libraries in 'coff' format from free sources.
213 This package contains cross targeted Java compiler.
215 %description java -l pl.UTF-8
216 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
217 pozwalającym budować aplikacje MS Windows pod Linuksem używając
218 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
219 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
220 z bibliotek w formacie COFF.
222 Ten pakiet zawiera kompilator Javy generujący kod pod Win32.
225 %setup -q -n gcc-%{version}
230 %if %{with bootstrap}
231 # note: "winsup" dirs below are special, handled by gcc's configure
232 install -d winsup/{mingw,w32api}
233 tar xf %{SOURCE1} -C winsup/w32api
234 tar xf %{SOURCE2} -C winsup/mingw
237 # override snapshot version.
238 echo %{version} > gcc/BASE-VER
239 echo "release" > gcc/DEV-PHASE
242 rm -rf builddir && install -d builddir && cd builddir
243 %if %{with bootstrap}
244 install -d %{target}/winsup
245 # sysroot/%{target}/lib
246 ln -sf ../../../winsup/mingw/lib %{target}/winsup/mingw
247 ln -sf ../../../winsup/w32api %{target}/winsup/w32api
248 WINSUPDIR=$(cd ..; pwd)/winsup
252 CFLAGS="%{rpmcflags}" \
253 CXXFLAGS="%{rpmcxxflags}" \
257 --libdir=%{_libdir} \
258 --libexecdir=%{_libdir} \
259 --infodir=%{_infodir} \
260 --mandir=%{_mandir} \
261 %{!?with_bootstrap:--with-headers=%{arch}/include} \
262 --with-libs=%{!?with_bootstrap:%{arch}/lib}%{?with_bootstrap:${WINSUPDIR}/mingw/lib} \
263 --with-build-time-tools=%{arch}/bin \
267 --with-mangler-in-ld \
268 --with-long-double-128 \
270 --enable-languages="c,c++" \
273 --enable-fully-dynamic-string \
274 --enable-libstdcxx-allocator=new \
275 --enable-version-specific-runtime-libs \
279 --disable-sjlj-exceptions \
280 --disable-win32-registry \
287 %{__make} -C builddir all-host
289 %{__make} -C builddir
292 rm -rf $RPM_BUILD_ROOT
293 install -d $RPM_BUILD_ROOT%{_bindir}
295 %{__make} -C builddir install \
296 DESTDIR=$RPM_BUILD_ROOT
299 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libiberty.a
301 # cross library - strange path
302 install -d $RPM_BUILD_ROOT%{arch}/lib
303 mv -f $RPM_BUILD_ROOT%{arch}/%{target}/lib/libiberty.a $RPM_BUILD_ROOT%{arch}/lib
305 mv $RPM_BUILD_ROOT%{gcclibdir}/include-fixed/{limits,syslimits}.h $RPM_BUILD_ROOT%{gcclibdir}/include
306 %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/include-fixed
307 %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/install-tools
310 ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
311 ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-g++ $RPM_BUILD_ROOT%{_bindir}/%{target}-g++
312 ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-cpp $RPM_BUILD_ROOT%{_bindir}/%{target}-cpp
313 ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-gcov $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov
316 install -d $RPM_BUILD_ROOT%{_dlldir}
317 mv -f $RPM_BUILD_ROOT%{arch}/bin/libstdc++-6.dll $RPM_BUILD_ROOT%{_dlldir}
318 install builddir/i386-mingw32/libgcc/shlib/libgcc_s_dw2-1.dll $RPM_BUILD_ROOT%{_dlldir}
321 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
322 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{gcclibdir}/lib*.a \
323 $RPM_BUILD_ROOT%{arch}/lib/lib*.a
326 # already in native gcc
327 %{__rm} -r $RPM_BUILD_ROOT%{_infodir}
328 # common FSF man pages
329 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man7/{fsf-funding,gfdl,gpl}.7
332 rm -rf $RPM_BUILD_ROOT
335 %defattr(644,root,root,755)
336 %attr(755,root,root) %{_bindir}/%{target}-gcc
337 %attr(755,root,root) %{_bindir}/%{target}-cpp
338 %attr(755,root,root) %{_bindir}/%{target}-gcov
339 %attr(755,root,root) %{arch}/bin/%{target}-gcc
340 %attr(755,root,root) %{arch}/bin/%{target}-gcc-%{version}
341 %attr(755,root,root) %{arch}/bin/%{target}-gccbug
342 %attr(755,root,root) %{arch}/bin/%{target}-cpp
343 %attr(755,root,root) %{arch}/bin/%{target}-gcov
344 %{arch}/lib/libiberty.a
347 %attr(755,root,root) %{gcclibdir}/cc1
348 %attr(755,root,root) %{gcclibdir}/collect2
349 %attr(755,root,root) %{gcclibdir}/lto-wrapper
350 %{gcclibdir}/libgcc.a
351 %{gcclibdir}/libgcc_eh.a
352 %{gcclibdir}/libgcc_s.a
353 %{gcclibdir}/libgcov.a
354 %dir %{gcclibdir}/include
355 %{gcclibdir}/include/*.h
356 %{_mandir}/man1/%{target}-cpp.1*
357 %{_mandir}/man1/%{target}-gcc.1*
358 %{_mandir}/man1/%{target}-gcov.1*
360 %files -n crossmingw32-libgcc-dll
361 %defattr(644,root,root,755)
362 %{_dlldir}/libgcc_s_dw2-1.dll
365 %defattr(644,root,root,755)
366 %attr(755,root,root) %{_bindir}/%{target}-g++
367 %attr(755,root,root) %{arch}/bin/%{target}-c++
368 %attr(755,root,root) %{arch}/bin/%{target}-g++
369 %attr(755,root,root) %{gcclibdir}/cc1plus
370 %{gcclibdir}/libstdc++.dll.a
371 %{gcclibdir}/libstdc++.la
372 %{gcclibdir}/libsupc++.la
373 %{gcclibdir}/libsupc++.a
374 %{gcclibdir}/crtbegin.o
375 %{gcclibdir}/crtend.o
376 %{gcclibdir}/crtfastmath.o
377 %{gcclibdir}/include/c++
378 %{_mandir}/man1/%{target}-g++.1*
380 %files -n crossmingw32-libstdc++-static
381 %defattr(644,root,root,755)
382 %{gcclibdir}/libstdc++.a
384 %files -n crossmingw32-libstdc++-dll
385 %defattr(644,root,root,755)
386 %{_dlldir}/libstdc++-6.dll
388 # no obj-c, fortran, java for the moment
391 %defattr(644,root,root,755)
392 %attr(755,root,root) %{gcclib}/cc1obj
393 %{arch}/lib/libobjc.a
394 %{arch}/lib/libobjc.la
397 %defattr(644,root,root,755)
398 %attr(755,root,root) %{_bindir}/%{target}-gfortran
399 %attr(755,root,root) %{arch}/bin/gfortran
400 %attr(755,root,root) %{gcclib}/f951
401 %{arch}/lib/libgfortran.a
402 %{arch}/lib/libgfortran.la
403 %{arch}/lib/libgfortranbegin.a
404 %{arch}/lib/libgfortranbegin.la
405 %{_mandir}/man1/%{target}-gfortran.1*
408 %defattr(644,root,root,755)
409 %attr(755,root,root) %{_bindir}/%{target}-gcj
410 %attr(755,root,root) %{_bindir}/%{target}-gcjh
411 %attr(755,root,root) %{_bindir}/%{target}-gjnih
412 %attr(755,root,root) %{_bindir}/%{target}-grepjar
413 %attr(755,root,root) %{_bindir}/%{target}-fastjar
414 %attr(755,root,root) %{_bindir}/%{target}-jcf-dump
415 %attr(755,root,root) %{_bindir}/%{target}-jv-scan
416 #%attr(755,root,root) %{arch}/bin/grepjar
417 #%attr(755,root,root) %{arch}/bin/jar
418 %attr(755,root,root) %{gcclib}/jc1
419 %attr(755,root,root) %{gcclib}/jvgenmain
420 %{_mandir}/man1/%{target}-gcj.1*
421 %{_mandir}/man1/%{target}-gcjh.1*
422 %{_mandir}/man1/%{target}-gjnih.1*
423 %{_mandir}/man1/%{target}-grepjar.1*
424 %{_mandir}/man1/%{target}-fastjar.1*
425 %{_mandir}/man1/%{target}-jcf-dump.1*
426 %{_mandir}/man1/%{target}-jv-scan.1*