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 is not valid for target's g++
200 CFLAGS="%{rpmcflags}" \
202 CXXFLAGS="`echo '%{rpmcflags}' | sed -e 's/ \?-mieee\>//'`" \
204 CXXFLAGS="%{rpmcflags}" \
206 LDFLAGS="%{rpmldflags}" \
209 --prefix=%{_prefix} \
210 --infodir=%{_infodir} \
211 --mandir=%{_mandir} \
212 --bindir=%{arch}/bin \
213 --libdir=%{_libdir} \
214 --includedir=%{arch}/include \
215 --enable-languages="c,c++,f77,java,objc" \
218 --with-gxx-include-dir=%{arch}/include/g++ \
220 --build=%{_target_platform} \
221 --host=%{_target_platform} \
224 #touch ../gcc/c-gperf.h
227 LDFLAGS_FOR_TARGET="%{rpmldflags}" \
228 TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" \
229 build_tooldir="$build_tooldir" \
230 FLAGS_FOR_TARGET="-B${build_tooldir}/bin -B${build_tooldir}/lib -isystem ${build_tooldir}/include -nostdinc" \
231 CFLAGS_FOR_TARGET="-nostdinc" \
232 NM_FOR_TARGET="%{target}-nm"
234 # build libobjc.dll for Objective C
235 # to trzeba wywo³ywaæ z katalogu obj-%{target_platform}/%{target}/libobjc
236 # ale trzeba podaæ jeszcze GCC_FOR_TARGET - a mi siê nie chce.
237 # BTW, ten dll jest do czego¶ potrzebny???
239 #make -C %{target}/libobjc \
240 # LDFLAGS="%{rpmldflags}" \
241 # TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" \
242 # DLLTOOL="%{target}-dlltool --as=%{target}-as" libobjc.dll
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
254 install -d $RPM_BUILD_ROOT%{_bindir}
255 install -d $RPM_BUILD_ROOT%{_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
271 # strip linux binaries
272 strip -R .comment -R .note \
273 `echo $RPM_BUILD_ROOT{%{_bindir}/*,%{arch}/bin/*} | grep -v gccbug` \
274 $RPM_BUILD_ROOT%{gcclib}/{cc1*,f771,jc1,jvgenmain}
276 # strip mingw32 libraries
278 $RPM_BUILD_ROOT%{gcclib}/libgcc.a \
279 $RPM_BUILD_ROOT%{arch}/lib/lib*.a
283 ln -f $RPM_BUILD_ROOT%{_bindir}/%{target}-{g++,c++}
284 ln -f $RPM_BUILD_ROOT%{arch}/bin/{g++,c++}
286 # the same... make hardlink
287 ln -f $RPM_BUILD_ROOT%{arch}/bin/gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
290 rm -rf $RPM_BUILD_ROOT
293 %defattr(644,root,root,755)
294 %attr(755,root,root) %{_bindir}/%{target}-gcc*
295 %attr(755,root,root) %{_bindir}/%{target}-cpp
296 %attr(755,root,root) %{_bindir}/%{target}-gcov
297 %attr(755,root,root) %{arch}/bin/gcc
298 %{arch}/lib/libiberty.a
302 %attr(755,root,root) %{gcclib}/cc1
307 %{_mandir}/man1/%{target}-gcc.1*
310 %defattr(644,root,root,755)
311 %attr(755,root,root) %{_bindir}/%{target}-[cg]++
312 %attr(755,root,root) %{arch}/bin/[cg]++
313 %attr(755,root,root) %{gcclib}/cc1plus
314 %{arch}/lib/libstdc++.a
315 %{arch}/lib/libstdc++.la
316 %{arch}/lib/libsupc++.a
317 %{arch}/lib/libsupc++.la
319 %{_mandir}/man1/%{target}-g++.1*
322 %defattr(644,root,root,755)
323 %attr(755,root,root) %{gcclib}/cc1obj
324 %{arch}/lib/libobjc.a
325 %{arch}/lib/libobjc.la
328 %defattr(644,root,root,755)
329 %attr(755,root,root) %{_bindir}/%{target}-g77
330 %attr(755,root,root) %{gcclib}/f771
331 %{arch}/lib/libfrtbegin.a
333 %{arch}/lib/libg2c.la
334 %{_mandir}/man1/%{target}-g77.1*
337 %defattr(644,root,root,755)
338 %attr(755,root,root) %{_bindir}/%{target}-gcj
339 %attr(755,root,root) %{_bindir}/%{target}-gcjh
340 %attr(755,root,root) %{_bindir}/%{target}-jcf-dump
341 %attr(755,root,root) %{_bindir}/%{target}-jv-scan
342 %attr(755,root,root) %{arch}/bin/grepjar
343 %attr(755,root,root) %{arch}/bin/jar
344 %attr(755,root,root) %{gcclib}/jc1
345 %attr(755,root,root) %{gcclib}/jvgenmain
346 %{_mandir}/man1/%{target}-gcj.1*