[PATCH] D56215: [lld] [ELF] Include default search paths for NetBSD driver

Kamil Rytarowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 2 14:49:40 PST 2019


krytarowski added a comment.

In D56215#1344233 <https://reviews.llvm.org/D56215#1344233>, @ruiu wrote:

> lld's driver is intentionally designed to be agnostic of the host that the linker is running for the reasons described at the beginning of Driver.cpp: https://github.com/llvm-project/lld/blob/master/ELF/Driver.cpp#L13 I think I like that approach. If you need to do this, you can do this in the compiler driver rather than in the linker itself. Is there any reason you need to do this in the linker?


This breaks compat with GNU ld here and the linker is intended to be used standalone.

In D56215#1344183 <https://reviews.llvm.org/D56215#1344183>, @joerg wrote:

> This doesn't seem a reasonable approach at all:
>
> (1) It breaks cross-linking.
>  (2) It is not correct for any target architecture, e.g. /usr/local/lib certainly doesn't belong on this list and /lib doesn't either.
>  (3) The correct list depends not only on the target architecture, but also the active emulation.


Is it acceptable to pass all the paths through configure/build phase of lld? It's done this way in GNU ld in the NetBSD distribution. If we need or want to hardcode all the specific paths it will be harder to maintain the proper list and behavior inside lld.


Repository:
  rLLD LLVM Linker

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

https://reviews.llvm.org/D56215





More information about the llvm-commits mailing list