At http://gcc.gnu.org/install/specific.html#windows it says, that gcc supports the target "x86_64-pc-mingw32". Together with the mingw-w64 runtime library, it should be possible to cross-compile for Windows 64-bit. Yet the mingw-w64 runtime library doesn't seem to be in portage yet. Please add it and add support to crossdev. Reproducible: Always Steps to Reproduce:
I think this is a fantastic idea! I wrote an ebuild for the runtime headers and library, attached is dev-util/mingw64-runtime-20090419.ebuild I also had to modify crossdev slightly to differentiate between 32-bit and 64-bit mingw targets and install the appropriate runtime; a patch is attached. The ebuild could use a glancing-over from someone who knows toolchains and cross-compilers better than I, especially as to whether runtime libraries should go in /usr/${CTARGET}/lib or /usr/${CTARGET}/usr/lib. I have successfully built a cross-toolchain using this modified crossdev for the target x86_64-w64-mingw32 and used to compile a Win64 hello world application. Based on my reading from the mingw-w64 documentation and the way I modified the crossdev script, I would suggest using this same target (note the w64 vendor). As this choice of target is not obvious to me, it might be nice to add a note to the crossdev target help (crossdev -t help). The mingw-w64 project suggests using the same runtime to build Win32 toolchains; this could probably be accomplished using crossdev with target i686-w64-mingw32, but I have not tried.
Created attachment 198437 [details] Ebuild for mingw-w64 Win64 runtime headers and libraries.
Created attachment 198438 [details, diff] crossdev patch
I should add that my toolchain uses cross-x86_64-w64-mingw32/binutils-2.19.1-r1[-gold] and cross-x86_64-w64-mingw32/gcc-4.4.0-r1 and that I haven't really tested much aside from basic C.
the crossdev changes arent really correct. ive fixed them in latest git and added the new mingw64-runtime package. thanks for the patches.
http://git.overlays.gentoo.org/gitweb/?p=proj/crossdev.git;a=commitdiff;h=fdc0d84ea4e92bdea9d46594716fb0231f30d2b8