On Mon, 24 Apr 2000, Pavel Roskin wrote:

> Hello!
> 
> > If the program can not be run, autoconf assumes that the compiler is a
> > cross compiler. This approach has a some serious problems. If the
> > program can be compiled and linked but it does not run because of some
> > problem with the runtime linker, then autoconf will think that the
> > compiler is a cross compiler.

But the system I was trying to compile on should have worked
if not for a misconfiguration. I was not actually trying to
cross compile but the autoconf generated script thought
that I was. If the program will not run because of a
problem with the runtime linker, we should not just
assume that the program is being cross compiled.

> I think that it's not a bug, this is a definition of cross-compiling.
> If you compiling on a broken system but you expect the resulting
> executable to run on a "good" system, you are cross-compiling.
> If you are compling on FreeBSD for Linux and you have iBCS with Linux
> emulation, you are not cross-compiling.
> 
> Essentially, if you are cross-compiling, you cannot and should not run
> executables produced by the build process on the machine doing the
> build.

Then AC_C_BIGENDIAN is also broken. It should not error out
like this for the cross compile case.

checking whether byte ordering is bigendian... configure: error: cannot
run test program while cross compiling

> Autoconf is consistent in this definition. Tests that require compiled
> programs to be executed are not run as long as a trivial program fails to 
> run.
> 
> Regards,
> Pavel Roskin

Mo DeJong
Red Hat Inc.

Reply via email to