[Top][All Lists]

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

Re: Weird behaviour about system types

From: Sébastien Hinderer
Subject: Re: Weird behaviour about system types
Date: Thu, 4 Feb 2021 18:09:12 +0100

Hello Zack, many thanks for your helpful response!

Zack Weinberg (2021/02/04 11:50 -0500):
> Sorry for the blank reply, I misclicked.

No problem.

> > On Thu, Feb 4, 2021 at 11:27 AM Sébastien Hinderer 
> > <> wrote:
> > > checking build system type... x86_64-pc-linux-gnu
> > > checking host system type... aarch64-unknown-linux-gnu
> > > checking target system type... aarch64-unknown-linux-gnu
> > >
> > > I am okay with the first line but to absolutely not understandthe second
> > > and third line. Why do the host and system types contain an "unknown"
> > > string?
> GNU canonical system identifiers are defined as 3- or 4-tuples: either
> CPU-COMPANY-OS or CPU-COMPANY-KERNEL-LIBC.  'pc' and 'unknown' are
> both filler words inserted in the COMPANY field when config.sub has
> nothing more meaningful to put there.

Yes, okay.

> The COMPANY field was more useful many years ago, when lots of
> different Unix vendors were putting out workstations based on the
> MC68020 -- 'm68k-apollo-sysv' and 'm68k-bull-sysv' for instance are
> distinguished only by COMPANY.  Nowadays it's pretty much vestigial,
> but we have to keep it around for compatibility with all the logic
> that expects there to be at least three dash-separated fields in
> $host_alias.

So you agree that the --host=--host=aarch64-linux-gnu I used, although
perhaps incorrect in its meaning, is syntactically correct, right?

The thing is, the C cross-compiler for this OS type has this prefix,
it's installed as aarch64-linux-gnu-gcc, so that's why I thought this
was a correct system type.

If I use the value returned by the canonicalizaiton, then I won't be
able to find the tools byadding a - to the system type...

> `aarch64-linux-gnu` is a *non-canonical* shorthand system identifier.

Yeah, but still its the prefix of the tools I have, that was what
confused me.

> $host_alias is always set to the *canonical* system identifier, which
> is computed from what you give as the argument to --host by passing it
> through `config.sub`.

I think you make a little mistake here. According to the docuemntation,
it's host, rather than host_alias, which contains the canonicalized host
system type. host_alias remains what you ahve given, empty if no
argument to --host was given. As I understand it, host is used by
ocnfigure, host_alias is for interacting with users.

> You did not give a --target option, so $target_alias defaults to
> $host_alias,

No, target_alias is empty. It's the target environemnt varialbe wich
defaults to host.

> and both are in canonical form.

No it's hsot and target which are in canonical form.

> In summary, everything is working as intended.  You do not need to
> change how you are running configure.  (You do, however, need to make
> sure that any `case $host_alias in ... esac` blocks in your configure
> script expect $host_alias to be in canonical form, e.g. `case
> $host_alias in (aarch64-linux-gnu) ... ;; esac` will never execute the
> ... code, it needs to be (aarch64-*-linux-gnu) instead.)

The case should be on host, rather than on host_alias, I think.

I'll fix my host type to make it correct and see whether the tools are
still found.



reply via email to

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