Source1: http://dl.sourceforge.net/mingw-w64/mingw-w64-snapshot-20080424.tar.bz2
# Source1-md5: e2eea49233efd0be3a40fc774abeb1a2
Patch0: %{name}-no_include64.patch
+Patch1: %{name}-no_red_zone.patch
+Patch2: %{name}-pr25672.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bison
%prep
%setup -q -n gcc-%{version} -a 1
%patch0 -p1
+%patch1 -p1
+%patch2 -p1
mkdir -p winsup/mingw
cp -ar trunk/mingw-w64-headers/include winsup/mingw
--host=%{_target_platform} \
--target=%{target}
-%{__make} -j2
+%{__make}
cd ..
make -C trunk/mingw-w64-crt install \
DESTDIR=$RPM_BUILD_ROOT
-mv $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/lib/* \
- $RPM_BUILD_ROOT%{arch}/lib
+find $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/lib -type f \
+ -exec mv "{}" "$RPM_BUILD_ROOT%{arch}/lib" ";"
%if 0%{!?debug:1}
%{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcc.a
%{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcov.a
-%{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{arch}/lib/*.{a,o}
+find $RPM_BUILD_ROOT%{arch}/lib -type f -name '*.a' -o -name '*.o' \
+ -exec %{target}-strip -g -R.note -R.comment "{}" ";"
%endif
%clean