On Jul 4, 2000, Mo DeJong <[EMAIL PROTECTED]> wrote:
> On 4 Jul 2000, Alexandre Oliva wrote:
>> On Jul 4, 2000, Mo DeJong <[EMAIL PROTECTED]> wrote:
>>
>> > configure: WARNING: For backwards compatibility, --build will be set to --host
>> > if a cross compiler can not be found
>>
>> This is not true. Akim committed the patch without updating the
>> documentation. Now, --build is guessed unless explicitly specified.
> I do not think that is what we agreed to. If you don't
> set $build to the value passed as --host in the case
> where --host is the only argument and a cross compiler is not
> found, then there is no backwards compatibility.
Can you point to any configure.in code for which this makes any
difference? Remember, we're just not setting build_alias=$host_alias
any more. We won't be assuming cross-compilation just because they
happen to be different, in this case.
> That was kind of the point of reverting back to the old system to
> begin with.
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
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.
> 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.
> 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?
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me