3 %bcond_with bootstrap # bootstrap build (only C compiler)
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
16 Group: Development/Languages
17 Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
18 # Source0-md5: 4afa0290cc3a41ac8822666f1110de98
19 Source1: http://dl.sourceforge.net/mingw-w64/mingw-w64-snapshot-20080424.tar.bz2
20 # Source1-md5: e2eea49233efd0be3a40fc774abeb1a2
21 Patch0: %{name}-no_include64.patch
22 Patch1: %{name}-no_red_zone.patch
23 Patch2: %{name}-pr25672.patch
24 BuildRequires: autoconf
25 BuildRequires: automake
27 BuildRequires: crossmingw64-binutils
29 BuildRequires: mpfr-devel
30 BuildRequires: texinfo >= 4.2
31 Requires: crossmingw64-binutils
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 %define target x86_64-mingw32
35 %define arch %{_prefix}/%{target}
36 %define gccarch %{_libdir}/gcc/%{target}
37 %define gcclib %{gccarch}/%{version}
39 %define _noautostrip .*/lib.*\\.a
42 crossmingw64 is a complete cross-compiling development system for
43 building stand-alone Microsoft Windows applications under Linux using
44 the Mingw64 build libraries. This includes a binutils, gcc with g++
45 and libstdc++, all cross targeted to x86_64-mingw32.
47 This package contains cross targeted gcc.
50 Summary: Mingw64 binary utility development utilities - g++
51 Summary(pl.UTF-8): Zestaw narzędzi mingw64 - g++
52 Group: Development/Languages
53 Requires: %{name} = %{epoch}:%{version}-%{release}
56 crossmingw64 is a complete cross-compiling development system for
57 building stand-alone Microsoft Windows applications under Linux using
58 the Mingw64 build libraries. This includes a binutils, gcc with g++
59 and libstdc++, all cross targeted to x86_64-mingw32.
61 This package contains cross targeted g++ and (static) libstdc++.
64 %setup -q -n gcc-%{version} -a 1
69 cp -ar trunk/mingw-w64-headers/include winsup/mingw
72 build_sysroot=`pwd`/winsup
74 rm -rf BUILDDIR && install -d BUILDDIR && cd BUILDDIR
76 CFLAGS="%{rpmcflags}" \
77 CXXFLAGS="%{rpmcflags}" \
78 LDFLAGS="%{rpmldflags}" \
82 --infodir=%{_infodir} \
85 --libexecdir=%{_libexecdir} \
86 --includedir=%{arch}/include \
87 --with-sysroot=%{arch} \
88 --with-build-sysroot=$build_sysroot \
90 --enable-threads=win32 \
91 --disable-sjlj-exceptions \
92 --enable-languages="c%{!?with_bootstrap:,c++}" \
99 --with-mangler-in-ld \
100 --with-gxx-include-dir=%{arch}/include/c++/%{version} \
101 --disable-libstdcxx-pch \
102 --enable-__cxa_atexit \
103 --disable-libmudflap \
105 --with-pkgversion="PLD-Linux" \
106 --with-bugurl="http://bugs.pld-linux.org" \
107 --build=%{_target_platform} \
108 --host=%{_target_platform} \
118 \${p}/xgcc -B\${p} \$@
122 export CC=`pwd`/cross-gcc
124 cd trunk/mingw-w64-crt
128 --prefix=%{_prefix} \
129 --with-sysroot=$build_sysroot \
136 build_sysroot=`pwd`/winsup
138 rm -rf $RPM_BUILD_ROOT
139 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir},%{arch}/lib,%{arch}/mingw/include}
144 DESTDIR=$RPM_BUILD_ROOT
146 install gcc/specs $RPM_BUILD_ROOT%{gcclib}
150 gccdir=$RPM_BUILD_ROOT%{gcclib}
151 mv $gccdir/include-fixed/{limits,syslimits}.h $gccdir/include
152 rm -r $gccdir/include-fixed
153 rm -r $gccdir/install-tools
156 cp -ar $build_sysroot/mingw/include $RPM_BUILD_ROOT%{arch}
158 make -C trunk/mingw-w64-crt install \
159 DESTDIR=$RPM_BUILD_ROOT
161 find $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/lib -type f \
162 -exec mv "{}" "$RPM_BUILD_ROOT%{arch}/lib" ";"
165 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcc.a
166 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcov.a
167 find $RPM_BUILD_ROOT%{arch}/lib -type f -name '*.a' -o -name '*.o' \
168 -exec %{target}-strip -g -R.note -R.comment "{}" ";"
172 rm -rf $RPM_BUILD_ROOT
175 %defattr(644,root,root,755)
176 %attr(755,root,root) %{_bindir}/%{target}-gcc*
177 %attr(755,root,root) %{_bindir}/%{target}-cpp
178 %attr(755,root,root) %{_bindir}/%{target}-gcov
181 %dir %{gcclib}/include
182 %{gcclib}/include/ammintrin.h
183 %{gcclib}/include/bmmintrin.h
184 %{gcclib}/include/cpuid.h
185 %{gcclib}/include/emmintrin.h
186 %{gcclib}/include/float.h
187 %{gcclib}/include/iso646.h
188 %{gcclib}/include/limits.h
189 %{gcclib}/include/mm3dnow.h
190 %{gcclib}/include/mm_malloc.h
191 %{gcclib}/include/mmintrin-common.h
192 %{gcclib}/include/mmintrin.h
193 %{gcclib}/include/nmmintrin.h
194 %{gcclib}/include/pmmintrin.h
195 %{gcclib}/include/smmintrin.h
196 %{gcclib}/include/stdarg.h
197 %{gcclib}/include/stdbool.h
198 %{gcclib}/include/stddef.h
199 %{gcclib}/include/stdfix.h
200 %{gcclib}/include/syslimits.h
201 %{gcclib}/include/tgmath.h
202 %{gcclib}/include/tmmintrin.h
203 %{gcclib}/include/unwind.h
204 %{gcclib}/include/varargs.h
205 %{gcclib}/include/xmmintrin.h
206 %attr(755,root,root) %{gcclib}/cc1
207 %attr(755,root,root) %{gcclib}/collect2
211 %{_mandir}/man1/%{target}-cpp.1*
212 %{_mandir}/man1/%{target}-gcc.1*
213 %{_mandir}/man1/%{target}-gcov.1*
216 %if %{without bootstrap}
217 %exclude %{arch}/include/c++
218 %exclude %{arch}/lib/libstdc++.a
219 %exclude %{arch}/lib/libsupc++.a
223 %{arch}/mingw/include
225 %if %{without bootstrap}
227 %defattr(644,root,root,755)
228 %attr(755,root,root) %{_bindir}/%{target}-[cg]++
229 %attr(755,root,root) %{gcclib}/cc1plus
230 %{arch}/lib/libstdc++.a
231 %{arch}/lib/libstdc++.la
232 %{arch}/lib/libsupc++.a
233 %{arch}/lib/libsupc++.la
235 %{_mandir}/man1/%{target}-g++.1*