[PATCH] D52050: [Driver] Fix architecture triplets and search paths for Linux x32

John Paul Adrian Glaubitz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 31 15:15:21 PDT 2021


glaubitz added a comment.

In D52050#2662440 <https://reviews.llvm.org/D52050#2662440>, @hvdijk wrote:

> In D52050#2662372 <https://reviews.llvm.org/D52050#2662372>, @MaskRay wrote:
>
>> Mostly looks good.
>>
>>> `clang/test/Driver/Inputs/basic_cross_linux_tree/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/x32/crtbegin.o`
>>
>> Worth bumping the version. 4.6 is quite old and as a host compiler llvm-project has stopped supporting it. The distributions having 4.6 are all end-of-life.
>> Using a new version (matching your reality) can give impression that the user who contributed the original code may still need it for a while (say 5 years).
>
> Sure, there should be no harm in renaming 4.6.0 to the current version, 10.2.0, will do that and re-test.

Since I am a big fan of consistency, I would rather leave it as is (4.6) and then bump to 10.2.0 in a follow-up commit.

>> I still don't quite understand this. Shouldn't a native x32 port use `x86_64-unknown-linux-gnux32`? Why does it use the multilib style `/x32` suffix?
>
> Apologies for the confusion, that is my fault. @glaubitz opened this change to make things work for Debian, which uses `lib/x86_64-linux-gnux32`, but I am testing both Debian and non-Debian. Non-Debian uses `libx32`, similarly to how x86_64-linux-gnu uses `lib64` regardless of whether any 32-bit libraries are installed. (Edit: I may have misunderstood your comment. There's also the `/x32` subdirectory inside GCC installs, but these are not used for native x32 systems. This is only used for i*86-linux-gnu and x86_64-linux-gnu compilers with multilib support for x32, both on Debian and on non-Debian systems, and is covered by existing tests.)

Debian actually has a /libx32 folder, but it contains the dynamic loader only which makes sense because the path to the dynamic loader is baked into the executable if I remember correctly.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D52050/new/

https://reviews.llvm.org/D52050



More information about the cfe-commits mailing list