> -----Original Message-----
> From: Mo DeJong [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 25, 2000 1:57 PM
> To: Akim Demaille
> Cc: Peter Eisentraut; Pavel Roskin; [EMAIL PROTECTED]; Autoconf
> List
> Subject: Re: Is this a bug in autoconf? (patch included)
>
>
> > Peter> If you want to make a change I'd claim that it would be much
> > Peter> more logical to get rid of AC_CANONICAL_SYSTEM
> instead and let
> > Peter> people explicitly call CANONICAL_{HOST|BUILD} if they want
> > Peter> information about the host or build system, whyever
> they would
> > Peter> need that. It's just as bogus to list --build as an option if
> > Peter> you don't actually evaluate it (or don't even care, as is
> > Peter> probably the case most of the time).
> >
> > OK. Actually one of the reason why I was against keeping
> AC_CAN_HOST
> > and AC_CAN_SYS was that it is asymmetrical. But if we keep
> > AC_CAN_(HOST, BUILD, TARGET), I'm fine.
>
> Ok, it sounds like the main reason folks want to keep 3 macros
> is so that --build is not listed in the --help output unless
> the package maintainer wants it used.
I'm a bit confused about "the package maintainer wants --build to be used";
it looks like you think I can write a package that has never to be built on
some system! I think --build and --host is meaningful to any package:
otherwise it's a package that was not meant to be built (no very common
although this may be true for some script-only package) or not meant to be
used on any host (not useful at all IMNSHO) :-)
What I think you mean was that the package maintainer usually do not need to
parameterize its package depending on the build system, not even sometimes
on the host system. But this is purely a maintainer issue, that may change
over time. The installer of a package, which is the most likely to be
confused by --build/--host options always is configuring the package on some
build system to be used on some host, so these options ARE meaningful to
him, independently of the internals of the package building process.
So IMHO --build and --host are always needed and should always be accepted,
and checked by the configure script, selecting the proper cross compiler
($host-gcc for example) if --build and --host difer. I agree that comparing
triples may be difficult, but if someone wants to generate a native gcc
compiler and use
"./configure --build=i386-pc-linux --host=i486-compaq-linux-2.1
--target=x86-solaris"
(assuming x86-solaris is a valid alias :-)) he is calling for trouble and I
think we should assume this is a canadian cross ;-|
The problem for --target is more package-oriented and could be conditional;
OTOH it's quite current and I'm used to call all my configure scripts in a
given environmnet through a local "configure" script that essentially
contains:
"$path_to_shared_sources/package_dir/configure
--build=my-local-system-triple --host=the-host-of-this-environment-tree
--target=the-target-architecture-if-any"
The reason is that I build complex development environments for various host
systems and target processor architectures (some native, some cross, some
canadian cross) from the same sources and that I arrange for the sub-package
needed to be build automatically when building some package, passing down
all options, so passing the --target options all the way.
For now I have to manually change some of these scripts to avoid the
--target for some packages that refuse it; not convenient! and passing
--target should be harmful if unneeded.
>
> I am still confused about what situation would actually
> call for AC_CANONICAL_BUILD without also calling
> AC_CANONICAL_HOST? Also, wouldn't I always need to call
> AC_CANONICAL_BUILD when I was using AC_CANONICAL_HOST?
> I was under the impression that the whole point of
> the --host flag was to tell autoconf that
> $host != $build and is therefore a cross compile.
Tht's also my feeling :-)
>
> Why don't we just merge the AC_CANONICAL_BUILD macro
> into the AC_CANONICAL_HOST macro and not print out
> the --build option. The --host option would still
> be used to give the cross triple and the --target
> option would not showup in the output unless
> AC_CANONICAL_TARGET was used in configure.in.
Printing the --build option in the help is IMHO useful, just because the
comparison $host = $target is error prone, so I will probably specify either
both --host and --build (even if equal) or none, as defaulting --build and
setting --host to the current build host may yield a cross compiler will be
needed :-)
>
> Mo Dejong
> Red Hat Inc.
>
Just my 2 (euro) cents
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]
--------------------------------------------