[PATCH] D128625: [RISCV][Driver] Fix baremetal `GCCInstallation` paths

Anton Afanasyev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 30 02:02:33 PDT 2022


anton-afanasyev added a comment.

In D128625#3621030 <https://reviews.llvm.org/D128625#3621030>, @MaskRay wrote:

> The description seems unclear to me. Is a `riscv64-unknown-linux-gnu` GCC installation selected while the requested target triple is `riscv64-unknown-elf`?

Yes, exactly (see precommitted tests 4ee6b7806bc0 <https://reviews.llvm.org/rG4ee6b7806bc04e3d037c0679260a54828ce7ad4c>: adding one more target directory confuses driver, mixing triples in paths). Adjusting description to be more clear.

> This could be an instance of https://discourse.llvm.org/t/rfc-fix-loose-behaviors-of-clang-target/60272 (`[RFC] Fix loose behaviors of Clang –target=`) and the right fix may be somewhere upper level.

This looks related but not the same one: this patch fixes the incorrect use of completely different targets. I believe this issue could be addressed on top of your RFC implemented, need to refactor triple, setting equivalence of triples explicitly. Anyway, I'd like to have this patch committed meanwhile: it is more related to how `RISCVToolchain` uses baremetal `GCCInstallation` for the current state.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128625



More information about the cfe-commits mailing list