[PATCH] D130255: [Clang][LoongArch] Add initial LoongArch target and driver support

WÁNG Xuěruì via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 21 09:56:56 PDT 2022


xen0n accepted this revision.
xen0n added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:2236
 
+  static const char *const LoongArch64LibDirs[] = {"/lib64", "/lib"};
+  static const char *const LoongArch64Triples[] = {
----------------
FWIW this is actually beneficial for Gentoo (which consistently uses `lib64` for its 64-bit-capable profiles since forever, at least for all of the 64-bit arches/profiles I have used). Otherwise the libdir is really more-or-less freely chosen. And I think most if not all distros already patch downstream for this libdir tweaking...

The ELF interpreter path is indeed hardcoded, and I'll admit I referred to many `lib64`-using precedents when reviewing the initial proposal. I think many ideas were thrown around and every of them was strictly better than the MIPS carryover `/lib/ld.so.1` I think. That ship has long sailed though, and even a `lib64` just for housing the symlink to the real `ld.so` seems okay to me.

So overall personally I don't feel this is too problematic; sorry if I sounded like a grumpy old guy defending his favorite `/lib64` (and all its old split-usr glory ;-)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130255



More information about the cfe-commits mailing list