[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cl.exe and system types

From: Sébastien Hinderer
Subject: Re: cl.exe and system types
Date: Thu, 23 Aug 2018 13:14:41 +0200

Dear Nick,

Nick Bowler (2018/08/21 10:32 -0400):
> Hi Sébastien,
> On 2018-08-21, Sébastien Hinderer <address@hidden> wrote:
> > What I do not understand, though, is why it is necessary to specify
> > --build. I know the manual says that when one specifies --host then one
> > has to specify --build, too, for historical reasons, but the manual also
> > says that this will be fixed in the next version. Moreover, I did try to
> > run configure with --host and no --build and that seemed to work,
> > independently of whether it was a cross-compilation scenario or not. So
> > I came to wonder how up-to-date the manual actually is.
> When you specify just --host (and not --build), configure autodetects
> cross compiliation by attempting to run a compiled program.  If the
> program runs, configure assumes you are not cross compiling.  If the
> program does not run for any reason, configure assumes you are cross
> compiling.
> The problem is this heuristic tends to be wrong as often as it is right,
> so the recommendation now is to always specify --build and --host, which
> disables this autodetection (configure enters cross compilation mode if
> and only if the build and host triplets are different).

I had no idea! Thanks! It's much clearer now. I thought that when --build
is not specified then it is determined by the AC_CANONICAL_BUILD

One question I still have is about the possible values for the arguments
to --build & co. Is there a specification or an exhaustive list
somewhere? I know the general syntax but I'd like to figure out what
would be the best values for our Windows builds, given that the build
environment will probably be cygwin-related (for that I can use the result
of AC_CANONICAL_BUILD) but the host may be something different given
that we produce three kinds of binaries: cygwin ones, those compiled
with MingW and those compiled for msvc. I'd need to make sure which host
to use for these three categories (for Cygwin binaries it will be
identical to --build, that's not a big deal), and this in both 32 and 64
bits mode.

Can anybody help with this particular point, please?

> The comment that "This will be fixed in the future" appears to have been
> added in 2002.  Clearly we've not made it to the future yet. :)

Well if there is no obviously better solution, it may indeed be worth
just removing this comment, as has been suggested.

Also, I really found your explanation enlightening and I think it
would have helped me to have it in the
manual so perhaps it could
be added.

Bet wishes and thanks a lot again,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]