[MLton-user] MinGW Cross-compile
Stephen Weeks
sweeks@sweeks.com
Wed, 5 Nov 2003 06:43:01 -0800
Pete's remarks make good sense. The build-cross-gcc script is mostly
to help me remember how I built the cross compilers and to give hints
about how you might do so. Building a cross gcc is a black enough art
to me that I need all the help I can get.
In fact, you don't even need a cross gcc to build MLton. You can
always use -stop g to generate the C and assembler and then ship those
over to the target machine, where you use a regular gcc. If you're
having too many problems, this approach might be easier for
bootstrapping.
> The mingw case is what I copied and modified from the
> cygwin case. I'm wondering in the cygwin case why
> it does a
>
> (cd usr && tar etc.
>
> and not
>
> (cd /usr && tar etc.
>
> ?
Because the two previous "tar -x" unpack in usr/include and usr/lib,
at least for the Cygwin stuff I got.
> Also it doesn't seem to copy anything from $root/cygwin at all, even
> though it unpacks the cybwin runtime and the w32api there.
That's because you changed the usr to /usr.
> Maybe this is what I need to do in my mingw case so that it can find
> windows.h? Or is it something about include-directories which has
> to be set and where the cygwin installation just requires them to be
> under cygwin/ ?
I do remember problems with some combinations of gcc and the libraries
where gcc didn't know to look in include/w32api/ to find windows.h.
Maybe Pete's configure args fix this, or maybe newer gcc's know to
look there. I worked around it at one point by copying everything in
include/w32api/ up one level into include/.