Newbie building GHC
Simon Marlow
simonmar@microsoft.com
Tue, 24 Sep 2002 15:55:22 +0100
> | In retrospect I think that unless "configure" is doing something
> really
> | tricky, if you want the Mingw32 "ar" and "ld" to be picked=20
> up instead
> of the
> | Cygwin equivalents then you must have the Mingw32 bin directory in
> your path
> | ahead of the Cygwin bin directory.
>=20
> The right thing to do is what the building guide says. =20
>=20
> The GHC build system is careful to use the newly-built GHC=20
> for compiling
> even .c files, and for doing linking. The newly-built GHC=20
> will use the
> gcc that you point to with the --with-gcc configure command.=20
> It will not
> use a path in any shape or form (unless you omit --with-gcc in which
> case it'll pick whatever random gcc is lying around; probably not the
> right one).
>=20
> The only way I know to make all this work is to use a straightforward
> Cygwin environment for building (with absolutely no mingw=20
> stuff in your
> path) and use --with-gcc in your configure line. Other=20
> things may work,
> but you're on your own.
I think Mike has a point here - unless mingw is first in your PATH, you
get the cygwin binutils (ar, ld, maybe even as?) which could conceivably
be a problem if they behave differently from the mingw versions.
Presumably they don't, however, so we get away with it.
FWIW, I recently build GHC on cygwin/mingw using the instructions from
the building guide and it worked fine.
Cheers,
Simon