From: Richard W.M. Jones <"Richard W.M. Jones "> Date: Thu, 12 Feb 2009 22:18:47 +0000 (+0000) Subject: Win64 compiler now builds. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=0647091ad12105f74c86ae372652d9c4a312284f;p=fedora-mingw.git Win64 compiler now builds. --- diff --git a/mingw64-filesystem/macros.mingw64 b/mingw64-filesystem/macros.mingw64 index 1e7b258..40a4da8 100644 --- a/mingw64-filesystem/macros.mingw64 +++ b/mingw64-filesystem/macros.mingw64 @@ -5,7 +5,7 @@ # Paths. %_mingw64_sysroot %{_prefix}/%{_mingw64_target}/sys-root %_mingw64_prefix %{_mingw64_sysroot} -%_mingw64_exec_prefix %{_mingw64_prefix}/%{_mingw64_target} +%_mingw64_exec_prefix %{_mingw64_prefix} %_mingw64_bindir %{_mingw64_exec_prefix}/bin %_mingw64_sbindir %{_mingw64_exec_prefix}/sbin %_mingw64_libexecdir %{_mingw64_exec_prefix}/libexec @@ -17,10 +17,7 @@ %_mingw64_sysconfdir %{_mingw64_prefix}/etc %_mingw64_sharedstatedir %{_mingw64_prefix}/com %_mingw64_localstatedir %{_mingw64_prefix}/var - -# XXX Not sure which of these is correct ... -#%_mingw64_includedir %{_mingw64_prefix}/include -%_mingw64_includedir %{_mingw64_exec_prefix}/include +%_mingw64_includedir %{_mingw64_prefix}/include # Build macros. %_mingw64_host %{_mingw64_target} diff --git a/mingw64-filesystem/mingw64-filesystem.spec b/mingw64-filesystem/mingw64-filesystem.spec index d43e404..1e2e7a3 100644 --- a/mingw64-filesystem/mingw64-filesystem.spec +++ b/mingw64-filesystem/mingw64-filesystem.spec @@ -1,7 +1,7 @@ %define debug_package %{nil} Name: mingw64-filesystem -Version: 6 +Version: 10 Release: 1%{?dist} Summary: MinGW base filesystem and environment @@ -89,21 +89,25 @@ install -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/rpmlint/ mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32 -# GCC requires these directories, even though they contain links -# to binaries which are also installed in /usr/bin etc. These -# contain Fedora native binaries. +# These directories are used by GCC for cross-compilation. +# NOTE different contents from mingw32. mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/bin mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/lib # The system root which will contain Windows native binaries # and Windows-specific header files, pkgconfig, etc. # NOTE different from mingw32. -mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/x86_64-pc-mingw32 -mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/x86_64-pc-mingw32/bin -mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/x86_64-pc-mingw32/include -mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/x86_64-pc-mingw32/include/sys -mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/x86_64-pc-mingw32/lib -mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/x86_64-pc-mingw32/lib/pkgconfig +mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root +mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/bin +mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/include +mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/include/sys +mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/lib +mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/lib/pkgconfig + +# GCC wants to look in include64/ directory for some reason. +pushd $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root +ln -s include include64 +popd # We don't normally package manual pages and info files, except # where those are not supplied by a Fedora native package. So we @@ -120,13 +124,11 @@ mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/share/man mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/share/man/man{1,2,3,4,5,6,7,8,l,n} mkdir -p $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root/share/aclocal - -# This is needed because of some problems with upstream gcc and -# bad mingw32 patches. pushd $RPM_BUILD_ROOT%{_prefix}/x86_64-pc-mingw32/sys-root -ln -s x86_64-pc-mingw32 mingw +ln -s . mingw popd + # NB. NOT _libdir mkdir -p $RPM_BUILD_ROOT/usr/lib/rpm install -m 0755 mingw64-find-requires.sh $RPM_BUILD_ROOT/usr/lib/rpm @@ -152,7 +154,7 @@ rm -rf $RPM_BUILD_ROOT %changelog -* Wed Feb 11 2009 Richard W.M. Jones - 6-1 +* Wed Feb 11 2009 Richard W.M. Jones - 10-1 - Start mingw64 development. * Sun Feb 1 2009 Richard W.M. Jones - 46-1 diff --git a/mingw64-gcc/mingw64-gcc.spec b/mingw64-gcc/mingw64-gcc.spec index bee50c9..d5ee083 100644 --- a/mingw64-gcc/mingw64-gcc.spec +++ b/mingw64-gcc/mingw64-gcc.spec @@ -4,7 +4,7 @@ Name: mingw64-gcc Version: 4.4.0 -Release: 0.20090206.6%{?dist} +Release: 0.20090206.7%{?dist} Summary: MinGW Windows cross-compiler (GCC) for C License: GPLv2+ @@ -15,7 +15,7 @@ Source1: ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/snapsho BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: texinfo -BuildRequires: mingw64-filesystem >= 6 +BuildRequires: mingw64-filesystem >= 10 BuildRequires: mingw64-binutils BuildRequires: mingw64-headers BuildRequires: mingw64-runtime @@ -26,7 +26,7 @@ BuildRequires: mpfr-devel BuildRequires: libgomp # NB: Explicit mingw64-filesystem dependency is REQUIRED here. -Requires: mingw64-filesystem >= 6 +Requires: mingw64-filesystem >= 10 Requires: mingw64-binutils Requires: mingw64-headers Requires: mingw64-runtime @@ -69,12 +69,11 @@ MinGW Windows cross-compiler for C++ cd gcc-%{upstream_version} mkdir -p build -cd build +pushd build languages="c,c++" CC="%{__cc} ${RPM_OPT_FLAGS}" \ -MINGW64_CFLAGS="%{_mingw64_cflags} -L%{_mingw64_libdir}" \ ../configure \ --prefix=%{_prefix} \ --bindir=%{_bindir} \ @@ -96,6 +95,7 @@ MINGW64_CFLAGS="%{_mingw64_cflags} -L%{_mingw64_libdir}" \ --enable-languages="$languages" $optargs make %{?_smp_mflags} all +popd %install @@ -114,6 +114,12 @@ mkdir -p $RPM_BUILD_ROOT/lib ln -sf ..%{_prefix}/bin/x86_64-pc-mingw32-cpp \ $RPM_BUILD_ROOT/lib/x86_64-pc-mingw32-cpp +# This DLL should definitely not be in /usr/bin ... +mkdir -p $RPM_BUILD_ROOT%{_mingw64_bindir} +mv $RPM_BUILD_ROOT%{_bindir}/libgcc_s_sjlj-1.dll \ + $RPM_BUILD_ROOT%{_mingw64_bindir} + + %clean rm -rf $RPM_BUILD_ROOT @@ -127,12 +133,13 @@ rm -rf $RPM_BUILD_ROOT %{_prefix}/x86_64-pc-mingw32/lib/libiberty.a %dir %{_libdir}/gcc/x86_64-pc-mingw32 %dir %{_libdir}/gcc/x86_64-pc-mingw32/%{version} -%{_libdir}/gcc/x86_64-pc-mingw32/%{version}/crtbegin.o -%{_libdir}/gcc/x86_64-pc-mingw32/%{version}/crtend.o %{_libdir}/gcc/x86_64-pc-mingw32/%{version}/crtfastmath.o %{_libdir}/gcc/x86_64-pc-mingw32/%{version}/libgcc.a +%{_libdir}/gcc/x86_64-pc-mingw32/%{version}/libgcc_eh.a +%{_libdir}/gcc/x86_64-pc-mingw32/%{version}/libgcc_s.a %{_libdir}/gcc/x86_64-pc-mingw32/%{version}/libgcov.a %{_libdir}/gcc/x86_64-pc-mingw32/%{version}/libssp.a +%{_libdir}/gcc/x86_64-pc-mingw32/%{version}/libssp.dll.a %{_libdir}/gcc/x86_64-pc-mingw32/%{version}/libssp.la %{_libdir}/gcc/x86_64-pc-mingw32/%{version}/libssp_nonshared.a %{_libdir}/gcc/x86_64-pc-mingw32/%{version}/libssp_nonshared.la @@ -145,10 +152,12 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/gcc/x86_64-pc-mingw32/%{version}/include/ssp/*.h %dir %{_libdir}/gcc/x86_64-pc-mingw32/%{version}/install-tools %{_libdir}/gcc/x86_64-pc-mingw32/%{version}/install-tools/* +%{_libdir}/gcc/x86_64-pc-mingw32/bin/libssp-0.dll %dir %{_libexecdir}/gcc/x86_64-pc-mingw32/%{version}/install-tools %{_libexecdir}/gcc/x86_64-pc-mingw32/%{version}/install-tools/* %{_mandir}/man1/x86_64-pc-mingw32-gcc.1* %{_mandir}/man1/x86_64-pc-mingw32-gcov.1* +%{_mingw64_bindir}/libgcc_s_sjlj-1.dll %files -n mingw64-cpp @@ -176,7 +185,7 @@ rm -rf $RPM_BUILD_ROOT %changelog -* Wed Feb 11 2009 Richard W.M. Jones - 4.4.0-0.20090206.6 +* Wed Feb 11 2009 Richard W.M. Jones - 4.4.0-0.20090206.7 - Started mingw64 development. * Mon Nov 24 2008 Richard W.M. Jones - 4.3.2-12 diff --git a/mingw64-headers/mingw64-headers.spec b/mingw64-headers/mingw64-headers.spec index a295b2d..c03cb2a 100644 --- a/mingw64-headers/mingw64-headers.spec +++ b/mingw64-headers/mingw64-headers.spec @@ -5,8 +5,8 @@ %define svn_revision 607 Name: mingw64-headers -Version: 0.1 -Release: 0.svn%{svn_revision}.6%{?dist} +Version: 0.1 +Release: 0.svn%{svn_revision}.10%{?dist} Summary: Win32 header files and stubs License: Public Domain and LGPLv2+ @@ -19,9 +19,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch -BuildRequires: mingw64-filesystem >= 6 +BuildRequires: mingw64-filesystem >= 10 -Requires: mingw64-filesystem >= 6 +Requires: mingw64-filesystem >= 10 %description @@ -45,16 +45,15 @@ find -name ChangeLog -delete %install rm -rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT%{_mingw64_includedir} +# This is different from mingw32. By default GCC 4.4 searches for +# headers in these two directories: +# /usr/x86_64-pc-mingw32/include +# /usr/x86_64-pc-mingw32/sys-root/mingw/include64 (symlink to ./include) -cp -a trunk/mingw-w64-headers/include/* $RPM_BUILD_ROOT%{_mingw64_includedir}/ -cp -a trunk/mingw-w64-headers/direct-x/include/* $RPM_BUILD_ROOT%{_mingw64_includedir}/ +mkdir -p $RPM_BUILD_ROOT%{_mingw64_includedir} -# XXX We don't know why this is required, but gcc/cc1 fails -# to find the header files without it. -pushd $RPM_BUILD_ROOT%{_mingw64_exec_prefix} -ln -s include include64 -popd +cp -a trunk/mingw-w64-headers/include/* $RPM_BUILD_ROOT%{_mingw64_includedir} +cp -a trunk/mingw-w64-headers/direct-x/include/* $RPM_BUILD_ROOT%{_mingw64_includedir} %clean @@ -64,11 +63,10 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %{_mingw64_includedir}/* -%{_mingw64_exec_prefix}/include64 %changelog -* Wed Feb 11 2009 Richard W.M. Jones - 0.1-0.svn607.6 +* Wed Feb 11 2009 Richard W.M. Jones - 0.1-0.svn607.10 - Started mingw64 development. * Mon Dec 15 2008 Richard W.M. Jones - 3.13-1 diff --git a/mingw64-runtime/mingw64-runtime.spec b/mingw64-runtime/mingw64-runtime.spec index 2831725..fcab2df 100644 --- a/mingw64-runtime/mingw64-runtime.spec +++ b/mingw64-runtime/mingw64-runtime.spec @@ -12,7 +12,7 @@ Name: mingw64-runtime Version: 0.1 -Release: 0.svn%{svn_revision}.1%{?dist} +Release: 0.svn%{svn_revision}.3%{?dist} Summary: MinGW Windows cross-compiler runtime License: Public Domain @@ -23,7 +23,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch -BuildRequires: mingw64-filesystem >= 3 +BuildRequires: mingw64-filesystem >= 10 BuildRequires: mingw64-binutils BuildRequires: mingw64-headers BuildRequires: mingw64-gcc-bootstrap @@ -39,7 +39,7 @@ MinGW Windows cross-compiler runtime, base libraries. %build pushd trunk/mingw-w64-crt -%{_mingw64_configure} --with-sysroot=%{_mingw64_prefix} +%{_mingw64_configure} --with-sysroot=%{_mingw64_sysroot} make %{?_smp_mflags} popd @@ -51,6 +51,21 @@ pushd trunk/mingw-w64-crt make DESTDIR=$RPM_BUILD_ROOT install popd +# The above installs in /usr/x86_64-pc-mingw32/sys-root/x86_64-pc-mingw32/lib +# which is the wrong location. Move it to %{_mingw64_libdir}. +mv $RPM_BUILD_ROOT%{_mingw64_sysroot}/%{_mingw64_target}/lib \ + $RPM_BUILD_ROOT%{_mingw64_libdir} + +# However GCC when building looks in /usr/x86_64-pc-mingw32/lib for +# libraries. Make symlinks so that this works. +# XXX Hack - why is this needed? +mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{_mingw64_target}/lib +pushd $RPM_BUILD_ROOT%{_prefix}/%{_mingw64_target}/lib +for f in ../sys-root/lib/*.[ao]; do + ln -s $f +done +popd + %clean rm -rf $RPM_BUILD_ROOT @@ -59,10 +74,11 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %{_mingw64_libdir}/* +%{_prefix}/%{_mingw64_target}/lib/* %changelog -* Wed Feb 11 2009 Richard W.M. Jones - 0.1-0.svn607.1 +* Wed Feb 11 2009 Richard W.M. Jones - 0.1-0.svn607.3 - Started mingw64 development. * Tue Feb 10 2009 Richard W.M. Jones - 3.15.2-1