Hi Sébastien, On 2021-02-04, Sébastien Hinderer <Sebastien.Hinderer@xxxxxxxx> wrote: > Actually I find it odd that Debian installs cross-compilers under names > that do not have the canonical system type as prefix. > > I can evenseee this line in my configure script: > > test -n "$host_alias" && ac_tool_prefix=$host_alias- > > So the computation of ac_tool_prefix does actually rely on host_alias, > rather than host, which I find surprising. The purpose of canonicalization is not to find the toolchain. The user specifies the actual name of the toolchain via the command-line options. Since your toolchain is installed with a non-canonical prefix if the canonicalized name was used configure would not find the toolchain! The reason to use the canonicalized names is for the scenario when you want to write conditional code based on $host_os, $host_cpu, etc. If you are not writing code based on these split-out variables, it is probably not needed to use AC_CANONICAL_xxx macros. Incidentally, I think the current description of the AC_xxx_TARGET_TOOL(S) macros in the Autoconf manual is wrong. All of these macros appear to be searching based on the $target_alias (as is sensible) rather than the canonical target name as stated in the documentation. However they all seem to mishandle the case where target_alias is empty (because the user did not specify --target), oops. These macros pull in AC_CANONICAL_TARGET as a dependency but I don't see why they bother as they not appear to make use of the target_cpu, target_vendor or target_os variables at all. (AC_CHECK_TOOL and friends do not have these problems). Cheers, Nick