[PATCH] D57303: [ToolChains] [NetBSD] Append -rpath for shared compiler-rt runtimes

David L. Jones via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 28 17:35:41 PST 2019


dlj accepted this revision.
dlj added a comment.

In D57303#1373163 <https://reviews.llvm.org/D57303#1373163>, @mgorny wrote:

> Given that this path changes with every clang release, so you're effectively making a hard dependency on the clang version used to build the program, I dare say some systems may either decide not to support shared runtimes at all or use `ld.so.conf` or equivalent that can be dynamically changed.


Yeah, I don't think we should be stamping an `-rpath` unconditionally across targets. On top of static builds and `ld.so.conf`, this could end up nominating the wrong one of `DT_RPATH` and `DT_RUNPATH`, which is, unfortunately, //still// a target-specific distinction. By my quick reading of Driver/ToolChains/Linux.cpp, I think the combination of where we pass `--enable-new-dtags` and where we would pass `-rpath` would get this wrong on some systems (which would, infuriatingly, only //maybe// cause problems; and if so, only at runtime).


Repository:
  rC Clang

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

https://reviews.llvm.org/D57303





More information about the cfe-commits mailing list