3 %bcond_with bootstrap # bootstrap build (only pure C compiler w/o startfiles)
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 BuildRequires: autoconf
23 BuildRequires: automake
25 BuildRequires: crossmingw64-binutils
27 BuildRequires: mpfr-devel
28 BuildRequires: texinfo >= 4.2
29 Requires: crossmingw64-binutils
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 %define target x86_64-mingw32
34 %define arch %{_prefix}/%{target}
35 %define gccarch %{_libdir}/gcc/%{target}
36 %define gcclib %{gccarch}/%{version}
38 %define _noautostrip .*/lib.*\\.a
41 crossmingw64 is a complete cross-compiling development system for
42 building stand-alone Microsoft Windows applications under Linux using
43 the Mingw64 build libraries. This includes a binutils, gcc with g++
44 and libstdc++, all cross targeted to x86_64-mingw32.
46 This package contains cross targeted gcc.
49 Summary: Mingw64 binary utility development utilities - g++
50 Summary(pl.UTF-8): Zestaw narzędzi mingw64 - g++
51 Group: Development/Languages
52 Requires: %{name} = %{epoch}:%{version}-%{release}
55 crossmingw64 is a complete cross-compiling development system for
56 building stand-alone Microsoft Windows applications under Linux using
57 the Mingw64 build libraries. This includes a binutils, gcc with g++
58 and libstdc++, all cross targeted to x86_64-mingw32.
60 This package contains cross targeted g++ and (static) libstdc++.
63 %setup -q -n gcc-%{version}
66 tar -xjf %{SOURCE1} -C winsup
67 ln -s mingw-w64-headers winsup/trunk/mingw
70 build_sysroot=`pwd`/winsup/trunk
72 rm -rf BUILDDIR && install -d BUILDDIR && cd BUILDDIR
74 CFLAGS="%{rpmcflags}" \
75 CXXFLAGS="%{rpmcflags}" \
76 LDFLAGS="%{rpmldflags}" \
80 --infodir=%{_infodir} \
82 --bindir=%{arch}/bin \
84 --libexecdir=%{_libexecdir} \
85 --includedir=%{arch}/include \
86 --with-sysroot=%{arch} \
87 --with-build-sysroot=$build_sysroot \
89 --enable-threads=win32 \
90 --enable-languages="c%{!?with_bootstrap:,c++}" \
97 --with-mangler-in-ld \
98 --with-gxx-include-dir=%{arch}/include/c++/%{version} \
99 --disable-libstdcxx-pch \
100 --enable-__cxa_atexit \
101 --disable-libmudflap \
108 rm -rf $RPM_BUILD_ROOT
109 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}}
114 DESTDIR=$RPM_BUILD_ROOT
116 install gcc/specs $RPM_BUILD_ROOT%{gcclib}
120 mv -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-* $RPM_BUILD_ROOT%{_bindir}
122 # already in arch/lib, shouldn't be here
123 rm $RPM_BUILD_ROOT%{_libdir}/libiberty.a
125 gccdir=$RPM_BUILD_ROOT%{gcclib}
126 mv $gccdir/include-fixed/{limits,syslimits}.h $gccdir/include
127 rm -r $gccdir/include-fixed
128 rm -r $gccdir/install-tools
131 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcc.a
132 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcov.a
135 #if %{without bootstrap}
137 #ln -f $RPM_BUILD_ROOT%{_bindir}/%{target}-{g++,c++}
138 #ln -f $RPM_BUILD_ROOT%{arch}/bin/{g++,c++}
141 # the same... make hardlink
142 ln -f $RPM_BUILD_ROOT%{arch}/bin/gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
145 rm -rf $RPM_BUILD_ROOT
148 %defattr(644,root,root,755)
149 %attr(755,root,root) %{_bindir}/%{target}-gcc*
150 %attr(755,root,root) %{_bindir}/%{target}-cpp
151 %attr(755,root,root) %{_bindir}/%{target}-gcov
152 %attr(755,root,root) %{arch}/bin/gcc
153 #{arch}/lib/libiberty.a
156 %attr(755,root,root) %{gcclib}/cc1
157 %attr(755,root,root) %{gcclib}/collect2
161 %dir %{gcclib}/include
163 %{_mandir}/man1/%{target}-cpp.1*
164 %{_mandir}/man1/%{target}-gcc.1*
165 %{_mandir}/man1/%{target}-gcov.1*
169 %defattr(644,root,root,755)
170 %attr(755,root,root) %{_bindir}/%{target}-[cg]++
171 %attr(755,root,root) %{arch}/bin/[cg]++
172 %attr(755,root,root) %{gcclib}/cc1plus
173 %{arch}/lib/libstdc++.a
174 %{arch}/lib/libstdc++.la
175 %{arch}/lib/libsupc++.a
176 %{arch}/lib/libsupc++.la
178 %{_mandir}/man1/%{target}-g++.1*