From: Andrew Inggs <Andrew.Inggs@te...> - 2001-04-20 13:07:43
Mike Thomas wrote:
> I'm working on a project which uses the Cygwin hosted mingw gcc. That
> project's configuration differs for Cygwin32 and Mingw32 builds.
Do you mean you use Cygwin's gcc with the -mno-cygwin switch to
create the Mingw version of the project?
> I want the Mingw32 branch, rather than Cygwin32, but Cygwin's
> uname and autoconf set the build up for Cygwin32. Furthermore,
> the resulting configure script sets up for headers and libraries
> which are present in Cygwin but not in Mingw.
> Is there some way of getting around this, other than hand editing the
> "config.h" and "mk/config.mk" files generated by configure?
YMMV, but for the Jikes project we use Cygwin for its Unix tools
(shell, textutils, etc.) but the native Mingw compiler, linker,
etc. to do the build. For Jikes this is necessary because the
Cygwin gcc -mno-cygwin option doesn't work for C++, which is what
Jikes is written in. But even for C code it means that configure
will not incorrectly find Cygwin headers and libraries that are
not available under Mingw.
In the case of Jikes, assuming you have the native Mingw tools in
C:\mingw, you configure like this:
$ export PATH=/cygdrive/c/mingw/bin:$PATH
$ cd ~/src/jikes
$ ./configure --host=mingw32
Note that for the gcc-2.95.2-1 snapshot release you must
configure in the source directory, but with the latest Mingw from
SourceForge you can configure in a separate build directory.
See this URL for more: