3 %bcond_with bootstrap # bootstrap build (using binary w32api/mingw)
5 Summary: Cross Mingw32 GNU binary utility development utilities - gcc
6 Summary(es.UTF-8): Utilitarios para desarrollo de binarios de la GNU - Mingw32 gcc
7 Summary(fr.UTF-8): Utilitaires de développement binaire de GNU - Mingw32 gcc
8 Summary(pl.UTF-8): Skrośne narzędzia programistyczne GNU dla Mingw32 - gcc
9 Summary(pt_BR.UTF-8): Utilitários para desenvolvimento de binários da GNU - Mingw32 gcc
10 Summary(tr.UTF-8): GNU geliştirme araçları - Mingw32 gcc
11 Name: crossmingw32-gcc
16 Group: Development/Languages
17 Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
18 # Source0-md5: a4a3eb15c96030906d8494959eeda23c
20 Source1: http://dl.sourceforge.net/mingw/w32api-%{apiver}.tar.gz
21 # Source1-md5: b53fdf670f33d2e901749f4792e659f2
23 Source2: http://dl.sourceforge.net/mingw/mingw-runtime-%{runver}.tar.gz
24 # Source2-md5: e1c21f8c4ece49d8bd9fef9e1b0e44a7
25 Patch0: gcc-nodebug.patch
26 Patch1: %{name}-noioctl.patch
27 BuildRequires: autoconf
28 BuildRequires: automake
30 BuildRequires: crossmingw32-binutils >= 2.15.91.0.2-2
32 %if !%{with bootstrap}
33 BuildRequires: crossmingw32-runtime >= 3.5
34 BuildRequires: crossmingw32-w32api >= 3.1
36 BuildRequires: mpfr-devel
37 Requires: crossmingw32-binutils >= 2.15.91.0.2-2
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 %define target i386-mingw32
42 %define target_platform i386-pc-mingw32
43 %define arch %{_prefix}/%{target}
44 %define gccarch %{_libdir}/gcc/%{target}
45 %define gcclib %{gccarch}/%{version}
47 %define _noautostrip .*/lib.*\\.a
50 crossmingw32 is a complete cross-compiling development system for
51 building stand-alone Microsoft Windows applications under Linux using
52 the Mingw32 build libraries. This includes a binutils, gcc with g++
53 and objc, and libstdc++, all cross targeted to i386-mingw32, along
54 with supporting Win32 libraries in 'coff' format from free sources.
56 This package contains cross targeted gcc.
58 %description -l de.UTF-8
59 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
60 anderem Rechner Code für Win32 zu generieren.
62 %description -l pl.UTF-8
63 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
64 pozwalającym budować aplikacje MS Windows pod Linuksem używając
65 bibliotek Mingw32. System składa się z binutils, gcc z g++ i objc,
66 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
67 z bibliotek w formacie COFF.
69 Ten pakiet zawiera gcc generujące skrośnie kod dla Win32.
72 Summary: Mingw32 binary utility development utilities - g++
73 Summary(pl.UTF-8): Zestaw narzędzi mingw32 - g++
74 Group: Development/Languages
75 Requires: %{name} = %{epoch}:%{version}-%{release}
78 crossmingw32 is a complete cross-compiling development system for
79 building stand-alone Microsoft Windows applications under Linux using
80 the Mingw32 build libraries. This includes a binutils, gcc with g++
81 and objc, and libstdc++, all cross targeted to i386-mingw32, along
82 with supporting Win32 libraries in 'coff' format from free sources.
84 This package contains cross targeted g++ and (static) libstdc++.
86 %description c++ -l pl.UTF-8
87 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
88 pozwalającym budować aplikacje MS Windows pod Linuksem używając
89 bibliotek mingw32. System składa się z binutils, gcc z g++ i objc,
90 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
91 z bibliotek w formacie COFF.
93 Ten pakiet zawiera g++ generujące kod pod Win32 oraz bibliotekę
96 # does this even work?
98 Summary: Mingw32 binary utility development utilities - objc
99 Summary(pl.UTF-8): Zestaw narzędzi mingw32 - objc
100 Group: Development/Languages
101 Requires: %{name} = %{epoch}:%{version}-%{release}
104 crossmingw32 is a complete cross-compiling development system for
105 building stand-alone Microsoft Windows applications under Linux using
106 the Mingw32 build libraries. This includes a binutils, gcc with g++
107 and objc, and libstdc++, all cross targeted to i386-mingw32, along
108 with supporting Win32 libraries in 'coff' format from free sources.
110 This package contains cross targeted objc compiler.
112 %description objc -l pl.UTF-8
113 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
114 pozwalającym budować aplikacje MS Windows pod Linuksem używając
115 bibliotek mingw32. System składa się z binutils, gcc z g++ i objc,
116 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
117 z bibliotek w formacie COFF.
119 Ten pakiet zawiera kompilator objc generujący kod pod Win32.
121 # does this even work?
123 Summary: Mingw32 binary utility development utilities - Fortran
124 Summary(pl.UTF-8): Zestaw narzędzi mingw32 - Fortran
125 Group: Development/Languages
126 Requires: %{name} = %{epoch}:%{version}-%{release}
127 Obsoletes: crossmingw32-gcc-g77
130 crossmingw32 is a complete cross-compiling development system for
131 building stand-alone Microsoft Windows applications under Linux using
132 the Mingw32 build libraries. This includes a binutils, gcc with g++
133 and objc, and libstdc++, all cross targeted to i386-mingw32, along
134 with supporting Win32 libraries in 'coff' format from free sources.
136 This package contains cross targeted Fortran compiler.
138 %description fortran -l pl.UTF-8
139 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
140 pozwalającym budować aplikacje MS Windows pod Linuksem używając
141 bibliotek mingw32. System składa się z binutils, gcc z g++ i objc,
142 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
143 z bibliotek w formacie COFF.
145 Ten pakiet zawiera kompilator Fortranu generujący kod pod Win32.
147 # does this even work?
149 Summary: Mingw32 binary utility development utilities - Java
150 Summary(pl.UTF-8): Zestaw narzędzi mingw32 - Java
151 Group: Development/Languages
152 Requires: %{name} = %{epoch}:%{version}-%{release}
155 crossmingw32 is a complete cross-compiling development system for
156 building stand-alone Microsoft Windows applications under Linux using
157 the Mingw32 build libraries. This includes a binutils, gcc with g++
158 and objc, and libstdc++, all cross targeted to i386-mingw32, along
159 with supporting Win32 libraries in 'coff' format from free sources.
161 This package contains cross targeted Java compiler.
163 %description java -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 Javy generujący kod pod Win32.
174 %setup -q -n gcc-%{version}
175 %if %{with bootstrap}
177 tar xzf %{SOURCE1} -C winsup
178 tar xzf %{SOURCE2} -C winsup
180 #{!?debug:%patch0 -p1}
184 %if %{with bootstrap}
185 for tool in as ar dlltool ld nm ranlib strip ; do
186 ln -sf %{arch}/bin/$tool winsup/bin/$tool
188 build_tooldir=`pwd`/winsup
190 build_tooldir=%{arch}
193 cp /usr/share/automake/config.sub .
194 cp /usr/share/automake/config.sub boehm-gc
196 rm -rf obj-%{target_platform}
197 install -d obj-%{target_platform}
198 cd obj-%{target_platform}
200 # note: alpha's -mieee and sparc's -mtune=* are not valid for target's g++
201 CFLAGS="%{rpmcflags}" \
203 CXXFLAGS="`echo '%{rpmcflags}' | sed -e 's/ \?-mieee\>//'`" \
205 %ifarch sparc sparc64 sparcv9
206 CXXFLAGS="`echo '%{rpmcflags}' | sed -e 's/ \?-mtune[=0-9a-z]*//'`" \
208 CXXFLAGS="%{rpmcflags}" \
211 LDFLAGS="%{rpmldflags}" \
214 --prefix=%{_prefix} \
215 --infodir=%{_infodir} \
216 --mandir=%{_mandir} \
217 --bindir=%{arch}/bin \
218 --libdir=%{_libdir} \
219 --libexecdir=%{_libexecdir} \
220 --includedir=%{arch}/include \
223 --enable-languages="c,c++,fortran,java,objc" \
229 --with-mangler-in-ld \
230 --with-gxx-include-dir=%{arch}/include/g++ \
231 --build=%{_target_platform} \
232 --host=%{_target_platform} \
237 # spec files for msvcrt*.dll configurations
239 for n in msvcrt msvcrt20 msvcrt40; do
240 sed "s/crtdll/$n/g" <specs | sed "s/crt1/crt2/g" >specs.$n
244 rm -rf $RPM_BUILD_ROOT
245 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}}
247 cd obj-%{target_platform}
250 DESTDIR=$RPM_BUILD_ROOT
253 install specs.msvcrt specs.msvcrt20 specs.msvcrt40 $RPM_BUILD_ROOT%{gcclib}
256 mv -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-* $RPM_BUILD_ROOT%{_bindir}
258 # already in arch/lib, shouldn't be here
259 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
261 # include/ contains install-tools/include/* and headers that were fixed up
262 # by fixincludes, we don't want former
263 gccdir=$RPM_BUILD_ROOT%{gcclib}
265 # we have to save these however
266 mv -f $gccdir/include/syslimits.h $gccdir/tmp
267 rm -rf $gccdir/include
268 mv -f $gccdir/tmp $gccdir/include
269 cp -f $gccdir/install-tools/include/*.h $gccdir/include
270 # but we don't want anything more from install-tools
271 rm -rf $gccdir/install-tools
274 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcc.a
275 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcov.a
276 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{arch}/lib/lib*.a
280 ln -f $RPM_BUILD_ROOT%{_bindir}/%{target}-{g++,c++}
281 ln -f $RPM_BUILD_ROOT%{arch}/bin/{g++,c++}
283 # the same... make hardlink
284 ln -f $RPM_BUILD_ROOT%{arch}/bin/gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
287 rm -rf $RPM_BUILD_ROOT
290 %defattr(644,root,root,755)
291 %attr(755,root,root) %{_bindir}/%{target}-gcc*
292 %attr(755,root,root) %{_bindir}/%{target}-cpp
293 %attr(755,root,root) %{_bindir}/%{target}-gcov
294 %attr(755,root,root) %{arch}/bin/gcc
295 %{arch}/lib/libiberty.a
299 %attr(755,root,root) %{gcclib}/cc1
300 %attr(755,root,root) %{gcclib}/collect2
306 %{_mandir}/man1/%{target}-cpp.1*
307 %{_mandir}/man1/%{target}-gcc.1*
308 %{_mandir}/man1/%{target}-gcov.1*
311 %{arch}/lib/libssp.la
312 %{arch}/lib/libssp_nonshared.a
313 %{arch}/lib/libssp_nonshared.la
316 %defattr(644,root,root,755)
317 %attr(755,root,root) %{_bindir}/%{target}-[cg]++
318 %attr(755,root,root) %{arch}/bin/[cg]++
319 %attr(755,root,root) %{gcclib}/cc1plus
320 %{arch}/lib/libstdc++.a
321 %{arch}/lib/libstdc++.la
322 %{arch}/lib/libsupc++.a
323 %{arch}/lib/libsupc++.la
325 %{_mandir}/man1/%{target}-g++.1*
328 %defattr(644,root,root,755)
329 %attr(755,root,root) %{gcclib}/cc1obj
330 %{arch}/lib/libobjc.a
331 %{arch}/lib/libobjc.la
334 %defattr(644,root,root,755)
335 %attr(755,root,root) %{_bindir}/%{target}-gfortran
336 %attr(755,root,root) %{arch}/bin/gfortran
337 %attr(755,root,root) %{gcclib}/f951
338 %{arch}/lib/libgfortran.a
339 %{arch}/lib/libgfortran.la
340 %{arch}/lib/libgfortranbegin.a
341 %{arch}/lib/libgfortranbegin.la
342 %{_mandir}/man1/%{target}-gfortran.1*
345 %defattr(644,root,root,755)
346 %attr(755,root,root) %{_bindir}/%{target}-gcj
347 %attr(755,root,root) %{_bindir}/%{target}-gcjh
348 %attr(755,root,root) %{_bindir}/%{target}-gjnih
349 %attr(755,root,root) %{_bindir}/%{target}-grepjar
350 %attr(755,root,root) %{_bindir}/%{target}-fastjar
351 %attr(755,root,root) %{_bindir}/%{target}-jcf-dump
352 %attr(755,root,root) %{_bindir}/%{target}-jv-scan
353 #%attr(755,root,root) %{arch}/bin/grepjar
354 #%attr(755,root,root) %{arch}/bin/jar
355 %attr(755,root,root) %{gcclib}/jc1
356 %attr(755,root,root) %{gcclib}/jvgenmain
357 %{_mandir}/man1/%{target}-gcj.1*
358 %{_mandir}/man1/%{target}-gcjh.1*
359 %{_mandir}/man1/%{target}-gjnih.1*
360 %{_mandir}/man1/%{target}-grepjar.1*
361 %{_mandir}/man1/%{target}-fastjar.1*
362 %{_mandir}/man1/%{target}-jcf-dump.1*
363 %{_mandir}/man1/%{target}-jv-scan.1*