[PATCH] D41021: Don't link NetBSD programs with -ldl in linkXRayRuntimeDeps

Kamil Rytarowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 8 09:46:21 PST 2017


krytarowski created this revision.
krytarowski added a project: Sanitizers.
Herald added a subscriber: dberris.

There is no such library on NetBSD, the corresponding functions like dlopen(3) are in libc.

Sponsored by <The NetBSD Foundation>


Repository:
  rL LLVM

https://reviews.llvm.org/D41021

Files:
  lib/Driver/ToolChains/Gnu.cpp


Index: lib/Driver/ToolChains/Gnu.cpp
===================================================================
--- lib/Driver/ToolChains/Gnu.cpp
+++ lib/Driver/ToolChains/Gnu.cpp
@@ -228,7 +228,8 @@
   CmdArgs.push_back("-lrt");
   CmdArgs.push_back("-lm");
 
-  if (TC.getTriple().getOS() != llvm::Triple::FreeBSD)
+  if (TC.getTriple().getOS() != llvm::Triple::FreeBSD &&
+      TC.getTriple().getOS() != llvm::Triple::NetBSD)
     CmdArgs.push_back("-ldl");
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41021.126171.patch
Type: text/x-patch
Size: 460 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171208/ad202e55/attachment.bin>


More information about the llvm-commits mailing list