Pavel Roskin wrote:
> 
> Hello!
> 
> On Tue, 25 Apr 2000, Mo DeJong wrote:
> 

> > I was under the impression that the whole point of
> > the --host flag was to tell autoconf that
> > $host != $build and is therefore a cross compile.
> 
> Absolutely no. You can cross-compile even packages that know nothing about
> AC_CANONICAL_*. You just need to specify the right compiler for that.
Right, but what you basically do then is to compile these packages
target-natively, ie. using a native configuration setup.

> 
> Autoconf defines cross-compiling as the situation when you cannot run
> executables that you compile. I.e.
Which is a fault, IMHO.

> 
> CC=aix-ibm-rs6000-gcc ./configure
> 
> is cross-compiling (if you run it not on AIX) whereas
> 
> ./configure --build=i586-gnu --host=i386-gnu
> 
> is NOT a cross-compiling in Autoconf sense. 

This is arguable.

How about (under linux):
./configure --build=i386-pc-linux-gnu --host=i386-pc-linux-gnulibc1

This definitely is cross-compilation (incompatible toolchains and
libraries, libc6 files under /usr, libc5 files under
/usr/i386-pc-linux-gnulibc1), but executables will run and autoconf will
incorrectly assume native compilation.

Or an even worser situation: Building a glibc2.0 toolchain under
glibc2.1 based linux-systems (glib2.1 is not fully backward compatible
to glibc2.0)

Another case (Under cygwin):
./configure --build=i386-pc-cygwin32 --host=i386-rtemself

In this case configure will try to run i386-rtemself compiled binaries,
but Cygwin/Win is not able to correctly determine that it isn't the
correct host (running foreign binaries on cygwin sometimes succeeds,
sometime causes Cygwin to hang). 
AFAIK Cygwin/Win simply tries to start everything called *.exe, no
matter what it actually is.

> A trivial solution (that needs discussion, because I'm not sure it's the
> best solution) would be to accept the "--cross" argument for "configure".
> If "--cross" is given you are cross-compiling, if "--cross" is not given,
> you are not cross-compling.
I think this is redunant to evaluating --build, --host, --target.

IMHO, cross-compilation should be defined as build!=host.

Ralf

-- 
Ralf Corsepius 
Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung (FAW)
Helmholtzstr. 16, 89081 Ulm, Germany     Tel: +49/731/501-8690
mailto:[EMAIL PROTECTED]           FAX: +49/731/501-999  
http://www.faw.uni-ulm.de

Reply via email to