|
From: Keith M. <kei...@to...> - 2007-07-05 15:53:25
|
Sisyphus wrote, quoting me: >> `--host=x --build=y' is the standard autoconf way to initiate a >> cross-compile. The purist in me says that, if you use this method >> of specifying the host compiler, then you should *not* need to use >> `-mno-cygwin' at all. I did try it once upon a time[1], and IIRC, >> this is in fact the case. >> >> Conversely, if you use CC='gcc -mno-cygwin', and friends, you should >> not need `--host', (nor `host_alias'), nor `--build', IIRC. >> >> `host_alias=i686-pc-mingw32' is completely redundant here; configure >> sets it internally anyway, to identically the same value as you give >> with `--host'. > > On the strength of that I initially tried to build a static build of > GMP-4.2.1 by running: > > ./configure --disable-shared --enable-static CC='gcc -mno-cygwin' > > But that produced the following error almost immediately: > > ---------------------------------------------- > Rob@desktop2 /cygdrive/c/cygwin/comp/mingw/gmp/static/gmp-4.2.1 > $ ./configure --disable-shared --enable-static CC='gcc -mno-cygwin' > -pc' not recognizede `x86_64. Invalid configuration `x86_64 > -pc-cygwin failed /bin/sh ./config.sub x86_64 That appears anomalous. Aren't you running a 32-bit OS emulation, even though your hardware is 64-bit? If that is true, then the default host identification, as provided by Cygwin to the configure script for the emulated 32-bit host, is flawed. OTOH, if you really are running a 64-bit Cygwin, then maybe the kludgy way in which -mno-cygwin invokes the cross-compile to the mingw32 host breaks in that environment. Setting up a proper cygwin-cross-mingw32 tool chain, invoked by the standard autoconf semantics, may be the way you should go. (Don't ask me why the Cygwin folks chose this kludgy -mno-cygwin way, in the first place). If you wish to pursue this further, please take it up on a Cygwin ML. Regards, Keith. |