3 %bcond_with bootstrap # bootstrap build (using binary w32api/mingw)
5 Summary: Cross Mingw32 GNU binary utility development utilities - gcc
6 Summary(es): Utilitarios para desarrollo de binarios de la GNU - Mingw32 gcc
7 Summary(fr): Utilitaires de développement binaire de GNU - Mingw32 gcc
8 Summary(pl): Skro¶ne narzêdzia programistyczne GNU dla Mingw32 - gcc
9 Summary(pt_BR): Utilitários para desenvolvimento de binários da GNU - Mingw32 gcc
10 Summary(tr): 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: ad9f97a4d04982ccf4fd67cb464879f3
20 Source1: http://dl.sourceforge.net/mingw/w32api-%{apiver}.tar.gz
21 # Source1-md5: 0b3a6d08136581c93b3a3207588acea9
23 Source2: http://dl.sourceforge.net/mingw/mingw-runtime-%{runver}.tar.gz
24 # Source2-md5: 0cb66b1071da224ea2174f960c593e2e
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 %{without bootstrap}
33 BuildRequires: crossmingw32-runtime >= 3.5
34 BuildRequires: crossmingw32-w32api >= 3.1
36 Requires: crossmingw32-binutils >= 2.15.91.0.2-2
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 %define target i386-mingw32
41 %define target_platform i386-pc-mingw32
42 %define arch %{_prefix}/%{target}
43 %define gccarch %{_libdir}/gcc/%{target}
44 %define gcclib %{gccarch}/%{version}
46 %define _noautostrip .*/lib.*\\.a
49 crossmingw32 is a complete cross-compiling development system for
50 building stand-alone Microsoft Windows applications under Linux using
51 the Mingw32 build libraries. This includes a binutils, gcc with g++
52 and objc, and libstdc++, all cross targeted to i386-mingw32, along
53 with supporting Win32 libraries in 'coff' format from free sources.
55 This package contains cross targeted gcc.
58 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
59 anderem Rechner Code für Win32 zu generieren.
62 crossmingw32 jest kompletnym systemem do kompilacji skro¶nej,
63 pozwalaj±cym budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c
64 bibliotek Mingw32. System sk³ada siê z binutils, gcc z g++ i objc,
65 libstdc++ - wszystkie generuj±ce kod dla platformy i386-mingw32, oraz
66 z bibliotek w formacie COFF.
68 Ten pakiet zawiera gcc generuj±ce skro¶nie kod dla Win32.
71 Summary: Mingw32 binary utility development utilities - g++
72 Summary(pl): Zestaw narzêdzi mingw32 - g++
73 Group: Development/Languages
74 Requires: %{name} = %{epoch}:%{version}-%{release}
77 crossmingw32 is a complete cross-compiling development system for
78 building stand-alone Microsoft Windows applications under Linux using
79 the Mingw32 build libraries. This includes a binutils, gcc with g++
80 and objc, and libstdc++, all cross targeted to i386-mingw32, along
81 with supporting Win32 libraries in 'coff' format from free sources.
83 This package contains cross targeted g++ and (static) libstdc++.
85 %description c++ -l pl
86 crossmingw32 jest kompletnym systemem do kompilacji skro¶nej,
87 pozwalaj±cym budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c
88 bibliotek mingw32. System sk³ada siê z binutils, gcc z g++ i objc,
89 libstdc++ - wszystkie generuj±ce kod dla platformy i386-mingw32, oraz
90 z bibliotek w formacie COFF.
92 Ten pakiet zawiera g++ generuj±ce kod pod Win32 oraz bibliotekê
95 # does this even work?
97 Summary: Mingw32 binary utility development utilities - objc
98 Summary(pl): Zestaw narzêdzi mingw32 - objc
99 Group: Development/Languages
100 Requires: %{name} = %{epoch}:%{version}-%{release}
103 crossmingw32 is a complete cross-compiling development system for
104 building stand-alone Microsoft Windows applications under Linux using
105 the Mingw32 build libraries. This includes a binutils, gcc with g++
106 and objc, and libstdc++, all cross targeted to i386-mingw32, along
107 with supporting Win32 libraries in 'coff' format from free sources.
109 This package contains cross targeted objc compiler.
111 %description objc -l pl
112 crossmingw32 jest kompletnym systemem do kompilacji skro¶nej,
113 pozwalaj±cym budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c
114 bibliotek mingw32. System sk³ada siê z binutils, gcc z g++ i objc,
115 libstdc++ - wszystkie generuj±ce kod dla platformy i386-mingw32, oraz
116 z bibliotek w formacie COFF.
118 Ten pakiet zawiera kompilator objc generuj±cy kod pod Win32.
120 # does this even work?
122 Summary: Mingw32 binary utility development utilities - Fortran
123 Summary(pl): Zestaw narzêdzi mingw32 - Fortran
124 Group: Development/Languages
125 Requires: %{name} = %{epoch}:%{version}-%{release}
126 Obsoletes: crossmingw32-gcc-g77
129 crossmingw32 is a complete cross-compiling development system for
130 building stand-alone Microsoft Windows applications under Linux using
131 the Mingw32 build libraries. This includes a binutils, gcc with g++
132 and objc, and libstdc++, all cross targeted to i386-mingw32, along
133 with supporting Win32 libraries in 'coff' format from free sources.
135 This package contains cross targeted Fortran compiler.
137 %description fortran -l pl
138 crossmingw32 jest kompletnym systemem do kompilacji skro¶nej,
139 pozwalaj±cym budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c
140 bibliotek mingw32. System sk³ada siê z binutils, gcc z g++ i objc,
141 libstdc++ - wszystkie generuj±ce kod dla platformy i386-mingw32, oraz
142 z bibliotek w formacie COFF.
144 Ten pakiet zawiera kompilator Fortranu generuj±cy kod pod Win32.
146 # does this even work?
148 Summary: Mingw32 binary utility development utilities - Java
149 Summary(pl): Zestaw narzêdzi mingw32 - Java
150 Group: Development/Languages
151 Requires: %{name} = %{epoch}:%{version}-%{release}
154 crossmingw32 is a complete cross-compiling development system for
155 building stand-alone Microsoft Windows applications under Linux using
156 the Mingw32 build libraries. This includes a binutils, gcc with g++
157 and objc, and libstdc++, all cross targeted to i386-mingw32, along
158 with supporting Win32 libraries in 'coff' format from free sources.
160 This package contains cross targeted Java compiler.
162 %description java -l pl
164 crossmingw32 jest kompletnym systemem do kompilacji skro¶nej,
165 pozwalaj±cym budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c
166 bibliotek mingw32. System sk³ada siê z binutils, gcc z g++ i objc,
167 libstdc++ - wszystkie generuj±ce kod dla platformy i386-mingw32, oraz
168 z bibliotek w formacie COFF.
170 Ten pakiet zawiera kompilator Javy generuj±cy kod pod Win32.
173 %setup -q -n gcc-%{version}
174 %if %{with bootstrap}
176 tar xzf %{SOURCE1} -C winsup
177 tar xzf %{SOURCE2} -C winsup
179 #{!?debug:%patch0 -p1}
183 %if %{with bootstrap}
184 for tool in as ar dlltool ld nm ranlib strip ; do
185 ln -sf %{arch}/bin/$tool winsup/bin/$tool
187 build_tooldir=`pwd`/winsup
189 build_tooldir=%{arch}
192 cp /usr/share/automake/config.sub .
193 cp /usr/share/automake/config.sub boehm-gc
195 rm -rf obj-%{target_platform}
196 install -d obj-%{target_platform}
197 cd obj-%{target_platform}
199 # note: alpha's -mieee and sparc's -mtune=* are not valid for target's g++
200 CFLAGS="%{rpmcflags}" \
202 CXXFLAGS="`echo '%{rpmcflags}' | sed -e 's/ \?-mieee\>//'`" \
204 %ifarch sparc sparc64 sparcv9
205 CXXFLAGS="`echo '%{rpmcflags}' | sed -e 's/ \?-mtune[=0-9a-z]*//'`" \
207 CXXFLAGS="%{rpmcflags}" \
210 LDFLAGS="%{rpmldflags}" \
213 --prefix=%{_prefix} \
214 --infodir=%{_infodir} \
215 --mandir=%{_mandir} \
216 --bindir=%{arch}/bin \
217 --libdir=%{_libdir} \
218 --libexecdir=%{_libexecdir} \
219 --includedir=%{arch}/include \
222 --enable-languages="c,c++,fortran,java,objc" \
228 --with-mangler-in-ld \
229 --with-gxx-include-dir=%{arch}/include/g++ \
230 --build=%{_target_platform} \
231 --host=%{_target_platform} \
236 # spec files for msvcrt*.dll configurations
238 for n in msvcrt msvcrt20 msvcrt40; do
239 sed "s/crtdll/$n/g" <specs | sed "s/crt1/crt2/g" >specs.$n
243 rm -rf $RPM_BUILD_ROOT
244 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}}
246 cd obj-%{target_platform}
249 DESTDIR=$RPM_BUILD_ROOT
252 install specs.msvcrt specs.msvcrt20 specs.msvcrt40 $RPM_BUILD_ROOT%{gcclib}
255 mv -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-* $RPM_BUILD_ROOT%{_bindir}
257 # already in arch/lib, shouldn't be here
258 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
260 # include/ contains install-tools/include/* and headers that were fixed up
261 # by fixincludes, we don't want former
262 gccdir=$RPM_BUILD_ROOT%{gcclib}
264 # we have to save these however
265 mv -f $gccdir/include/syslimits.h $gccdir/tmp
266 rm -rf $gccdir/include
267 mv -f $gccdir/tmp $gccdir/include
268 cp -f $gccdir/install-tools/include/*.h $gccdir/include
269 # but we don't want anything more from install-tools
270 rm -rf $gccdir/install-tools
273 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcc.a
274 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcov.a
275 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{arch}/lib/lib*.a
279 ln -f $RPM_BUILD_ROOT%{_bindir}/%{target}-{g++,c++}
280 ln -f $RPM_BUILD_ROOT%{arch}/bin/{g++,c++}
282 # the same... make hardlink
283 ln -f $RPM_BUILD_ROOT%{arch}/bin/gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
286 rm -rf $RPM_BUILD_ROOT
289 %defattr(644,root,root,755)
290 %attr(755,root,root) %{_bindir}/%{target}-gcc*
291 %attr(755,root,root) %{_bindir}/%{target}-cpp
292 %attr(755,root,root) %{_bindir}/%{target}-gcov
293 %attr(755,root,root) %{arch}/bin/gcc
294 %{arch}/lib/libiberty.a
298 %attr(755,root,root) %{gcclib}/cc1
299 %attr(755,root,root) %{gcclib}/collect2
305 %{_mandir}/man1/%{target}-cpp.1*
306 %{_mandir}/man1/%{target}-gcc.1*
307 %{_mandir}/man1/%{target}-gcov.1*
310 %{arch}/lib/libssp.la
311 %{arch}/lib/libssp_nonshared.a
312 %{arch}/lib/libssp_nonshared.la
315 %defattr(644,root,root,755)
316 %attr(755,root,root) %{_bindir}/%{target}-[cg]++
317 %attr(755,root,root) %{arch}/bin/[cg]++
318 %attr(755,root,root) %{gcclib}/cc1plus
319 %{arch}/lib/libstdc++.a
320 %{arch}/lib/libstdc++.la
321 %{arch}/lib/libsupc++.a
322 %{arch}/lib/libsupc++.la
324 %{_mandir}/man1/%{target}-g++.1*
327 %defattr(644,root,root,755)
328 %attr(755,root,root) %{gcclib}/cc1obj
329 %{arch}/lib/libobjc.a
330 %{arch}/lib/libobjc.la
333 %defattr(644,root,root,755)
334 %attr(755,root,root) %{_bindir}/%{target}-gfortran
335 %attr(755,root,root) %{arch}/bin/gfortran
336 %attr(755,root,root) %{gcclib}/f951
337 %{arch}/lib/libgfortran.a
338 %{arch}/lib/libgfortran.la
339 %{arch}/lib/libgfortranbegin.a
340 %{arch}/lib/libgfortranbegin.la
341 %{_mandir}/man1/%{target}-gfortran.1*
344 %defattr(644,root,root,755)
345 %attr(755,root,root) %{_bindir}/%{target}-gcj
346 %attr(755,root,root) %{_bindir}/%{target}-gcjh
347 %attr(755,root,root) %{_bindir}/%{target}-grepjar
348 %attr(755,root,root) %{_bindir}/%{target}-fastjar
349 %attr(755,root,root) %{_bindir}/%{target}-jcf-dump
350 %attr(755,root,root) %{_bindir}/%{target}-jv-scan
351 #%attr(755,root,root) %{arch}/bin/grepjar
352 #%attr(755,root,root) %{arch}/bin/jar
353 %attr(755,root,root) %{gcclib}/jc1
354 %attr(755,root,root) %{gcclib}/jvgenmain
355 %{_mandir}/man1/%{target}-gcj.1*
356 %{_mandir}/man1/%{target}-gcjh.1*
357 %{_mandir}/man1/%{target}-grepjar.1*
358 %{_mandir}/man1/%{target}-fastjar.1*
359 %{_mandir}/man1/%{target}-jcf-dump.1*
360 %{_mandir}/man1/%{target}-jv-scan.1*