Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 271197 - Add an ebuild for 64bit mingw and support for it in crossdev
Summary: Add an ebuild for 64bit mingw and support for it in crossdev
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Gentoo Toolchain Maintainers
URL: http://gcc.gnu.org/install/specific.h...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-25 11:44 UTC by Sven
Modified: 2009-12-10 01:56 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Ebuild for mingw-w64 Win64 runtime headers and libraries. (mingw64-runtime-20090419.ebuild,1.36 KB, text/plain)
2009-07-18 22:06 UTC, Andy Getz
Details
crossdev patch (crossdev-mingw32-win64.patch,512 bytes, patch)
2009-07-18 22:06 UTC, Andy Getz
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sven 2009-05-25 11:44:08 UTC
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:
Comment 1 Andy Getz 2009-07-18 22:05:39 UTC
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.
Comment 2 Andy Getz 2009-07-18 22:06:31 UTC
Created attachment 198437 [details]
Ebuild for mingw-w64 Win64 runtime headers and libraries.
Comment 3 Andy Getz 2009-07-18 22:06:55 UTC
Created attachment 198438 [details, diff]
crossdev patch
Comment 4 Andy Getz 2009-07-18 22:14:50 UTC
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.
Comment 5 SpanKY gentoo-dev 2009-12-09 22:42:57 UTC
the crossdev changes arent really correct.  ive fixed them in latest git and added the new mingw64-runtime package.  thanks for the patches.