MinGW w64

Mojca Miklavec mojca at macports.org
Thu Jun 26 07:54:52 PDT 2014


Hi,

I basically have a working MinGW-w64 setup. There are some minor
glitches still present (and quite some space for improvement of
packaging), but there is one major problem that I have no idea how to
solve.

Instructions are here:

http://sourceforge.net/p/mingw-w64/wiki2/Cross%20Win32%20and%20Win64%20compiler/
https://github.com/mirror/mingw-w64/blob/master/mingw-w64-doc/howto-build/mingw-w64-howto-build-adv.txt

The problematic part is the following:

On Wed, Jun 25, 2014 at 12:46 PM, Mojca Miklavec wrote:
>
> Instructions suggest to:
> (a) compile gcc and install it with "make all-gcc && make install-gcc"
> (b) then compile CRT
> (c) then go back to gcc and run "make all-target-libgcc && make
> install-target-libgcc"
> (d) then compile pthreads
> (e) then go back to gcc and run "make && make install"

What I did for testing purposes was the following:
(a) install (a "bootstraping version" of) i686-w64-mingw32-gcc
(b) compile CRT
(c) create a subport of i686-w64-mingw32-gcc, called
i686-w64-mingw32-libgcc; the latter does the same as the first one,
but it installs more files; I either deleted all files that already
existed in *-gcc during post-destroot (which is a bit tricky), or just
force activated the port *-libgcc

For the moment I ignored the optional part in (d) and (e).

I'm entirely clueless about what exactly I should do. I could try to
create a "bootstrapping" version of i686-w64-mingw32-gcc that would be
installed at a completely weird and non-conflicting location (binaries
would need to be in PATH during installation of CRT though), but I'm
not sure that CRT wouldn't inherit some of those weird settings and
install its own files at weird locations. (I can test.)

The port from (a) could also be deactivated before activating (c).

One option would be to reinvent the wheel and do most of the
installations steps semi-manually, but I really wouldn't want to
follow that route.

Any suggestions highly appreciated.

Mojca

PS: the testing version is at
http://trac.macports.org/browser/users/mojca/ports/cross

Minor issues that I would like to improve before "releasing" include:
- change location of installed files
- disable installing files in mingw-w64 and/or make some sensible
meta-port that would only require installing one port to get all the
components automatically
- figure out what multilib installation does (that can also be left
for later) / how it works
- figure out if there is some nice way to merge
(i686|x86_64)-w64-mingw32-* for binutils and gcc (or at least use
portgroup)
- create a simple portgroup for common settings
- figure out the difference between --prefix and --with-sysroot (it
might make sense to set them differently)


More information about the macports-dev mailing list