[PATCH] D52050: WIP: [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
Tue Mar 30 02:31:31 PDT 2021


glaubitz added a comment.

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

> I may be missing something, but I do not understand the problem. What systems, other than Debian multi-arch, are you looking to also add support for? My own native x32 system uses `(/usr)/libx32` for x32 libraries. Debian uses `(/usr)/lib/x86_64-linux-gnux32`. I can understand if some people might use `(/usr)/lib` without any `x32` suffix, though I am not aware of anyone doing this. Where does `lib32` come from, though? What other systems are you trying to account for?

I have tried all kinds of variants of this patch on Debian x32 with MultiArch and can't get it to work because it uses the wrong search-paths for the libraries.
I am still convinced the problem is that LLVM does not understand `x32` as a real distinct architecture unlike `i386` which is why we cannot apply the same
logic for `x32` and `i386`.

When the compiler tests `TargetEnvironment == llvm::Triple::GNUX32`, it does not know whether it's in a native `x32` environment or just on an `x86_64`
system where the target triplet is set to `x86_64-linux-gnux32` and I think that's the problem.

> I may have some spare time soon, I can take a look and do some testing as well.

If you have a working fix for Debian x32, I would be happy to see it.


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