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: 7067a6b3ac9d94bb753f9f6f37e2033c
23 Source2: http://dl.sourceforge.net/mingw/mingw-runtime-%{runver}.tar.gz
24 # Source2-md5: 22179021f41d5eee76447b78fb94a3fb
25 Patch0: gcc-4.1-nodebug.patch
26 Patch1: %{name}-noioctl.patch
27 Patch2: gcc-4.1-texinfo.patch
28 Patch3: gcc-4.1-pr29826.patch
29 BuildRequires: autoconf
30 BuildRequires: automake
32 BuildRequires: crossmingw32-binutils >= 2.15.91.0.2-2
34 %if %{without bootstrap}
35 BuildRequires: crossmingw32-runtime >= 3.5
36 BuildRequires: crossmingw32-w32api >= 3.1
38 BuildRequires: mpfr-devel
39 BuildRequires: texinfo >= 4.2
40 Requires: crossmingw32-binutils >= 2.15.91.0.2-2
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 %define target i386-mingw32
45 %define target_platform i386-pc-mingw32
46 %define arch %{_prefix}/%{target}
47 %define gccarch %{_libdir}/gcc/%{target}
48 %define gcclib %{gccarch}/%{version}
50 %define _noautostrip .*/lib.*\\.a
53 crossmingw32 is a complete cross-compiling development system for
54 building stand-alone Microsoft Windows applications under Linux using
55 the Mingw32 build libraries. This includes a binutils, gcc with g++
56 and objc, and libstdc++, all cross targeted to i386-mingw32, along
57 with supporting Win32 libraries in 'coff' format from free sources.
59 This package contains cross targeted gcc.
61 %description -l de.UTF-8
62 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
63 anderem Rechner Code für Win32 zu generieren.
65 %description -l pl.UTF-8
66 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
67 pozwalającym budować aplikacje MS Windows pod Linuksem używając
68 bibliotek Mingw32. System składa się z binutils, gcc z g++ i objc,
69 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
70 z bibliotek w formacie COFF.
72 Ten pakiet zawiera gcc generujące skrośnie kod dla Win32.
75 Summary: Mingw32 binary utility development utilities - g++
76 Summary(pl.UTF-8): Zestaw narzędzi mingw32 - g++
77 Group: Development/Languages
78 Requires: %{name} = %{epoch}:%{version}-%{release}
81 crossmingw32 is a complete cross-compiling development system for
82 building stand-alone Microsoft Windows applications under Linux using
83 the Mingw32 build libraries. This includes a binutils, gcc with g++
84 and objc, and libstdc++, all cross targeted to i386-mingw32, along
85 with supporting Win32 libraries in 'coff' format from free sources.
87 This package contains cross targeted g++ and (static) libstdc++.
89 %description c++ -l pl.UTF-8
90 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
91 pozwalającym budować aplikacje MS Windows pod Linuksem używając
92 bibliotek mingw32. System składa się z binutils, gcc z g++ i objc,
93 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
94 z bibliotek w formacie COFF.
96 Ten pakiet zawiera g++ generujące kod pod Win32 oraz bibliotekę
99 # does this even work?
101 Summary: Mingw32 binary utility development utilities - objc
102 Summary(pl.UTF-8): Zestaw narzędzi mingw32 - objc
103 Group: Development/Languages
104 Requires: %{name} = %{epoch}:%{version}-%{release}
107 crossmingw32 is a complete cross-compiling development system for
108 building stand-alone Microsoft Windows applications under Linux using
109 the Mingw32 build libraries. This includes a binutils, gcc with g++
110 and objc, and libstdc++, all cross targeted to i386-mingw32, along
111 with supporting Win32 libraries in 'coff' format from free sources.
113 This package contains cross targeted objc compiler.
115 %description objc -l pl.UTF-8
116 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
117 pozwalającym budować aplikacje MS Windows pod Linuksem używając
118 bibliotek mingw32. System składa się z binutils, gcc z g++ i objc,
119 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
120 z bibliotek w formacie COFF.
122 Ten pakiet zawiera kompilator objc generujący kod pod Win32.
124 # does this even work?
126 Summary: Mingw32 binary utility development utilities - Fortran
127 Summary(pl.UTF-8): Zestaw narzędzi mingw32 - Fortran
128 Group: Development/Languages
129 Requires: %{name} = %{epoch}:%{version}-%{release}
130 Obsoletes: crossmingw32-gcc-g77
133 crossmingw32 is a complete cross-compiling development system for
134 building stand-alone Microsoft Windows applications under Linux using
135 the Mingw32 build libraries. This includes a binutils, gcc with g++
136 and objc, and libstdc++, all cross targeted to i386-mingw32, along
137 with supporting Win32 libraries in 'coff' format from free sources.
139 This package contains cross targeted Fortran compiler.
141 %description fortran -l pl.UTF-8
142 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
143 pozwalającym budować aplikacje MS Windows pod Linuksem używając
144 bibliotek mingw32. System składa się z binutils, gcc z g++ i objc,
145 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
146 z bibliotek w formacie COFF.
148 Ten pakiet zawiera kompilator Fortranu generujący kod pod Win32.
150 # does this even work?
152 Summary: Mingw32 binary utility development utilities - Java
153 Summary(pl.UTF-8): Zestaw narzędzi mingw32 - Java
154 Group: Development/Languages
155 Requires: %{name} = %{epoch}:%{version}-%{release}
158 crossmingw32 is a complete cross-compiling development system for
159 building stand-alone Microsoft Windows applications under Linux using
160 the Mingw32 build libraries. This includes a binutils, gcc with g++
161 and objc, and libstdc++, all cross targeted to i386-mingw32, along
162 with supporting Win32 libraries in 'coff' format from free sources.
164 This package contains cross targeted Java compiler.
166 %description java -l pl.UTF-8
168 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
169 pozwalającym budować aplikacje MS Windows pod Linuksem używając
170 bibliotek mingw32. System składa się z binutils, gcc z g++ i objc,
171 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
172 z bibliotek w formacie COFF.
174 Ten pakiet zawiera kompilator Javy generujący kod pod Win32.
177 %setup -q -n gcc-%{version}
178 %if %{with bootstrap}
180 tar xzf %{SOURCE1} -C winsup
181 tar xzf %{SOURCE2} -C winsup
183 %{!?debug:%patch0 -p1}
190 %if %{with bootstrap}
191 for tool in as ar dlltool ld nm ranlib strip ; do
192 ln -sf %{arch}/bin/$tool winsup/bin/$tool
194 build_tooldir=`pwd`/winsup
196 build_tooldir=%{arch}
199 cp /usr/share/automake/config.sub .
200 cp /usr/share/automake/config.sub boehm-gc
201 # avoid autoconf call, breaks build
203 rm -rf obj-%{target_platform}
204 install -d obj-%{target_platform}
205 cd obj-%{target_platform}
207 # note: alpha's -mieee and sparc's -mtune=* are not valid for target's g++
208 CFLAGS="%{rpmcflags}" \
210 CXXFLAGS="`echo '%{rpmcflags}' | sed -e 's/ \?-mieee\>//'`" \
212 %ifarch sparc sparc64 sparcv9
213 CXXFLAGS="`echo '%{rpmcflags}' | sed -e 's/ \?-mtune[=0-9a-z]*//'`" \
215 CXXFLAGS="%{rpmcflags}" \
218 LDFLAGS="%{rpmldflags}" \
221 --prefix=%{_prefix} \
222 --infodir=%{_infodir} \
223 --mandir=%{_mandir} \
224 --bindir=%{arch}/bin \
225 --libdir=%{_libdir} \
226 --libexecdir=%{_libexecdir} \
227 --includedir=%{arch}/include \
230 --enable-languages="c,c++,fortran,java,objc" \
236 --with-mangler-in-ld \
237 --with-gxx-include-dir=%{arch}/include/g++ \
238 --build=%{_target_platform} \
239 --host=%{_target_platform} \
244 # spec files for msvcrt*.dll configurations
246 for n in msvcrt msvcrt20 msvcrt40; do
247 sed "s/crtdll/$n/g" <specs | sed "s/crt1/crt2/g" >specs.$n
251 rm -rf $RPM_BUILD_ROOT
252 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}}
254 cd obj-%{target_platform}
257 DESTDIR=$RPM_BUILD_ROOT
260 install specs.msvcrt specs.msvcrt20 specs.msvcrt40 $RPM_BUILD_ROOT%{gcclib}
263 mv -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-* $RPM_BUILD_ROOT%{_bindir}
265 # already in arch/lib, shouldn't be here
266 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
268 # include/ contains install-tools/include/* and headers that were fixed up
269 # by fixincludes, we don't want former
270 gccdir=$RPM_BUILD_ROOT%{gcclib}
272 # we have to save these however
273 mv -f $gccdir/include/syslimits.h $gccdir/tmp
274 rm -rf $gccdir/include
275 mv -f $gccdir/tmp $gccdir/include
276 cp -f $gccdir/install-tools/include/*.h $gccdir/include
277 # but we don't want anything more from install-tools
278 rm -rf $gccdir/install-tools
281 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcc.a
282 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcov.a
283 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{arch}/lib/lib*.a
287 ln -f $RPM_BUILD_ROOT%{_bindir}/%{target}-{g++,c++}
288 ln -f $RPM_BUILD_ROOT%{arch}/bin/{g++,c++}
290 # the same... make hardlink
291 ln -f $RPM_BUILD_ROOT%{arch}/bin/gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
294 rm -rf $RPM_BUILD_ROOT
297 %defattr(644,root,root,755)
298 %attr(755,root,root) %{_bindir}/%{target}-gcc*
299 %attr(755,root,root) %{_bindir}/%{target}-cpp
300 %attr(755,root,root) %{_bindir}/%{target}-gcov
301 %attr(755,root,root) %{arch}/bin/gcc
302 %{arch}/lib/libiberty.a
306 %attr(755,root,root) %{gcclib}/cc1
307 %attr(755,root,root) %{gcclib}/collect2
313 %{_mandir}/man1/%{target}-cpp.1*
314 %{_mandir}/man1/%{target}-gcc.1*
315 %{_mandir}/man1/%{target}-gcov.1*
318 %{arch}/lib/libssp.la
319 %{arch}/lib/libssp_nonshared.a
320 %{arch}/lib/libssp_nonshared.la
323 %defattr(644,root,root,755)
324 %attr(755,root,root) %{_bindir}/%{target}-[cg]++
325 %attr(755,root,root) %{arch}/bin/[cg]++
326 %attr(755,root,root) %{gcclib}/cc1plus
327 %{arch}/lib/libstdc++.a
328 %{arch}/lib/libstdc++.la
329 %{arch}/lib/libsupc++.a
330 %{arch}/lib/libsupc++.la
332 %{_mandir}/man1/%{target}-g++.1*
335 %defattr(644,root,root,755)
336 %attr(755,root,root) %{gcclib}/cc1obj
337 %{arch}/lib/libobjc.a
338 %{arch}/lib/libobjc.la
341 %defattr(644,root,root,755)
342 %attr(755,root,root) %{_bindir}/%{target}-gfortran
343 %attr(755,root,root) %{arch}/bin/gfortran
344 %attr(755,root,root) %{gcclib}/f951
345 %{arch}/lib/libgfortran.a
346 %{arch}/lib/libgfortran.la
347 %{arch}/lib/libgfortranbegin.a
348 %{arch}/lib/libgfortranbegin.la
349 %{_mandir}/man1/%{target}-gfortran.1*
352 %defattr(644,root,root,755)
353 %attr(755,root,root) %{_bindir}/%{target}-gcj
354 %attr(755,root,root) %{_bindir}/%{target}-gcjh
355 %attr(755,root,root) %{_bindir}/%{target}-gjnih
356 %attr(755,root,root) %{_bindir}/%{target}-grepjar
357 %attr(755,root,root) %{_bindir}/%{target}-fastjar
358 %attr(755,root,root) %{_bindir}/%{target}-jcf-dump
359 %attr(755,root,root) %{_bindir}/%{target}-jv-scan
360 #%attr(755,root,root) %{arch}/bin/grepjar
361 #%attr(755,root,root) %{arch}/bin/jar
362 %attr(755,root,root) %{gcclib}/jc1
363 %attr(755,root,root) %{gcclib}/jvgenmain
364 %{_mandir}/man1/%{target}-gcj.1*
365 %{_mandir}/man1/%{target}-gcjh.1*
366 %{_mandir}/man1/%{target}-gjnih.1*
367 %{_mandir}/man1/%{target}-grepjar.1*
368 %{_mandir}/man1/%{target}-fastjar.1*
369 %{_mandir}/man1/%{target}-jcf-dump.1*
370 %{_mandir}/man1/%{target}-jv-scan.1*