3 %bcond_with bootstrap # bootstrap build (only C compiler with static runtime)
5 Summary: Cross Mingw64 GNU binary utility development utilities - gcc
6 Summary(es.UTF-8): Utilitarios para desarrollo de binarios de la GNU - Mingw64 gcc
7 Summary(fr.UTF-8): Utilitaires de développement binaire de GNU - Mingw64 gcc
8 Summary(pl.UTF-8): Skrośne narzędzia programistyczne GNU dla Mingw64 - gcc
9 Summary(pt_BR.UTF-8): Utilitários para desenvolvimento de binários da GNU - Mingw64 gcc
10 Summary(tr.UTF-8): GNU geliştirme araçları - Mingw64 gcc
11 Name: crossmingw64-gcc
12 %define _major_ver 4.4
14 Version: %{_major_ver}.%{_minor_ver}
15 %define _snap 20090206
19 Group: Development/Languages
20 #Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
21 Source0: ftp://gcc.gnu.org/pub/gcc/snapshots/LATEST-%{_major_ver}/gcc-%{_major_ver}-%{_snap}.tar.bz2
22 Source1: http://dl.sourceforge.net/mingw-w64/mingw-w64-snapshot-20081115.tar.bz2
23 # Source1-md5: b472282419e6aea64e14763e30d5bb63
24 Patch100: gcc-branch.diff.bz2
25 Patch0: %{name}-no_include64.patch
26 BuildRequires: autoconf
27 BuildRequires: automake
29 BuildRequires: crossmingw64-binutils
30 %{!?with_bootstrap:BuildRequires: crossmingw64-gcc}
32 BuildRequires: mpfr-devel
33 BuildRequires: texinfo >= 4.2
34 Requires: crossmingw64-binutils
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 %define target x86_64-mingw32
38 %define arch %{_prefix}/%{target}
39 %define gccarch %{_libdir}/gcc/%{target}
40 %define gcclib %{gccarch}/%{version}
42 %define _noautostrip .*/lib.*\\.a
45 crossmingw64 is a complete cross-compiling development system for
46 building stand-alone Microsoft Windows applications under Linux using
47 the Mingw64 build libraries. This includes a binutils, gcc with g++
48 and libstdc++, all cross targeted to x86_64-mingw32.
50 This package contains cross targeted gcc.
53 Summary: Mingw64 binary utility development utilities - g++
54 Summary(pl.UTF-8): Zestaw narzędzi mingw64 - g++
55 Group: Development/Languages
56 Requires: %{name} = %{epoch}:%{version}-%{release}
59 crossmingw64 is a complete cross-compiling development system for
60 building stand-alone Microsoft Windows applications under Linux using
61 the Mingw64 build libraries. This includes a binutils, gcc with g++
62 and libstdc++, all cross targeted to x86_64-mingw32.
64 This package contains cross targeted g++ and (static) libstdc++.
67 #setup -q -n gcc-%{version} -a 1
68 %setup -q -n gcc-%{_major_ver}-%{_snap} -a 1
72 cp -ar trunk/mingw-w64-headers/include winsup/mingw
75 build_sysroot=`pwd`/winsup
77 rm -rf BUILDDIR && install -d BUILDDIR && cd BUILDDIR
79 CFLAGS="%{rpmcflags}" \
80 CXXFLAGS="%{rpmcflags}" \
81 LDFLAGS="%{rpmldflags}" \
85 --infodir=%{_infodir} \
88 --libexecdir=%{_libexecdir} \
89 --includedir=%{arch}/include \
92 --with-sysroot=%{arch} \
93 %{?with_bootstrap:--with-build-sysroot=$build_sysroot} \
94 --%{?with_bootstrap:dis}%{!?with_bootstrap:en}able-shared \
95 --enable-threads=win32 \
96 --enable-sjlj-exceptions \
97 --enable-languages="c%{!?with_bootstrap:,c++}" \
100 --enable-decimal-float=yes \
103 --disable-win32-registry \
106 --with-mangler-in-ld \
107 --with-gxx-include-dir=%{arch}/include/c++/%{version} \
108 --disable-libstdcxx-pch \
110 --enable-__cxa_atexit \
111 --disable-libmudflap \
113 --with-pkgversion="PLD-Linux" \
114 --with-bugurl="http://bugs.pld-linux.org" \
115 --build=%{_target_platform} \
116 --host=%{_target_platform} \
126 \${p}/xgcc -B\${p} \$@
130 export CC=%{?with_bootstrap:`pwd`/cross-gcc}%{!?with_bootstrap:%{_bindir}/%{target}-gcc}
132 cd trunk/mingw-w64-crt
136 --prefix=%{_prefix} \
137 --with-sysroot=%{?with_bootstrap:$build_sysroot}%{!?with_bootstrap:%{arch}}
144 build_sysroot=`pwd`/winsup
146 rm -rf $RPM_BUILD_ROOT
147 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir},%{arch}/lib,%{arch}/mingw/include}
152 DESTDIR=$RPM_BUILD_ROOT
154 install gcc/specs $RPM_BUILD_ROOT%{gcclib}
158 gccdir=$RPM_BUILD_ROOT%{gcclib}
159 mv $gccdir/include-fixed/{limits,syslimits}.h $gccdir/include
160 rm -r $gccdir/include-fixed
161 rm -r $gccdir/install-tools
164 cp -ar $build_sysroot/mingw/include $RPM_BUILD_ROOT%{arch}
166 make -C trunk/mingw-w64-crt install \
167 DESTDIR=$RPM_BUILD_ROOT
169 find $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/lib -type f \
170 -exec mv "{}" "$RPM_BUILD_ROOT%{arch}/lib" ";"
173 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcc.a
174 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcov.a
175 find $RPM_BUILD_ROOT%{arch}/lib -type f -name '*.a' -o -name '*.o' \
176 -exec %{target}-strip -g -R.note -R.comment "{}" ";"
180 rm -rf $RPM_BUILD_ROOT
183 %defattr(644,root,root,755)
184 %attr(755,root,root) %{_bindir}/%{target}-gcc*
185 %attr(755,root,root) %{_bindir}/%{target}-cpp
186 %attr(755,root,root) %{_bindir}/%{target}-gcov
189 %dir %{gcclib}/include
190 %{gcclib}/include/ammintrin.h
191 %{gcclib}/include/avxintrin.h
192 %{gcclib}/include/bmmintrin.h
193 %{gcclib}/include/cpuid.h
194 %{gcclib}/include/cross-stdarg.h
195 %{gcclib}/include/emmintrin.h
196 %{gcclib}/include/float.h
197 %{gcclib}/include/immintrin.h
198 %{gcclib}/include/iso646.h
199 %{gcclib}/include/limits.h
200 %{gcclib}/include/mm3dnow.h
201 %{gcclib}/include/mm_malloc.h
202 %{gcclib}/include/mmintrin-common.h
203 %{gcclib}/include/mmintrin.h
204 %{gcclib}/include/nmmintrin.h
205 %{gcclib}/include/pmmintrin.h
206 %{gcclib}/include/smmintrin.h
207 %{gcclib}/include/stdarg.h
208 %{gcclib}/include/stdbool.h
209 %{gcclib}/include/stddef.h
210 %{gcclib}/include/stdfix.h
211 %{gcclib}/include/syslimits.h
212 %{gcclib}/include/tgmath.h
213 %{gcclib}/include/tmmintrin.h
214 %{gcclib}/include/unwind.h
215 %{gcclib}/include/varargs.h
216 %{gcclib}/include/wmmintrin.h
217 %{gcclib}/include/x86intrin.h
218 %{gcclib}/include/xmmintrin.h
219 %attr(755,root,root) %{gcclib}/cc1
220 %attr(755,root,root) %{gcclib}/collect2
223 %if %{without bootstrap}
224 %{_bindir}/libgcc_s_sjlj-1.dll
225 %{gcclib}/libgcc_eh.a
229 %{_mandir}/man1/%{target}-cpp.1*
230 %{_mandir}/man1/%{target}-gcc.1*
231 %{_mandir}/man1/%{target}-gcov.1*
234 %if %{without bootstrap}
235 %exclude %{arch}/include/c++
236 %exclude %{arch}/lib/libstdc++.a
237 %exclude %{arch}/lib/libsupc++.a
241 %{arch}/mingw/include
243 %if %{without bootstrap}
245 %defattr(644,root,root,755)
246 %attr(755,root,root) %{_bindir}/%{target}-[cg]++
247 %attr(755,root,root) %{gcclib}/cc1plus
248 %{arch}/lib/libstdc++.a
249 %{arch}/lib/libstdc++.la
250 %{arch}/lib/libsupc++.a
251 %{arch}/lib/libsupc++.la
253 %{_mandir}/man1/%{target}-g++.1*