3 %bcond_with bootstrap # bootstrap build (using binary w32api/mingw)
5 %define DASHED_SNAP %{nil}
6 %define SNAP %(echo %{DASHED_SNAP} | sed -e "s#-##g")
7 %define GCC_VERSION 3.4.3
9 %define apisrc w32api-%{apiver}
11 %define runsrc mingw-runtime-%{runver}
12 Summary: Cross Mingw32 GNU binary utility development utilities - gcc
13 Summary(es): Utilitarios para desarrollo de binarios de la GNU - Mingw32 gcc
14 Summary(fr): Utilitaires de développement binaire de GNU - Mingw32 gcc
15 Summary(pl): Skro¶ne narzêdzia programistyczne GNU dla Mingw32 - gcc
16 Summary(pt_BR): Utilitários para desenvolvimento de binários da GNU - Mingw32 gcc
17 Summary(tr): GNU geliþtirme araçlarý - Mingw32 gcc
18 Name: crossmingw32-gcc
19 Version: %{GCC_VERSION}
23 Group: Development/Languages
24 Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{GCC_VERSION}/gcc-%{GCC_VERSION}.tar.bz2
25 # Source0-md5: e744b30c834360fccac41eb7269a3011
26 Source1: http://dl.sourceforge.net/mingw/%{apisrc}.tar.gz
27 # Source1-md5: 2529dffea94118865cdc06c1f7ead697
28 Source2: http://dl.sourceforge.net/mingw/%{runsrc}.tar.gz
29 # Source2-md5: 0cb66b1071da224ea2174f960c593e2e
30 Patch0: gcc-nodebug.patch
31 Patch1: %{name}-noioctl.patch
32 BuildRequires: autoconf
33 BuildRequires: automake
35 BuildRequires: crossmingw32-binutils >= 2.15.91.0.2-2
37 %if %{without bootstrap}
38 BuildRequires: crossmingw32-runtime >= 3.5
39 BuildRequires: crossmingw32-w32api >= 3.1
41 Requires: crossmingw32-binutils >= 2.15.91.0.2-2
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 %define no_install_post_strip 1
47 %define target i386-mingw32
48 %define target_platform i386-pc-mingw32
49 %define arch %{_prefix}/%{target}
50 %define gccarch %{_libdir}/gcc/%{target}
51 %define gcclib %{_libdir}/gcc/%{target}/%{version}
54 crossmingw32 is a complete cross-compiling development system for
55 building stand-alone Microsoft Windows applications under Linux using
56 the Mingw32 build libraries. This includes a binutils, gcc with g++
57 and objc, and libstdc++, all cross targeted to i386-mingw32, along
58 with supporting Win32 libraries in 'coff' format from free sources.
60 This package contains cross targeted gcc.
63 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
64 anderem Rechner Code für Win32 zu generieren.
67 crossmingw32 jest kompletnym systemem do kompilacji skro¶nej,
68 pozwalaj±cym budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c
69 bibliotek Mingw32. System sk³ada siê z binutils, gcc z g++ i objc,
70 libstdc++ - wszystkie generuj±ce kod dla platformy i386-mingw32, oraz
71 z bibliotek w formacie COFF.
73 Ten pakiet zawiera gcc generuj±ce skro¶nie kod dla Win32.
76 Summary: Mingw32 binary utility development utilities - g++
77 Summary(pl): Zestaw narzêdzi mingw32 - g++
78 Group: Development/Languages
79 Requires: %{name} = %{epoch}:%{version}-%{release}
82 crossmingw32 is a complete cross-compiling development system for
83 building stand-alone Microsoft Windows applications under Linux using
84 the Mingw32 build libraries. This includes a binutils, gcc with g++
85 and objc, and libstdc++, all cross targeted to i386-mingw32, along
86 with supporting Win32 libraries in 'coff' format from free sources.
88 This package contains cross targeted g++ and (static) libstdc++.
90 %description c++ -l pl
91 crossmingw32 jest kompletnym systemem do kompilacji skro¶nej,
92 pozwalaj±cym budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c
93 bibliotek mingw32. System sk³ada siê z binutils, gcc z g++ i objc,
94 libstdc++ - wszystkie generuj±ce kod dla platformy i386-mingw32, oraz
95 z bibliotek w formacie COFF.
97 Ten pakiet zawiera g++ generuj±ce kod pod Win32 oraz bibliotekê
100 # does this even work?
102 Summary: Mingw32 binary utility development utilities - objc
103 Summary(pl): Zestaw narzêdzi mingw32 - objc
104 Group: Development/Languages
105 Requires: %{name} = %{epoch}:%{version}-%{release}
108 crossmingw32 is a complete cross-compiling development system for
109 building stand-alone Microsoft Windows applications under Linux using
110 the Mingw32 build libraries. This includes a binutils, gcc with g++
111 and objc, and libstdc++, all cross targeted to i386-mingw32, along
112 with supporting Win32 libraries in 'coff' format from free sources.
114 This package contains cross targeted objc.
116 %description objc -l pl
117 crossmingw32 jest kompletnym systemem do kompilacji skro¶nej,
118 pozwalaj±cym budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c
119 bibliotek mingw32. System sk³ada siê z binutils, gcc z g++ i objc,
120 libstdc++ - wszystkie generuj±ce kod dla platformy i386-mingw32, oraz
121 z bibliotek w formacie COFF.
123 Ten pakiet zawiera kompilator objc generuj±cy kod pod Win32.
125 # does this even work?
127 Summary: Mingw32 binary utility development utilities - g77
128 Summary(pl): Zestaw narzêdzi mingw32 - g77
129 Group: Development/Languages
130 Requires: %{name} = %{epoch}:%{version}-%{release}
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 g77.
141 %description g77 -l pl
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 g77 generuj±cy kod pod Win32.
150 # does this even work?
152 Summary: Mingw32 binary utility development utilities - java
153 Summary(pl): 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.
166 %description java -l pl
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.
179 %if %{with bootstrap}
181 tar xzf %{SOURCE1} -C winsup
182 tar xzf %{SOURCE2} -C winsup
184 %{!?debug:%patch0 -p1}
189 %if %{with bootstrap}
190 for tool in as ar dlltool ld nm ranlib strip ; do
191 ln -sf %{arch}/bin/$tool winsup/bin/$tool
193 build_tooldir=`pwd`/winsup
195 build_tooldir=%{arch}
198 cp /usr/share/automake/config.sub .
199 cp /usr/share/automake/config.sub boehm-gc
201 rm -rf obj-%{target_platform} && install -d obj-%{target_platform} && cd obj-%{target_platform}
203 # note: alpha's -mieee and sparc's -mtune=* are not valid for target's g++
204 CFLAGS="%{rpmcflags}" \
206 CXXFLAGS="`echo '%{rpmcflags}' | sed -e 's/ \?-mieee\>//'`" \
208 %ifarch sparc sparc64 sparcv9
209 CXXFLAGS="`echo '%{rpmcflags}' | sed -e 's/ \?-mtune[=0-9a-z]*//'`" \
211 CXXFLAGS="%{rpmcflags}" \
214 LDFLAGS="%{rpmldflags}" \
217 --prefix=%{_prefix} \
218 --infodir=%{_infodir} \
219 --mandir=%{_mandir} \
220 --bindir=%{arch}/bin \
221 --libdir=%{_libdir} \
222 --libexecdir=%{_libexecdir} \
223 --includedir=%{arch}/include \
224 --enable-languages="c,c++,f77,java,objc" \
227 --with-gxx-include-dir=%{arch}/include/g++ \
229 --build=%{_target_platform} \
230 --host=%{_target_platform} \
233 #touch ../gcc/c-gperf.h
236 LDFLAGS_FOR_TARGET="%{rpmldflags}" \
237 TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" \
238 build_tooldir="$build_tooldir" \
239 FLAGS_FOR_TARGET="-B${build_tooldir}/bin -B${build_tooldir}/lib -isystem ${build_tooldir}/include -nostdinc" \
240 CFLAGS_FOR_TARGET="-nostdinc" \
241 NM_FOR_TARGET="%{target}-nm"
243 # build libobjc.dll for Objective C
244 # it must be called from obj-%{target_platform}/%{target}/libobjc, but
245 # GCC_FOR_TARGET must be passed
247 #make -C %{target}/libobjc \
248 # LDFLAGS="%{rpmldflags}" \
249 # TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" \
250 # DLLTOOL="%{target}-dlltool --as=%{target}-as" libobjc.dll
252 # spec files for msvcrt*.dll configurations
254 for n in msvcrt msvcrt20 msvcrt40; do
255 sed "s/crtdll/$n/g" <specs | sed "s/crt1/crt2/g" >specs.$n
259 rm -rf $RPM_BUILD_ROOT
262 install -d $RPM_BUILD_ROOT%{_bindir}
263 install -d $RPM_BUILD_ROOT%{_datadir}
264 cd obj-%{target_platform}
267 DESTDIR=$RPM_BUILD_ROOT
270 install specs.msvcrt specs.msvcrt20 specs.msvcrt40 $RPM_BUILD_ROOT%{gcclib}
273 mv -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-* $RPM_BUILD_ROOT%{_bindir}
275 # already in arch/lib, shouldn't be here
276 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
279 # strip linux binaries
280 strip -R .comment -R .note \
281 `echo $RPM_BUILD_ROOT{%{_bindir}/*,%{arch}/bin/*} | grep -v gccbug` \
282 $RPM_BUILD_ROOT%{gcclib}/{cc1*,f771,jc1,jvgenmain}
284 # strip mingw32 libraries
286 $RPM_BUILD_ROOT%{gcclib}/libgcc.a \
287 $RPM_BUILD_ROOT%{arch}/lib/lib*.a
291 ln -f $RPM_BUILD_ROOT%{_bindir}/%{target}-{g++,c++}
292 ln -f $RPM_BUILD_ROOT%{arch}/bin/{g++,c++}
294 # the same... make hardlink
295 ln -f $RPM_BUILD_ROOT%{arch}/bin/gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
298 rm -rf $RPM_BUILD_ROOT
301 %defattr(644,root,root,755)
302 %attr(755,root,root) %{_bindir}/%{target}-gcc*
303 %attr(755,root,root) %{_bindir}/%{target}-cpp
304 %attr(755,root,root) %{_bindir}/%{target}-gcov
305 %attr(755,root,root) %{arch}/bin/gcc
306 %{arch}/lib/libiberty.a
310 %attr(755,root,root) %{gcclib}/cc1
316 %{_mandir}/man1/%{target}-cpp.1*
317 %{_mandir}/man1/%{target}-gcc.1*
318 %{_mandir}/man1/%{target}-gcov.1*
321 %defattr(644,root,root,755)
322 %attr(755,root,root) %{_bindir}/%{target}-[cg]++
323 %attr(755,root,root) %{arch}/bin/[cg]++
324 %attr(755,root,root) %{gcclib}/cc1plus
325 %{arch}/lib/libstdc++.a
326 %{arch}/lib/libstdc++.la
327 %{arch}/lib/libsupc++.a
328 %{arch}/lib/libsupc++.la
330 %{_mandir}/man1/%{target}-g++.1*
333 %defattr(644,root,root,755)
334 %attr(755,root,root) %{gcclib}/cc1obj
335 %{arch}/lib/libobjc.a
336 %{arch}/lib/libobjc.la
339 %defattr(644,root,root,755)
340 %attr(755,root,root) %{_bindir}/%{target}-g77
341 %attr(755,root,root) %{gcclib}/f771
342 %{arch}/lib/libfrtbegin.a
344 %{arch}/lib/libg2c.la
345 %{_mandir}/man1/%{target}-g77.1*
348 %defattr(644,root,root,755)
349 %attr(755,root,root) %{_bindir}/%{target}-gcj
350 %attr(755,root,root) %{_bindir}/%{target}-gcjh
351 %attr(755,root,root) %{_bindir}/%{target}-grepjar
352 %attr(755,root,root) %{_bindir}/%{target}-jar
353 %attr(755,root,root) %{_bindir}/%{target}-jcf-dump
354 %attr(755,root,root) %{_bindir}/%{target}-jv-scan
355 #%attr(755,root,root) %{arch}/bin/grepjar
356 #%attr(755,root,root) %{arch}/bin/jar
357 %attr(755,root,root) %{gcclib}/jc1
358 %attr(755,root,root) %{gcclib}/jvgenmain
359 %{_mandir}/man1/%{target}-gcj.1*
360 %{_mandir}/man1/%{target}-gcjh.1*
361 %{_mandir}/man1/%{target}-grepjar.1*
362 %{_mandir}/man1/%{target}-jar.1*
363 %{_mandir}/man1/%{target}-jcf-dump.1*
364 %{_mandir}/man1/%{target}-jv-scan.1*