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
52 %define _enable_debug_packages 0
55 crossmingw32 is a complete cross-compiling development system for
56 building stand-alone Microsoft Windows applications under Linux using
57 the Mingw32 build libraries. This includes a binutils, gcc with g++
58 and objc, and libstdc++, all cross targeted to i386-mingw32, along
59 with supporting Win32 libraries in 'coff' format from free sources.
61 This package contains cross targeted gcc.
63 %description -l de.UTF-8
64 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
65 anderem Rechner Code für Win32 zu generieren.
67 %description -l pl.UTF-8
68 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
69 pozwalającym budować aplikacje MS Windows pod Linuksem używając
70 bibliotek Mingw32. System składa się z binutils, gcc z g++ i objc,
71 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
72 z bibliotek w formacie COFF.
74 Ten pakiet zawiera gcc generujące skrośnie kod dla Win32.
77 Summary: Mingw32 binary utility development utilities - g++
78 Summary(pl.UTF-8): Zestaw narzędzi mingw32 - g++
79 Group: Development/Languages
80 Requires: %{name} = %{epoch}:%{version}-%{release}
83 crossmingw32 is a complete cross-compiling development system for
84 building stand-alone Microsoft Windows applications under Linux using
85 the Mingw32 build libraries. This includes a binutils, gcc with g++
86 and objc, and libstdc++, all cross targeted to i386-mingw32, along
87 with supporting Win32 libraries in 'coff' format from free sources.
89 This package contains cross targeted g++ and (static) libstdc++.
91 %description c++ -l pl.UTF-8
92 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
93 pozwalającym budować aplikacje MS Windows pod Linuksem używając
94 bibliotek mingw32. System składa się z binutils, gcc z g++ i objc,
95 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
96 z bibliotek w formacie COFF.
98 Ten pakiet zawiera g++ generujące kod pod Win32 oraz bibliotekę
101 # does this even work?
103 Summary: Mingw32 binary utility development utilities - objc
104 Summary(pl.UTF-8): Zestaw narzędzi mingw32 - objc
105 Group: Development/Languages
106 Requires: %{name} = %{epoch}:%{version}-%{release}
109 crossmingw32 is a complete cross-compiling development system for
110 building stand-alone Microsoft Windows applications under Linux using
111 the Mingw32 build libraries. This includes a binutils, gcc with g++
112 and objc, and libstdc++, all cross targeted to i386-mingw32, along
113 with supporting Win32 libraries in 'coff' format from free sources.
115 This package contains cross targeted objc compiler.
117 %description objc -l pl.UTF-8
118 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
119 pozwalającym budować aplikacje MS Windows pod Linuksem używając
120 bibliotek mingw32. System składa się z binutils, gcc z g++ i objc,
121 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
122 z bibliotek w formacie COFF.
124 Ten pakiet zawiera kompilator objc generujący kod pod Win32.
126 # does this even work?
128 Summary: Mingw32 binary utility development utilities - Fortran
129 Summary(pl.UTF-8): Zestaw narzędzi mingw32 - Fortran
130 Group: Development/Languages
131 Requires: %{name} = %{epoch}:%{version}-%{release}
132 Obsoletes: crossmingw32-gcc-g77
135 crossmingw32 is a complete cross-compiling development system for
136 building stand-alone Microsoft Windows applications under Linux using
137 the Mingw32 build libraries. This includes a binutils, gcc with g++
138 and objc, and libstdc++, all cross targeted to i386-mingw32, along
139 with supporting Win32 libraries in 'coff' format from free sources.
141 This package contains cross targeted Fortran compiler.
143 %description fortran -l pl.UTF-8
144 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
145 pozwalającym budować aplikacje MS Windows pod Linuksem używając
146 bibliotek mingw32. System składa się z binutils, gcc z g++ i objc,
147 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
148 z bibliotek w formacie COFF.
150 Ten pakiet zawiera kompilator Fortranu generujący kod pod Win32.
152 # does this even work?
154 Summary: Mingw32 binary utility development utilities - Java
155 Summary(pl.UTF-8): Zestaw narzędzi mingw32 - Java
156 Group: Development/Languages
157 Requires: %{name} = %{epoch}:%{version}-%{release}
160 crossmingw32 is a complete cross-compiling development system for
161 building stand-alone Microsoft Windows applications under Linux using
162 the Mingw32 build libraries. This includes a binutils, gcc with g++
163 and objc, and libstdc++, all cross targeted to i386-mingw32, along
164 with supporting Win32 libraries in 'coff' format from free sources.
166 This package contains cross targeted Java compiler.
168 %description java -l pl.UTF-8
170 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
171 pozwalającym budować aplikacje MS Windows pod Linuksem używając
172 bibliotek mingw32. System składa się z binutils, gcc z g++ i objc,
173 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
174 z bibliotek w formacie COFF.
176 Ten pakiet zawiera kompilator Javy generujący kod pod Win32.
179 %setup -q -n gcc-%{version}
180 %if %{with bootstrap}
182 tar xzf %{SOURCE1} -C winsup
183 tar xzf %{SOURCE2} -C winsup
185 %{!?debug:%patch0 -p1}
192 %if %{with bootstrap}
193 for tool in as ar dlltool ld nm ranlib strip ; do
194 ln -sf %{arch}/bin/$tool winsup/bin/$tool
196 build_tooldir=`pwd`/winsup
198 build_tooldir=%{arch}
201 cp /usr/share/automake/config.sub .
202 cp /usr/share/automake/config.sub boehm-gc
203 # avoid autoconf call, breaks build
205 rm -rf obj-%{target_platform}
206 install -d obj-%{target_platform}
207 cd obj-%{target_platform}
209 # note: alpha's -mieee and sparc's -mtune=* are not valid for target's g++
210 CFLAGS="%{rpmcflags}" \
212 CXXFLAGS="`echo '%{rpmcflags}' | sed -e 's/ \?-mieee\>//'`" \
214 %ifarch sparc sparc64 sparcv9
215 CXXFLAGS="`echo '%{rpmcflags}' | sed -e 's/ \?-mtune[=0-9a-z]*//'`" \
217 CXXFLAGS="%{rpmcflags}" \
220 LDFLAGS="%{rpmldflags}" \
223 --prefix=%{_prefix} \
224 --infodir=%{_infodir} \
225 --mandir=%{_mandir} \
226 --bindir=%{arch}/bin \
227 --libdir=%{_libdir} \
228 --libexecdir=%{_libexecdir} \
229 --includedir=%{arch}/include \
232 --enable-languages="c,c++,fortran,java,objc" \
238 --with-mangler-in-ld \
239 --with-gxx-include-dir=%{arch}/include/g++ \
240 --build=%{_target_platform} \
241 --host=%{_target_platform} \
246 # spec files for msvcrt*.dll configurations
248 for n in msvcrt msvcrt20 msvcrt40; do
249 sed "s/crtdll/$n/g" <specs | sed "s/crt1/crt2/g" >specs.$n
253 rm -rf $RPM_BUILD_ROOT
254 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}}
256 cd obj-%{target_platform}
259 DESTDIR=$RPM_BUILD_ROOT
262 install specs.msvcrt specs.msvcrt20 specs.msvcrt40 $RPM_BUILD_ROOT%{gcclib}
265 mv -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-* $RPM_BUILD_ROOT%{_bindir}
267 # already in arch/lib, shouldn't be here
268 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
270 # include/ contains install-tools/include/* and headers that were fixed up
271 # by fixincludes, we don't want former
272 gccdir=$RPM_BUILD_ROOT%{gcclib}
274 # we have to save these however
275 mv -f $gccdir/include/syslimits.h $gccdir/tmp
276 rm -rf $gccdir/include
277 mv -f $gccdir/tmp $gccdir/include
278 cp -f $gccdir/install-tools/include/*.h $gccdir/include
279 # but we don't want anything more from install-tools
280 rm -rf $gccdir/install-tools
283 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcc.a
284 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcov.a
285 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{arch}/lib/lib*.a
289 ln -f $RPM_BUILD_ROOT%{_bindir}/%{target}-{g++,c++}
290 ln -f $RPM_BUILD_ROOT%{arch}/bin/{g++,c++}
292 # the same... make hardlink
293 ln -f $RPM_BUILD_ROOT%{arch}/bin/gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
296 rm -rf $RPM_BUILD_ROOT
299 %defattr(644,root,root,755)
300 %attr(755,root,root) %{_bindir}/%{target}-gcc*
301 %attr(755,root,root) %{_bindir}/%{target}-cpp
302 %attr(755,root,root) %{_bindir}/%{target}-gcov
303 %attr(755,root,root) %{arch}/bin/gcc
304 %{arch}/lib/libiberty.a
308 %attr(755,root,root) %{gcclib}/cc1
309 %attr(755,root,root) %{gcclib}/collect2
315 %{_mandir}/man1/%{target}-cpp.1*
316 %{_mandir}/man1/%{target}-gcc.1*
317 %{_mandir}/man1/%{target}-gcov.1*
320 %{arch}/lib/libssp.la
321 %{arch}/lib/libssp_nonshared.a
322 %{arch}/lib/libssp_nonshared.la
325 %defattr(644,root,root,755)
326 %attr(755,root,root) %{_bindir}/%{target}-[cg]++
327 %attr(755,root,root) %{arch}/bin/[cg]++
328 %attr(755,root,root) %{gcclib}/cc1plus
329 %{arch}/lib/libstdc++.a
330 %{arch}/lib/libstdc++.la
331 %{arch}/lib/libsupc++.a
332 %{arch}/lib/libsupc++.la
334 %{_mandir}/man1/%{target}-g++.1*
337 %defattr(644,root,root,755)
338 %attr(755,root,root) %{gcclib}/cc1obj
339 %{arch}/lib/libobjc.a
340 %{arch}/lib/libobjc.la
343 %defattr(644,root,root,755)
344 %attr(755,root,root) %{_bindir}/%{target}-gfortran
345 %attr(755,root,root) %{arch}/bin/gfortran
346 %attr(755,root,root) %{gcclib}/f951
347 %{arch}/lib/libgfortran.a
348 %{arch}/lib/libgfortran.la
349 %{arch}/lib/libgfortranbegin.a
350 %{arch}/lib/libgfortranbegin.la
351 %{_mandir}/man1/%{target}-gfortran.1*
354 %defattr(644,root,root,755)
355 %attr(755,root,root) %{_bindir}/%{target}-gcj
356 %attr(755,root,root) %{_bindir}/%{target}-gcjh
357 %attr(755,root,root) %{_bindir}/%{target}-gjnih
358 %attr(755,root,root) %{_bindir}/%{target}-grepjar
359 %attr(755,root,root) %{_bindir}/%{target}-fastjar
360 %attr(755,root,root) %{_bindir}/%{target}-jcf-dump
361 %attr(755,root,root) %{_bindir}/%{target}-jv-scan
362 #%attr(755,root,root) %{arch}/bin/grepjar
363 #%attr(755,root,root) %{arch}/bin/jar
364 %attr(755,root,root) %{gcclib}/jc1
365 %attr(755,root,root) %{gcclib}/jvgenmain
366 %{_mandir}/man1/%{target}-gcj.1*
367 %{_mandir}/man1/%{target}-gcjh.1*
368 %{_mandir}/man1/%{target}-gjnih.1*
369 %{_mandir}/man1/%{target}-grepjar.1*
370 %{_mandir}/man1/%{target}-fastjar.1*
371 %{_mandir}/man1/%{target}-jcf-dump.1*
372 %{_mandir}/man1/%{target}-jv-scan.1*