2 %define DASHED_SNAP %{nil}
3 %define SNAP %(echo %{DASHED_SNAP} | sed -e "s#-##g")
4 %define GCC_VERSION 3.4.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: e744b30c834360fccac41eb7269a3011
23 Source1: http://dl.sourceforge.net/mingw/%{apisrc}.tar.gz
24 # Source1-md5: 19901b69bf5392a4490af94e1bb71a40
25 Source2: http://dl.sourceforge.net/mingw/%{runsrc}.tar.gz
26 # Source2-md5: 11ef00aed5cda7b7718c79c16f0241c5
27 Patch0: gcc-nodebug.patch
28 Patch1: %{name}-noioctl.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 Requires: crossmingw32-binutils >= 2.15.91.0.2-2
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 %define no_install_post_strip 1
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 %{_libdir}/gcc/%{target}/%{version}
51 crossmingw32 is a complete cross-compiling development system for
52 building stand-alone Microsoft Windows applications under Linux using
53 the Mingw32 build libraries. This includes a binutils, gcc with g++
54 and objc, and libstdc++, all cross targeted to i386-mingw32, along
55 with supporting Win32 libraries in 'coff' format from free sources.
57 This package contains cross targeted gcc.
60 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
61 anderem Rechner Code für Win32 zu generieren.
64 crossmingw32 jest kompletnym systemem do kompilacji skro¶nej,
65 pozwalaj±cym budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c
66 bibliotek Mingw32. System sk³ada siê z binutils, gcc z g++ i objc,
67 libstdc++ - wszystkie generuj±ce kod dla platformy i386-mingw32, oraz
68 z bibliotek w formacie COFF.
70 Ten pakiet zawiera gcc generuj±ce skro¶nie kod dla Win32.
73 Summary: Mingw32 binary utility development utilities - g++
74 Summary(pl): Zestaw narzêdzi mingw32 - g++
75 Group: Development/Languages
76 Requires: %{name} = %{epoch}:%{version}-%{release}
79 crossmingw32 is a complete cross-compiling development system for
80 building stand-alone Microsoft Windows applications under Linux using
81 the Mingw32 build libraries. This includes a binutils, gcc with g++
82 and objc, and libstdc++, all cross targeted to i386-mingw32, along
83 with supporting Win32 libraries in 'coff' format from free sources.
85 This package contains cross targeted g++ and (static) libstdc++.
87 %description c++ -l pl
88 crossmingw32 jest kompletnym systemem do kompilacji skro¶nej,
89 pozwalaj±cym budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c
90 bibliotek mingw32. System sk³ada siê z binutils, gcc z g++ i objc,
91 libstdc++ - wszystkie generuj±ce kod dla platformy i386-mingw32, oraz
92 z bibliotek w formacie COFF.
94 Ten pakiet zawiera g++ generuj±ce kod pod Win32 oraz bibliotekê
97 # does this even work?
99 Summary: Mingw32 binary utility development utilities - objc
100 Summary(pl): Zestaw narzêdzi mingw32 - objc
101 Group: Development/Languages
102 Requires: %{name} = %{epoch}:%{version}-%{release}
105 crossmingw32 is a complete cross-compiling development system for
106 building stand-alone Microsoft Windows applications under Linux using
107 the Mingw32 build libraries. This includes a binutils, gcc with g++
108 and objc, and libstdc++, all cross targeted to i386-mingw32, along
109 with supporting Win32 libraries in 'coff' format from free sources.
111 This package contains cross targeted objc.
113 %description objc -l pl
114 crossmingw32 jest kompletnym systemem do kompilacji skro¶nej,
115 pozwalaj±cym budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c
116 bibliotek mingw32. System sk³ada siê z binutils, gcc z g++ i objc,
117 libstdc++ - wszystkie generuj±ce kod dla platformy i386-mingw32, oraz
118 z bibliotek w formacie COFF.
120 Ten pakiet zawiera kompilator objc generuj±cy kod pod Win32.
122 # does this even work?
124 Summary: Mingw32 binary utility development utilities - g77
125 Summary(pl): Zestaw narzêdzi mingw32 - g77
126 Group: Development/Languages
127 Requires: %{name} = %{epoch}:%{version}-%{release}
130 crossmingw32 is a complete cross-compiling development system for
131 building stand-alone Microsoft Windows applications under Linux using
132 the Mingw32 build libraries. This includes a binutils, gcc with g++
133 and objc, and libstdc++, all cross targeted to i386-mingw32, along
134 with supporting Win32 libraries in 'coff' format from free sources.
136 This package contains cross targeted g77.
138 %description g77 -l pl
139 crossmingw32 jest kompletnym systemem do kompilacji skro¶nej,
140 pozwalaj±cym budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c
141 bibliotek mingw32. System sk³ada siê z binutils, gcc z g++ i objc,
142 libstdc++ - wszystkie generuj±ce kod dla platformy i386-mingw32, oraz
143 z bibliotek w formacie COFF.
145 Ten pakiet zawiera g77 generuj±cy kod pod Win32.
147 # does this even work?
149 Summary: Mingw32 binary utility development utilities - java
150 Summary(pl): Zestaw narzêdzi mingw32 - java
151 Group: Development/Languages
152 Requires: %{name} = %{epoch}:%{version}-%{release}
155 crossmingw32 is a complete cross-compiling development system for
156 building stand-alone Microsoft Windows applications under Linux using
157 the Mingw32 build libraries. This includes a binutils, gcc with g++
158 and objc, and libstdc++, all cross targeted to i386-mingw32, along
159 with supporting Win32 libraries in 'coff' format from free sources.
161 This package contains cross targeted java.
163 %description java -l pl
165 crossmingw32 jest kompletnym systemem do kompilacji skro¶nej,
166 pozwalaj±cym budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c
167 bibliotek mingw32. System sk³ada siê z binutils, gcc z g++ i objc,
168 libstdc++ - wszystkie generuj±ce kod dla platformy i386-mingw32, oraz
169 z bibliotek w formacie COFF.
171 Ten pakiet zawiera kompilator Javy generuj±cy kod pod Win32.
176 %if %{with bootstrap}
178 tar xzf %{SOURCE1} -C winsup
179 tar xzf %{SOURCE2} -C winsup
181 %{!?debug:%patch0 -p1}
186 %if %{with bootstrap}
187 for tool in as ar dlltool ld nm ranlib strip ; do
188 ln -sf %{arch}/bin/$tool winsup/bin/$tool
190 build_tooldir=`pwd`/winsup
192 build_tooldir=%{arch}
195 cp /usr/share/automake/config.sub .
196 cp /usr/share/automake/config.sub boehm-gc
198 rm -rf obj-%{target_platform} && install -d obj-%{target_platform} && cd obj-%{target_platform}
200 # note: alpha's -mieee and sparc's -mtune=* are not valid for target's g++
201 CFLAGS="%{rpmcflags}" \
203 CXXFLAGS="`echo '%{rpmcflags}' | sed -e 's/ \?-mieee\>//'`" \
205 %ifarch sparc sparc64 sparcv9
206 CXXFLAGS="`echo '%{rpmcflags}' | sed -e 's/ \?-mtune[=0-9a-z]*//'`" \
208 CXXFLAGS="%{rpmcflags}" \
211 LDFLAGS="%{rpmldflags}" \
214 --prefix=%{_prefix} \
215 --infodir=%{_infodir} \
216 --mandir=%{_mandir} \
217 --bindir=%{arch}/bin \
218 --libdir=%{_libdir} \
219 --libexecdir=%{_libexecdir} \
220 --includedir=%{arch}/include \
221 --enable-languages="c,c++,f77,java,objc" \
224 --with-gxx-include-dir=%{arch}/include/g++ \
226 --build=%{_target_platform} \
227 --host=%{_target_platform} \
230 #touch ../gcc/c-gperf.h
233 LDFLAGS_FOR_TARGET="%{rpmldflags}" \
234 TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" \
235 build_tooldir="$build_tooldir" \
236 FLAGS_FOR_TARGET="-B${build_tooldir}/bin -B${build_tooldir}/lib -isystem ${build_tooldir}/include -nostdinc" \
237 CFLAGS_FOR_TARGET="-nostdinc" \
238 NM_FOR_TARGET="%{target}-nm"
240 # build libobjc.dll for Objective C
241 # it must be called from obj-%{target_platform}/%{target}/libobjc, but
242 # GCC_FOR_TARGET must be passed
244 #make -C %{target}/libobjc \
245 # LDFLAGS="%{rpmldflags}" \
246 # TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" \
247 # DLLTOOL="%{target}-dlltool --as=%{target}-as" libobjc.dll
249 # spec files for msvcrt*.dll configurations
251 for n in msvcrt msvcrt20 msvcrt40; do
252 sed "s/crtdll/$n/g" <specs | sed "s/crt1/crt2/g" >specs.$n
256 rm -rf $RPM_BUILD_ROOT
259 install -d $RPM_BUILD_ROOT%{_bindir}
260 install -d $RPM_BUILD_ROOT%{_datadir}
261 cd obj-%{target_platform}
264 DESTDIR=$RPM_BUILD_ROOT
267 install specs.msvcrt specs.msvcrt20 specs.msvcrt40 $RPM_BUILD_ROOT%{gcclib}
270 mv -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-* $RPM_BUILD_ROOT%{_bindir}
272 # already in arch/lib, shouldn't be here
273 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
276 # strip linux binaries
277 strip -R .comment -R .note \
278 `echo $RPM_BUILD_ROOT{%{_bindir}/*,%{arch}/bin/*} | grep -v gccbug` \
279 $RPM_BUILD_ROOT%{gcclib}/{cc1*,f771,jc1,jvgenmain}
281 # strip mingw32 libraries
283 $RPM_BUILD_ROOT%{gcclib}/libgcc.a \
284 $RPM_BUILD_ROOT%{arch}/lib/lib*.a
288 ln -f $RPM_BUILD_ROOT%{_bindir}/%{target}-{g++,c++}
289 ln -f $RPM_BUILD_ROOT%{arch}/bin/{g++,c++}
291 # the same... make hardlink
292 ln -f $RPM_BUILD_ROOT%{arch}/bin/gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
295 rm -rf $RPM_BUILD_ROOT
298 %defattr(644,root,root,755)
299 %attr(755,root,root) %{_bindir}/%{target}-gcc*
300 %attr(755,root,root) %{_bindir}/%{target}-cpp
301 %attr(755,root,root) %{_bindir}/%{target}-gcov
302 %attr(755,root,root) %{arch}/bin/gcc
303 %{arch}/lib/libiberty.a
307 %attr(755,root,root) %{gcclib}/cc1
313 %{_mandir}/man1/%{target}-cpp.1*
314 %{_mandir}/man1/%{target}-gcc.1*
315 %{_mandir}/man1/%{target}-gcov.1*
318 %defattr(644,root,root,755)
319 %attr(755,root,root) %{_bindir}/%{target}-[cg]++
320 %attr(755,root,root) %{arch}/bin/[cg]++
321 %attr(755,root,root) %{gcclib}/cc1plus
322 %{arch}/lib/libstdc++.a
323 %{arch}/lib/libstdc++.la
324 %{arch}/lib/libsupc++.a
325 %{arch}/lib/libsupc++.la
327 %{_mandir}/man1/%{target}-g++.1*
330 %defattr(644,root,root,755)
331 %attr(755,root,root) %{gcclib}/cc1obj
332 %{arch}/lib/libobjc.a
333 %{arch}/lib/libobjc.la
336 %defattr(644,root,root,755)
337 %attr(755,root,root) %{_bindir}/%{target}-g77
338 %attr(755,root,root) %{gcclib}/f771
339 %{arch}/lib/libfrtbegin.a
341 %{arch}/lib/libg2c.la
342 %{_mandir}/man1/%{target}-g77.1*
345 %defattr(644,root,root,755)
346 %attr(755,root,root) %{_bindir}/%{target}-gcj
347 %attr(755,root,root) %{_bindir}/%{target}-gcjh
348 %attr(755,root,root) %{_bindir}/%{target}-grepjar
349 %attr(755,root,root) %{_bindir}/%{target}-jar
350 %attr(755,root,root) %{_bindir}/%{target}-jcf-dump
351 %attr(755,root,root) %{_bindir}/%{target}-jv-scan
352 #%attr(755,root,root) %{arch}/bin/grepjar
353 #%attr(755,root,root) %{arch}/bin/jar
354 %attr(755,root,root) %{gcclib}/jc1
355 %attr(755,root,root) %{gcclib}/jvgenmain
356 %{_mandir}/man1/%{target}-gcj.1*
357 %{_mandir}/man1/%{target}-gcjh.1*
358 %{_mandir}/man1/%{target}-grepjar.1*
359 %{_mandir}/man1/%{target}-jar.1*
360 %{_mandir}/man1/%{target}-jcf-dump.1*
361 %{_mandir}/man1/%{target}-jv-scan.1*