Paul said:
| This is what I would consider the best solution:
|
| a) By default, all instances where a simple program can't be run after
| linking successfully are treated as immediate, fatal errors, and a
| message indicating "your compiler is broken" is printed.
Agreed.
| b) There is a command-line option which will force the configure script
| to allow cross-compilation. Maybe that option is --host (I wonder
| if it should be something more explicit, like --enable-cross-compile
| or something). This allows the user to override the behavior in
| (a), for those adventurous or foolish enough to try it.
50% agreed: --host is that option, and we don't need any other. Yet
the --help message I proposed is:
--host=HOST cross-compile to build programs running on HOST [BUILD]
| c) There is a flag package writers can give in configure.in which will
| disable the check in (a), for those who are writing packages which
| _do_ routinely expect to be cross-compiled (like GCC, etc.)
I don't see the point of a (c) here. --host is enough. What should
do such flag? To consider that a compiler whose products are not
executables is a cross-compiler? I think we don't need that, --host
is more formal, more precise, gives more control etc. To me it seems
to be the perfect answer to all our problems.
And by the way, I disagree with your statement about GCC. Maybe you
are referring to --target, in which case, agreed, GCC is a typical
example, but this is *not* cross-compiling. Cross-compiling is now
defined as `--host', and there are plenty of packages which are
cross-compilable, including Autoconf.
| Appropriate additions to the default INSTALL file, etc. should be made,
| of course. Maybe even a section describing common ways a compiler can
| be misinstalled on various systems could be provided.
Good idea. A mini FAQ. Send patches :)
Akim