2 %define DASHED_SNAP %{nil}
3 %define SNAP %(echo %{DASHED_SNAP} | sed -e "s#-##g")
4 %define GCC_VERSION 3.4.2
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: 2fada3a3effd2fd791df09df1f1534b3
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
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/%{target}
47 %define gcclib %{_libdir}/gcc/%{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 anderem 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}-%{release}
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}-%{release}
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}-%{release}
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}-%{release}
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 --libexecdir=%{_libexecdir} \
219 --includedir=%{arch}/include \
220 --enable-languages="c,c++,f77,java,objc" \
223 --with-gxx-include-dir=%{arch}/include/g++ \
225 --build=%{_target_platform} \
226 --host=%{_target_platform} \
229 #touch ../gcc/c-gperf.h
232 LDFLAGS_FOR_TARGET="%{rpmldflags}" \
233 TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" \
234 build_tooldir="$build_tooldir" \
235 FLAGS_FOR_TARGET="-B${build_tooldir}/bin -B${build_tooldir}/lib -isystem ${build_tooldir}/include -nostdinc" \
236 CFLAGS_FOR_TARGET="-nostdinc" \
237 NM_FOR_TARGET="%{target}-nm"
239 # build libobjc.dll for Objective C
240 # it must be called from obj-%{target_platform}/%{target}/libobjc, but
241 # GCC_FOR_TARGET must be passed
243 #make -C %{target}/libobjc \
244 # LDFLAGS="%{rpmldflags}" \
245 # TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" \
246 # DLLTOOL="%{target}-dlltool --as=%{target}-as" libobjc.dll
248 # spec files for msvcrt*.dll configurations
250 for n in msvcrt msvcrt20 msvcrt40; do
251 sed "s/crtdll/$n/g" <specs | sed "s/crt1/crt2/g" >specs.$n
255 rm -rf $RPM_BUILD_ROOT
258 install -d $RPM_BUILD_ROOT%{_bindir}
259 install -d $RPM_BUILD_ROOT%{_datadir}
260 cd obj-%{target_platform}
263 DESTDIR=$RPM_BUILD_ROOT
266 install specs.msvcrt specs.msvcrt20 specs.msvcrt40 $RPM_BUILD_ROOT%{gcclib}
269 mv -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-* $RPM_BUILD_ROOT%{_bindir}
271 # already in arch/lib, shouldn't be here
272 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
275 # strip linux binaries
276 strip -R .comment -R .note \
277 `echo $RPM_BUILD_ROOT{%{_bindir}/*,%{arch}/bin/*} | grep -v gccbug` \
278 $RPM_BUILD_ROOT%{gcclib}/{cc1*,f771,jc1,jvgenmain}
280 # strip mingw32 libraries
282 $RPM_BUILD_ROOT%{gcclib}/libgcc.a \
283 $RPM_BUILD_ROOT%{arch}/lib/lib*.a
287 ln -f $RPM_BUILD_ROOT%{_bindir}/%{target}-{g++,c++}
288 ln -f $RPM_BUILD_ROOT%{arch}/bin/{g++,c++}
290 # the same... make hardlink
291 ln -f $RPM_BUILD_ROOT%{arch}/bin/gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
294 rm -rf $RPM_BUILD_ROOT
297 %defattr(644,root,root,755)
298 %attr(755,root,root) %{_bindir}/%{target}-gcc*
299 %attr(755,root,root) %{_bindir}/%{target}-cpp
300 %attr(755,root,root) %{_bindir}/%{target}-gcov
301 %attr(755,root,root) %{arch}/bin/gcc
302 %{arch}/lib/libiberty.a
306 %attr(755,root,root) %{gcclib}/cc1
312 %{_mandir}/man1/%{target}-cpp.1*
313 %{_mandir}/man1/%{target}-gcc.1*
314 %{_mandir}/man1/%{target}-gcov.1*
317 %defattr(644,root,root,755)
318 %attr(755,root,root) %{_bindir}/%{target}-[cg]++
319 %attr(755,root,root) %{arch}/bin/[cg]++
320 %attr(755,root,root) %{gcclib}/cc1plus
321 %{arch}/lib/libstdc++.a
322 %{arch}/lib/libstdc++.la
323 %{arch}/lib/libsupc++.a
324 %{arch}/lib/libsupc++.la
326 %{_mandir}/man1/%{target}-g++.1*
329 %defattr(644,root,root,755)
330 %attr(755,root,root) %{gcclib}/cc1obj
331 %{arch}/lib/libobjc.a
332 %{arch}/lib/libobjc.la
335 %defattr(644,root,root,755)
336 %attr(755,root,root) %{_bindir}/%{target}-g77
337 %attr(755,root,root) %{gcclib}/f771
338 %{arch}/lib/libfrtbegin.a
340 %{arch}/lib/libg2c.la
341 %{_mandir}/man1/%{target}-g77.1*
344 %defattr(644,root,root,755)
345 %attr(755,root,root) %{_bindir}/%{target}-gcj
346 %attr(755,root,root) %{_bindir}/%{target}-gcjh
347 %attr(755,root,root) %{_bindir}/%{target}-grepjar
348 %attr(755,root,root) %{_bindir}/%{target}-jar
349 %attr(755,root,root) %{_bindir}/%{target}-jcf-dump
350 %attr(755,root,root) %{_bindir}/%{target}-jv-scan
351 #%attr(755,root,root) %{arch}/bin/grepjar
352 #%attr(755,root,root) %{arch}/bin/jar
353 %attr(755,root,root) %{gcclib}/jc1
354 %attr(755,root,root) %{gcclib}/jvgenmain
355 %{_mandir}/man1/%{target}-gcj.1*
356 %{_mandir}/man1/%{target}-gcjh.1*
357 %{_mandir}/man1/%{target}-grepjar.1*
358 %{_mandir}/man1/%{target}-jar.1*
359 %{_mandir}/man1/%{target}-jcf-dump.1*
360 %{_mandir}/man1/%{target}-jv-scan.1*