[PATCH] D111367: [Driver] Change -dumpmachine to respect --target/LLVM_DEFAULT_TARGET_TRIPLE verbatim

Harald van Dijk via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 8 10:22:42 PDT 2021


hvdijk added a comment.

In D111367#3050062 <https://reviews.llvm.org/D111367#3050062>, @MaskRay wrote:

> If GCC installation has library files under `lib/x86_64-redhat-linux`, I think inferred `LLVM_DEFAULT_TARGET_TRIPLE` should be `x86_64-redhat-linux`, instead of `x86_64-redhat-linux-gnu`.

That's going to cause breakage unless @tstellar's patch to make `isGNUEnvironment()` return `true` for `x86_64-redhat-linux` also goes in.

> With correct `LLVM_DEFAULT_TARGET_TRIPLE`, `clang a.c` should just work; with incorrect `LLVM_DEFAULT_TARGET_TRIPLE`, it's fair for `clang a.c` NOT to find GCC crtbegin.o/libgcc_s.so.1/etc.

The thing is that with Red Hat, the way I see it, it's GCC that has an incorrect triple. LLVM currently requires and gets (through config.guess) a correct triple, but accommodates for GCC's installation by still allowing its runtime files to be found. Is it really a good idea to start making LLVM get the wrong triple, and adding more customisation to treat that as if it were correct?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111367



More information about the cfe-commits mailing list