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

Kamil Rytarowski via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 11 11:00:02 PST 2019


krytarowski added a comment.

@mgorny could you check if we can get crossbuilding functional for:

- to !NetBSD from NetBSD
- from !NetBSD to NetBSD.
- from NetBSD/amd64 to NetBSD/aarch64

I wonder whether it can work if we will keep using 'ld' file name for a linker.



================
Comment at: ELF/Driver.cpp:369
 
+void LinkerDriver::appendDefaultSearchPaths() {
+  if (Config->TargetTriple.isOSNetBSD()) {
----------------
>From a stylistic point of view, I would introduce a dedicated file for the NetBSD driver (`DriverNetBSD.cpp`?) that overloads generic ` LinkerDriver::appendDefaultSearchPaths()`.

I have no opinion what C++ semantics to use for it.

The generic driver could be empty or use use `Config->SearchPaths.push_back("=/usr/lib");`. Probably empty is better as it would be more generic.


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

https://reviews.llvm.org/D56215





More information about the cfe-commits mailing list