On Tue, 5 Jun 2001, Teun Burgers wrote:
> Tim Van Holder wrote:
>
> > Of course, if you need to specify CC anyway, you might as well specify
> > your host system too:
> >
> > ./configure CC='gcc -mno-cygwin' --host=i386-pc-mingw32
> >
> > After all, you're basically cross-compiling, aren't you.
>
> Earnie Boyd wrote:
>
> > This is the correct way to do it. You can shorten to --host=mingw32 if
> > you wish.
>
> I agree that this is basically a cross-compile. It is however just a
> little bit annoying to specify the target OS twice,
> with --host and -mno-cygwin.
> So I decided to add the following bit to the configure script:
>
> AC_CACHE_CHECK(
> [for mingw32],
> ac_cv_mingw32,
> AC_TRY_COMPILE(,
> [return __MINGW32__],
> ac_cv_mingw32="yes",
> ac_cv_mingw32="no")
> )
>
> if test $ac_cv_mingw32 = yes;then
> LIBS="$LIBS -lwsock32"
> fi
But the compiler is not the same as the --host. For example, you
might want to compile with mingw or VC++. There is a new
target in the net version of config.sub that tries to deal
with this issue.
You can now do this for VC++:
./configure CC=cl --host=windows32
As well as (assuming Mingw gcc):
./configure CC=gcc --host=windows32
Both are really cross compiles, even if the 2.50 release
does not report them as such (it is a backwards compatibility thing).
Mo DeJong
Red Hat Inc