Hi there,

On Wed, May 17, 2017, at 17:25 CDT, Marty Plummer <netz.ker...@gmail.com> wrote:

> Greetings,
>
> So, I'm a relatively new gentoo user (as of 2016-12) coming from arch,
> and  one thing I've noticed is the relative difficulty of setting up a
> mingw-w64 cross-compile toolchain and libraries.
>
> I'm considering the idea of setting up a sort of prefix specifically
> with the intent of being used on a 'normal' gentoo system with the sole
> purpose of creating 'normal' windows binaries; does anyone have
> suggestions/objections about the idea?
>
> As it currently stands I have to use an archlinux chroot to do my
> cross-compiling, and I'd really enjoy to be able to do this sort of
> thing without depending on an auxiliary distro.

You can find some information on the wiki [1] (warning: I might be a bit
outdated).

But anyway, just check it for you (I haven't set up a cross compilation
toolchain for windows for the last ~7 years): From a plain amd64 stage-3
setting up a mingw-264 environment via:

  # emerge crossdev
  # crossdev [...] -t x86_64-w64-mingw32

still works with a minor complication [2]. Please verify that this works
and open a bug report for the libsanitizer issue mentioning the
workaround [2,3].

After that you end up with a cross-compiler toolchain

  x86_64-w64-mingw32-*

and necessary runtime somewhere in /usr/x86_64-w64-mingw32.

You can also use $ x86_64-w64-mingw32-emerge to cross compile
libraries/packages for mingw.


Keep in mind that a cross compilation toolchain is a bit of a rocky
journey. You might have to pin certain versions of libraries/programs,
and or manually patch some stuff.

Best,
Matthias


[1] https://wiki.gentoo.org/wiki/Mingw

[2] I had to manually disable libsanitizer for gcc-6.3.0. Just set
    EXTRA_ECONF="--disable-libsanitizer" via env/package.env for the
    cross-x86_64-w64-mingw32/gcc package.

[3] https://bugs.gentoo.org/buglist.cgi?quicksearch=mingw&list_id=3536150

Attachment: signature.asc
Description: PGP signature

Reply via email to