2 %define DASHED_SNAP %{nil}
3 %define SNAP %(echo %{DASHED_SNAP} | sed -e "s#-##g")
4 %define GCC_VERSION 3.3.3
6 %define apisrc w32api-%{apiver}
8 %define runsrc mingw-runtime-%{runver}
9 Summary: Cross Mingw32 GNU binary utility development utilities - gcc
10 Summary(es): Utilitarios para desarrollo de binarios de la GNU - Mingw32 gcc
11 Summary(fr): Utilitaires de développement binaire de GNU - Mingw32 gcc
12 Summary(pl): Skro¶ne narzêdzia programistyczne GNU dla Mingw32 - gcc
13 Summary(pt_BR): Utilitários para desenvolvimento de binários da GNU - Mingw32 gcc
14 Summary(tr): GNU geliþtirme araçlarý - Mingw32 gcc
15 Name: crossmingw32-gcc
16 Version: %{GCC_VERSION}
20 Group: Development/Languages
21 Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{GCC_VERSION}/gcc-%{GCC_VERSION}.tar.bz2
22 # Source0-md5: 3c6cfd9fcd180481063b4058cf6faff2
23 Source1: http://dl.sourceforge.net/mingw/%{apisrc}.tar.gz
24 # Source1-md5: be74d8925d1e273336ecb0d9225867f1
25 Source2: http://dl.sourceforge.net/mingw/%{runsrc}.tar.gz
26 # Source2-md5: ecfd49e08f20a88b7ba11a755f2b53c2
27 Patch0: gcc-nodebug.patch
28 Patch1: %{name}-noioctl.patch
29 BuildRequires: autoconf
30 BuildRequires: automake
32 BuildRequires: crossmingw32-binutils >= 2.14.90.0.4.1-2
34 %if %{without bootstrap}
35 BuildRequires: crossmingw32-runtime >= 3.0
36 BuildRequires: crossmingw32-w32api >= 2.3
38 Requires: crossmingw32-binutils >= 2.14.90.0.4.1-2
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 %define no_install_post_strip 1
43 %define target i386-mingw32
44 %define target_platform i386-pc-mingw32
45 %define arch %{_prefix}/%{target}
46 %define gccarch %{_libdir}/gcc-lib/%{target}
47 %define gcclib %{_libdir}/gcc-lib/%{target}/%{version}
50 crossmingw32 is a complete cross-compiling development system for
51 building stand-alone Microsoft Windows applications under Linux using
52 the Mingw32 build libraries. This includes a binutils, gcc with g++
53 and objc, and libstdc++, all cross targeted to i386-mingw32, along
54 with supporting Win32 libraries in 'coff' format from free sources.
56 This package contains cross targeted gcc.
59 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
60 i386-Rechner Code für Win32 zu generieren.
63 crossmingw32 jest kompletnym systemem do kompilacji skro¶nej,
64 pozwalaj±cym budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c
65 bibliotek Mingw32. System sk³ada siê z binutils, gcc z g++ i objc,
66 libstdc++ - wszystkie generuj±ce kod dla platformy i386-mingw32, oraz
67 z bibliotek w formacie COFF.
69 Ten pakiet zawiera gcc generuj±ce skro¶nie kod dla Win32.
72 Summary: Mingw32 binary utility development utilities - g++
73 Summary(pl): Zestaw narzêdzi mingw32 - g++
74 Group: Development/Languages
75 Requires: %{name} = %{epoch}:%{version}
78 crossmingw32 is a complete cross-compiling development system for
79 building stand-alone Microsoft Windows applications under Linux using
80 the Mingw32 build libraries. This includes a binutils, gcc with g++
81 and objc, and libstdc++, all cross targeted to i386-mingw32, along
82 with supporting Win32 libraries in 'coff' format from free sources.
84 This package contains cross targeted g++ and (static) libstdc++.
86 %description c++ -l pl
87 crossmingw32 jest kompletnym systemem do kompilacji skro¶nej,
88 pozwalaj±cym budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c
89 bibliotek mingw32. System sk³ada siê z binutils, gcc z g++ i objc,
90 libstdc++ - wszystkie generuj±ce kod dla platformy i386-mingw32, oraz
91 z bibliotek w formacie COFF.
93 Ten pakiet zawiera g++ generuj±ce kod pod Win32 oraz bibliotekê
96 # does this even work?
98 Summary: Mingw32 binary utility development utilities - objc
99 Summary(pl): Zestaw narzêdzi mingw32 - objc
100 Group: Development/Languages
101 Requires: %{name} = %{epoch}:%{version}
104 crossmingw32 is a complete cross-compiling development system for
105 building stand-alone Microsoft Windows applications under Linux using
106 the Mingw32 build libraries. This includes a binutils, gcc with g++
107 and objc, and libstdc++, all cross targeted to i386-mingw32, along
108 with supporting Win32 libraries in 'coff' format from free sources.
110 This package contains cross targeted objc.
112 %description objc -l pl
113 crossmingw32 jest kompletnym systemem do kompilacji skro¶nej,
114 pozwalaj±cym budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c
115 bibliotek mingw32. System sk³ada siê z binutils, gcc z g++ i objc,
116 libstdc++ - wszystkie generuj±ce kod dla platformy i386-mingw32, oraz
117 z bibliotek w formacie COFF.
119 Ten pakiet zawiera kompilator objc generuj±cy kod pod Win32.
121 # does this even work?
123 Summary: Mingw32 binary utility development utilities - g77
124 Summary(pl): Zestaw narzêdzi mingw32 - g77
125 Group: Development/Languages
126 Requires: %{name} = %{epoch}:%{version}
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 g77.
137 %description g77 -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 g77 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}
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.
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.
175 %if %{with bootstrap}
177 tar xzf %{SOURCE1} -C winsup
178 tar xzf %{SOURCE2} -C winsup
180 %{!?debug:%patch0 -p1}
185 %if %{with bootstrap}
186 for tool in as ar dlltool ld nm ranlib strip ; do
187 ln -sf %{arch}/bin/$tool winsup/bin/$tool
189 build_tooldir=`pwd`/winsup
191 build_tooldir=%{arch}
194 cp /usr/share/automake/config.sub .
195 cp /usr/share/automake/config.sub boehm-gc
197 rm -rf obj-%{target_platform} && install -d obj-%{target_platform} && 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 --includedir=%{arch}/include \
219 --enable-languages="c,c++,f77,java,objc" \
222 --with-gxx-include-dir=%{arch}/include/g++ \
224 --build=%{_target_platform} \
225 --host=%{_target_platform} \
228 #touch ../gcc/c-gperf.h
231 LDFLAGS_FOR_TARGET="%{rpmldflags}" \
232 TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" \
233 build_tooldir="$build_tooldir" \
234 FLAGS_FOR_TARGET="-B${build_tooldir}/bin -B${build_tooldir}/lib -isystem ${build_tooldir}/include -nostdinc" \
235 CFLAGS_FOR_TARGET="-nostdinc" \
236 NM_FOR_TARGET="%{target}-nm"
238 # build libobjc.dll for Objective C
239 # it must be called from obj-%{target_platform}/%{target}/libobjc, but
240 # GCC_FOR_TARGET must be passed
242 #make -C %{target}/libobjc \
243 # LDFLAGS="%{rpmldflags}" \
244 # TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" \
245 # DLLTOOL="%{target}-dlltool --as=%{target}-as" libobjc.dll
247 # spec files for msvcrt*.dll configurations
249 for n in msvcrt msvcrt20 msvcrt40; do
250 sed "s/crtdll/$n/g" <specs | sed "s/crt1/crt2/g" >specs.$n
254 rm -rf $RPM_BUILD_ROOT
257 install -d $RPM_BUILD_ROOT%{_bindir}
258 install -d $RPM_BUILD_ROOT%{_datadir}
259 cd obj-%{target_platform}
262 DESTDIR=$RPM_BUILD_ROOT
265 install specs.msvcrt specs.msvcrt20 specs.msvcrt40 $RPM_BUILD_ROOT%{gcclib}
268 mv -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-* $RPM_BUILD_ROOT%{_bindir}
270 # already in arch/lib, shouldn't be here
271 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
274 # strip linux binaries
275 strip -R .comment -R .note \
276 `echo $RPM_BUILD_ROOT{%{_bindir}/*,%{arch}/bin/*} | grep -v gccbug` \
277 $RPM_BUILD_ROOT%{gcclib}/{cc1*,f771,jc1,jvgenmain}
279 # strip mingw32 libraries
281 $RPM_BUILD_ROOT%{gcclib}/libgcc.a \
282 $RPM_BUILD_ROOT%{arch}/lib/lib*.a
286 ln -f $RPM_BUILD_ROOT%{_bindir}/%{target}-{g++,c++}
287 ln -f $RPM_BUILD_ROOT%{arch}/bin/{g++,c++}
289 # the same... make hardlink
290 ln -f $RPM_BUILD_ROOT%{arch}/bin/gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
293 rm -rf $RPM_BUILD_ROOT
296 %defattr(644,root,root,755)
297 %attr(755,root,root) %{_bindir}/%{target}-gcc*
298 %attr(755,root,root) %{_bindir}/%{target}-cpp
299 %attr(755,root,root) %{_bindir}/%{target}-gcov
300 %attr(755,root,root) %{arch}/bin/gcc
301 %{arch}/lib/libiberty.a
305 %attr(755,root,root) %{gcclib}/cc1
310 %{_mandir}/man1/%{target}-gcc.1*
313 %defattr(644,root,root,755)
314 %attr(755,root,root) %{_bindir}/%{target}-[cg]++
315 %attr(755,root,root) %{arch}/bin/[cg]++
316 %attr(755,root,root) %{gcclib}/cc1plus
317 %{arch}/lib/libstdc++.a
318 %{arch}/lib/libstdc++.la
319 %{arch}/lib/libsupc++.a
320 %{arch}/lib/libsupc++.la
322 %{_mandir}/man1/%{target}-g++.1*
325 %defattr(644,root,root,755)
326 %attr(755,root,root) %{gcclib}/cc1obj
327 %{arch}/lib/libobjc.a
328 %{arch}/lib/libobjc.la
331 %defattr(644,root,root,755)
332 %attr(755,root,root) %{_bindir}/%{target}-g77
333 %attr(755,root,root) %{gcclib}/f771
334 %{arch}/lib/libfrtbegin.a
336 %{arch}/lib/libg2c.la
337 %{_mandir}/man1/%{target}-g77.1*
340 %defattr(644,root,root,755)
341 %attr(755,root,root) %{_bindir}/%{target}-gcj
342 %attr(755,root,root) %{_bindir}/%{target}-gcjh
343 %attr(755,root,root) %{_bindir}/%{target}-jcf-dump
344 %attr(755,root,root) %{_bindir}/%{target}-jv-scan
345 %attr(755,root,root) %{arch}/bin/grepjar
346 %attr(755,root,root) %{arch}/bin/jar
347 %attr(755,root,root) %{gcclib}/jc1
348 %attr(755,root,root) %{gcclib}/jvgenmain
349 %{_mandir}/man1/%{target}-gcj.1*