6 %define DASHED_SNAP %{nil}
7 %define SNAP %(echo %{DASHED_SNAP} | sed -e "s#-##g")
8 %define GCC_VERSION 3.4.3
10 %define apisrc w32api-%{apiver}
12 %define runsrc mingw-runtime-%{runver}
13 Summary: Cross Mingw32 GNU binary utility development utilities - gcc
14 Summary(es): Utilitarios para desarrollo de binarios de la GNU - Mingw32 gcc
15 Summary(fr): Utilitaires de développement binaire de GNU - Mingw32 gcc
16 Summary(pl): Skro¶ne narzêdzia programistyczne GNU dla Mingw32 - gcc
17 Summary(pt_BR): Utilitários para desenvolvimento de binários da GNU - Mingw32 gcc
18 Summary(tr): GNU geliþtirme araçlarý - Mingw32 gcc
19 Name: crossmingw32-gcc
20 Version: %{GCC_VERSION}
24 Group: Development/Languages
25 Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{GCC_VERSION}/gcc-%{GCC_VERSION}.tar.bz2
26 # Source0-md5: e744b30c834360fccac41eb7269a3011
27 Source1: http://dl.sourceforge.net/mingw/%{apisrc}.tar.gz
28 # Source1-md5: c9204f46e6b6deeb1c182bc75ad4d88f
29 Source2: http://dl.sourceforge.net/mingw/%{runsrc}.tar.gz
30 # Source2-md5: d5bb1d754e3315a768fe69056b3ee8d3
31 Patch0: gcc-nodebug.patch
32 Patch1: %{name}-noioctl.patch
33 BuildRequires: autoconf
34 BuildRequires: automake
36 BuildRequires: crossmingw32-binutils >= 2.15.91.0.2-2
38 %if %{without bootstrap}
39 BuildRequires: crossmingw32-runtime >= 3.5
40 BuildRequires: crossmingw32-w32api >= 3.1
42 Requires: crossmingw32-binutils >= 2.15.91.0.2-2
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 %define no_install_post_strip 1
48 %define target i386-mingw32
49 %define target_platform i386-pc-mingw32
50 %define arch %{_prefix}/%{target}
51 %define gccarch %{_libdir}/gcc/%{target}
52 %define gcclib %{_libdir}/gcc/%{target}/%{version}
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.
64 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
65 anderem Rechner Code für Win32 zu generieren.
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): 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
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): 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.
117 %description objc -l pl
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 - g77
129 Summary(pl): Zestaw narzêdzi mingw32 - g77
130 Group: Development/Languages
131 Requires: %{name} = %{epoch}:%{version}-%{release}
134 crossmingw32 is a complete cross-compiling development system for
135 building stand-alone Microsoft Windows applications under Linux using
136 the Mingw32 build libraries. This includes a binutils, gcc with g++
137 and objc, and libstdc++, all cross targeted to i386-mingw32, along
138 with supporting Win32 libraries in 'coff' format from free sources.
140 This package contains cross targeted g77.
142 %description g77 -l pl
143 crossmingw32 jest kompletnym systemem do kompilacji skro¶nej,
144 pozwalaj±cym budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c
145 bibliotek mingw32. System sk³ada siê z binutils, gcc z g++ i objc,
146 libstdc++ - wszystkie generuj±ce kod dla platformy i386-mingw32, oraz
147 z bibliotek w formacie COFF.
149 Ten pakiet zawiera g77 generuj±cy kod pod Win32.
151 # does this even work?
153 Summary: Mingw32 binary utility development utilities - java
154 Summary(pl): Zestaw narzêdzi mingw32 - java
155 Group: Development/Languages
156 Requires: %{name} = %{epoch}:%{version}-%{release}
159 crossmingw32 is a complete cross-compiling development system for
160 building stand-alone Microsoft Windows applications under Linux using
161 the Mingw32 build libraries. This includes a binutils, gcc with g++
162 and objc, and libstdc++, all cross targeted to i386-mingw32, along
163 with supporting Win32 libraries in 'coff' format from free sources.
165 This package contains cross targeted java.
167 %description java -l pl
169 crossmingw32 jest kompletnym systemem do kompilacji skro¶nej,
170 pozwalaj±cym budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c
171 bibliotek mingw32. System sk³ada siê z binutils, gcc z g++ i objc,
172 libstdc++ - wszystkie generuj±ce kod dla platformy i386-mingw32, oraz
173 z bibliotek w formacie COFF.
175 Ten pakiet zawiera kompilator Javy generuj±cy kod pod Win32.
180 %if %{with bootstrap}
182 tar xzf %{SOURCE1} -C winsup
183 tar xzf %{SOURCE2} -C winsup
185 %{!?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
202 rm -rf obj-%{target_platform} && install -d obj-%{target_platform} && cd obj-%{target_platform}
204 # note: alpha's -mieee and sparc's -mtune=* are not valid for target's g++
205 CFLAGS="%{rpmcflags}" \
207 CXXFLAGS="`echo '%{rpmcflags}' | sed -e 's/ \?-mieee\>//'`" \
209 %ifarch sparc sparc64 sparcv9
210 CXXFLAGS="`echo '%{rpmcflags}' | sed -e 's/ \?-mtune[=0-9a-z]*//'`" \
212 CXXFLAGS="%{rpmcflags}" \
215 LDFLAGS="%{rpmldflags}" \
218 --prefix=%{_prefix} \
219 --infodir=%{_infodir} \
220 --mandir=%{_mandir} \
221 --bindir=%{arch}/bin \
222 --libdir=%{_libdir} \
223 --libexecdir=%{_libexecdir} \
224 --includedir=%{arch}/include \
225 --enable-languages="c,c++,f77,java,objc" \
228 --with-gxx-include-dir=%{arch}/include/g++ \
230 --build=%{_target_platform} \
231 --host=%{_target_platform} \
234 #touch ../gcc/c-gperf.h
237 LDFLAGS_FOR_TARGET="%{rpmldflags}" \
238 TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" \
239 build_tooldir="$build_tooldir" \
240 FLAGS_FOR_TARGET="-B${build_tooldir}/bin -B${build_tooldir}/lib -isystem ${build_tooldir}/include -nostdinc" \
241 CFLAGS_FOR_TARGET="-nostdinc" \
242 NM_FOR_TARGET="%{target}-nm"
244 # build libobjc.dll for Objective C
245 # it must be called from obj-%{target_platform}/%{target}/libobjc, but
246 # GCC_FOR_TARGET must be passed
248 #make -C %{target}/libobjc \
249 # LDFLAGS="%{rpmldflags}" \
250 # TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" \
251 # DLLTOOL="%{target}-dlltool --as=%{target}-as" libobjc.dll
253 # spec files for msvcrt*.dll configurations
255 for n in msvcrt msvcrt20 msvcrt40; do
256 sed "s/crtdll/$n/g" <specs | sed "s/crt1/crt2/g" >specs.$n
260 rm -rf $RPM_BUILD_ROOT
263 install -d $RPM_BUILD_ROOT%{_bindir}
264 install -d $RPM_BUILD_ROOT%{_datadir}
265 cd obj-%{target_platform}
268 DESTDIR=$RPM_BUILD_ROOT
271 install specs.msvcrt specs.msvcrt20 specs.msvcrt40 $RPM_BUILD_ROOT%{gcclib}
274 mv -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-* $RPM_BUILD_ROOT%{_bindir}
276 # already in arch/lib, shouldn't be here
277 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
280 # strip linux binaries
281 strip -R .comment -R .note \
282 `echo $RPM_BUILD_ROOT{%{_bindir}/*,%{arch}/bin/*} | grep -v gccbug` \
283 $RPM_BUILD_ROOT%{gcclib}/{cc1*,f771,jc1,jvgenmain}
285 # strip mingw32 libraries
287 $RPM_BUILD_ROOT%{gcclib}/libgcc.a \
288 $RPM_BUILD_ROOT%{arch}/lib/lib*.a
292 ln -f $RPM_BUILD_ROOT%{_bindir}/%{target}-{g++,c++}
293 ln -f $RPM_BUILD_ROOT%{arch}/bin/{g++,c++}
295 # the same... make hardlink
296 ln -f $RPM_BUILD_ROOT%{arch}/bin/gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
299 rm -rf $RPM_BUILD_ROOT
302 %defattr(644,root,root,755)
303 %attr(755,root,root) %{_bindir}/%{target}-gcc*
304 %attr(755,root,root) %{_bindir}/%{target}-cpp
305 %attr(755,root,root) %{_bindir}/%{target}-gcov
306 %attr(755,root,root) %{arch}/bin/gcc
307 %{arch}/lib/libiberty.a
311 %attr(755,root,root) %{gcclib}/cc1
317 %{_mandir}/man1/%{target}-cpp.1*
318 %{_mandir}/man1/%{target}-gcc.1*
319 %{_mandir}/man1/%{target}-gcov.1*
322 %defattr(644,root,root,755)
323 %attr(755,root,root) %{_bindir}/%{target}-[cg]++
324 %attr(755,root,root) %{arch}/bin/[cg]++
325 %attr(755,root,root) %{gcclib}/cc1plus
326 %{arch}/lib/libstdc++.a
327 %{arch}/lib/libstdc++.la
328 %{arch}/lib/libsupc++.a
329 %{arch}/lib/libsupc++.la
331 %{_mandir}/man1/%{target}-g++.1*
334 %defattr(644,root,root,755)
335 %attr(755,root,root) %{gcclib}/cc1obj
336 %{arch}/lib/libobjc.a
337 %{arch}/lib/libobjc.la
340 %defattr(644,root,root,755)
341 %attr(755,root,root) %{_bindir}/%{target}-g77
342 %attr(755,root,root) %{gcclib}/f771
343 %{arch}/lib/libfrtbegin.a
345 %{arch}/lib/libg2c.la
346 %{_mandir}/man1/%{target}-g77.1*
349 %defattr(644,root,root,755)
350 %attr(755,root,root) %{_bindir}/%{target}-gcj
351 %attr(755,root,root) %{_bindir}/%{target}-gcjh
352 %attr(755,root,root) %{_bindir}/%{target}-grepjar
353 %attr(755,root,root) %{_bindir}/%{target}-jar
354 %attr(755,root,root) %{_bindir}/%{target}-jcf-dump
355 %attr(755,root,root) %{_bindir}/%{target}-jv-scan
356 #%attr(755,root,root) %{arch}/bin/grepjar
357 #%attr(755,root,root) %{arch}/bin/jar
358 %attr(755,root,root) %{gcclib}/jc1
359 %attr(755,root,root) %{gcclib}/jvgenmain
360 %{_mandir}/man1/%{target}-gcj.1*
361 %{_mandir}/man1/%{target}-gcjh.1*
362 %{_mandir}/man1/%{target}-grepjar.1*
363 %{_mandir}/man1/%{target}-jar.1*
364 %{_mandir}/man1/%{target}-jcf-dump.1*
365 %{_mandir}/man1/%{target}-jv-scan.1*