[llvm-dev] Updating config.guess, license change

Harald van Dijk via llvm-dev llvm-dev at lists.llvm.org
Mon Apr 5 11:07:38 PDT 2021


On 05/04/2021 18:22, Hubert Tong wrote:
> On Mon, Apr 5, 2021 at 4:44 AM Harald van Dijk via llvm-dev 
> <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
>     I do not know why <https://reviews.llvm.org/D74256
>     <https://reviews.llvm.org/D74256>> then also added
>     logic for AIX there. Either config.guess is buggy, or it is not.
> 
>     If config.guess is buggy, it is also buggy for every single
>     autoconf-based project there is and will need to be fixed there as
>     well.
>     There has been no relevant change to upstream config.guess for AIX that
>     I can see, but I may have missed something.
> 
>     If config.guess is not buggy, the change is wrong.
> 
>     Am I missing something here, perhaps some some scenario that LLVM
>     supports but config.guess does not, that would make it correct to
>     change
>     that only in LLVM, and not in upstream config.guess?
> 
> 
> LLVM uses triples to identify the host/target architecture (including 
> the difference between 32-bit and 64-bit variants of the "same 
> architecture"). It cannot be said that config.guess must do the same 
> (that would depend on its users).

It is intended, I believe, that config.guess does the same. That's why 
upstream config.guess can differentiate between x86_64-pc-linux-gnu and 
x86_64-pc-linux-gnux32 -- the reason I wanted to update it -- despite 
the fact that the only way to reliably detect the difference between the 
two is looking at what the currently selected compiler happens to do 
exactly the same way the difference between powerpc-ibm-aix and 
powerpc64-ibm-aix is now detected in CMake in LLVM.

> That the selection, on AIX, between 
> the 32-bit and 64-bit variants happens later for an autoconf-based build 
> is entirely possible. As it is, we're able to do the selection early in 
> the CMake-based build only because we're using a compiler that respects 
> the OBJECT_MODE environment variable (which we also set up for Clang on 
> AIX to do).

Individual projects may add their own custom exceptions, but autoconf 
itself will not override the output of config.guess. If config.guess 
tells autoconf that the host is powerpc-ibm-aix, then configure will 
trust that that is correct. configure scripts that then check the host 
against powerpc-* vs. powerpc64-* will not receive a corrected host 
based on how the compiler behaves, it's config.guess's job to return the 
correct host.

Perhaps there are so few projects that contain powerpc-specific or 
powerpc64-specific logic in configure scripts, or perhaps 
powerpc64-aix-ibm users are already accustomed to specifying the host 
explicitly for configure scripts, that this problem goes largely unnoticed.

Cheers,
Harald van Dijk


More information about the llvm-dev mailing list