> -----Original Message-----
> From: Alexandre Oliva [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 04, 2000 1:46 PM
> To: Mo DeJong
> Cc: [EMAIL PROTECTED]
> Subject: Re: Patch for new --build and --host semantics
>
> <skipped>
>
> The point was to not assume cross-compilation just because --host was
> specified. Now this is accomplished as follows:
>
> i) if --host is specified but --build isn't, we use the old
> compile-link-and-execute test to determine whether we're cross
> compiling or not
Here I think Mo has bring an interesting, and useful IMNSHO, idea: if --host
is given AND we can find a compiler named $host_alias-{cc|gcc|c++|g++}, THEN
we assume cross-compiling, even if $(CC) generates a program that can be
run; if this compiler is not able to produce a program we should reject it
(in the proper macro probably).
I thing this is very useful, as it does usually not bring backward
compatibility (I usually do not have an alias i686-unknown-linux-gnu-gcc to
gcc on mya Linux box) and allo me not to need setting CC to $host_alias-gcc
AND CC_FOR_BUILD to gcc when I want cross-compiling (which was a desired
feature).
If we want to be fully backward compatible, we can test if $host_alias-gcc
produce an executable program, but I'm not sure this is desirable.
>
> ii) if both --host and --build are specified, and they're equal, we
> assume no cross-compilation is taking place, and we'll reject a
> compiler if we can't run an executable it produces
>
> iii) if neither --host nor --build are specified, we assume we're not
> cross compiling, and we'll reject a compiler if we can't run an
> executable it produces
>
> iv) if both --host and --build are specified, and they're different,
> we assume we're cross compiling.
Here we should use as a default for the compiler $host_alias-gcc and not gcc
probably.
>
> > Also note that this warning is only printed in the case where only
> > --host is passed.
>
> The warning, as it is now, is not perfect, but what you suggest just
> doesn't match the current implementation.
>
> > My patch follows those semantics, except in the case where a cross
> > compiler is not detected, and then it reverts to the old semantics.
>
> That's what the current code does. It just doesn't set build=host in
> this case; build will always be guessed, unless specified in the
> command line.
I think the difference between Mo's idea and your's is that "detecting" a
cross compiler for Mo is finding $host_alias-gcc while for you it is finding
a compiler that generates non-executable files...
>
> > The old semantics would set $build to i386-pc-linux with
> the following:
>
> > ./configure --host=i386-pc-linux
>
> I understand. But a guessed build probably would be pretty close to
> the specified --host, unless you're actually cross-compiling, in which
> case having --build guessed is an actual improvement. I don't see
> much point in retaining backward compatibility in this case, do you?
This would perhaps be nice yes; but IIUC you propose setting build_alias to
$host_alias, while guessing build. The problem here is that $build and
$build_alias may then be totally unrelated, something I'm not sure will not
start a new flame war :-)
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]
--------------------------------------------