> -----Original Message-----
> From: Peter Eisentraut [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 26, 2000 5:52 PM
> To: Tom Tromey
> Cc: Earnie Boyd; [EMAIL PROTECTED]; Pavel Roskin; Mo
> DeJong; Akim
> Demaille; Autoconf List
> Subject: Re: Is this a bug in autoconf? (patch included)
>
>
> On Wed, 26 Apr 2000, Tom Tromey wrote:
>
> > Peter> 1) For example, if build is some FreeBSD and host is some
> > Peter> Linux, then you're not *really* cross-compiling. At least it
> > Peter> would be an incompatible change to the definition.
> >
> > That's news to me. Suppose you're building libjava. For Linux we
> > might have a different implementation of the thread porting
> layer than
> > we do for FreeBSD. That sounds like cross-compilation to me.
>
> Okay, let me rephrase that. The claim was that build != host always
> implies cross-compilation and that perhaps Autoconf should
> recognize that
> and handle AC_TRY_RUN differently. But there exists a
> non-zero number of
> packages were this would be overly restrictive because
> building on FreeBSD
> for Linux doesn't *necessarily* imply that you can't run
> compiler output
> on the build platform. So this change would unnecessarily
> affect existing
> packages. On the other hand, for the libjava example the
> current way of
> detecting cross-compilation ought to work. (If not then
> you're really in
> trouble. ;)
>
> Of course there are many more trivial examples where potentially
> build != host for the same machine, e.g.,
> i586-{pc|unknown}-linux-gnu or
> i386-{qnx|pc}-qnx[4[2[5]]]. config.sub just isn't that smart and you
> shouldn't expect your users to keep track of all its oddities
> or worse,
> punish them with unwarranted "cannot run test program while
> cross-compiling" errors.
>
> All I'm saying is keep the current behaviour.
>
I think the correct behavious could be:
build ?= `config.guess
` host ?= $build
target ?= $host
If --host is specified, whatever the value, this mean cross-compilation:
if I'm running on a system that config.guess is not able to guess, I should
specify --build;
if I'm not willing to compile for the native system, I should specify
--host;
if I'm building a cross-development tool I must specify --target (but this
is ignored otherwise).
Thus
1) ./configure
2) ./configure --build=my-homegrown-OS
3) ./configure --host=my-homegrown-OS
4) ./configure --target=i386-unknown-mingw32
5) ./configure --host=my-homegrown-OS --target=i386-unknown-mingw32
6) ./configure --build=my-homegrown-OS --target=i386-unknown-mingw32
will do what may be expected:
1) natively build something
2) natively build something on my own system, that config.guess is not aware
of
3) build (e.g. on Linux) something I will use on my new revolutionary OS
4) build (e.g. on FreeBSD) a cross-compiler for WinNT
5) build (on Solaris :-|) a WinNT compiler that will be used on my own OS
6) natively build on my own OS the same WinNT compiler
and of course
./configure --build=my-homegrown-OS --host=i586-pc-linux-gnu
--target=i386-unknown-mingw32
will be a canadian cross build, on my OS (so much faster :-)), for WinNT but
running on any Linux box...
I think if anybody specify --build --host and --target he/she has to be
aware of what it does, and configure should trust it.
Regards,
Bernard
--------------------------------------------
Bernard Dautrevaux
Microprocess Ingéniérie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel: +33 (0) 1 47 68 80 80
Fax: +33 (0) 1 47 88 97 85
e-mail: [EMAIL PROTECTED]
[EMAIL PROTECTED]
--------------------------------------------