[Lldb-commits] [PATCH] D58517: [lldb] [test] Do not link -ldl on NetBSD

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 21 11:02:57 PST 2019


mgorny updated this revision to Diff 187826.
mgorny edited the summary of this revision.
mgorny added a comment.

Switched to appending `-ldl` via Makefile.rules, using USE_LIBDL option.


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

https://reviews.llvm.org/D58517

Files:
  lldb/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile
  lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/Makefile
  lldb/packages/Python/lldbsuite/test/make/Makefile.rules


Index: lldb/packages/Python/lldbsuite/test/make/Makefile.rules
===================================================================
--- lldb/packages/Python/lldbsuite/test/make/Makefile.rules
+++ lldb/packages/Python/lldbsuite/test/make/Makefile.rules
@@ -414,6 +414,15 @@
 	endif
 endif
 
+#----------------------------------------------------------------------
+# Additional system libraries
+#----------------------------------------------------------------------
+ifeq (1,$(USE_LIBDL))
+	ifneq ($(OS),NetBSD)
+		LDFLAGS += -ldl
+	endif
+endif
+
 #----------------------------------------------------------------------
 # dylib settings
 #----------------------------------------------------------------------
Index: lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/Makefile
@@ -1,7 +1,7 @@
 LEVEL := ../../make
 
 CXX_SOURCES := main.cpp
-LD_EXTRAS := -ldl
+USE_LIBDL := 1
 
 include $(LEVEL)/Makefile.rules
 
Index: lldb/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile
@@ -2,8 +2,9 @@
 
 LIB_PREFIX := loadunload_
 
-LD_EXTRAS := -L. -l$(LIB_PREFIX)d -ldl
+LD_EXTRAS := -L. -l$(LIB_PREFIX)d
 CXX_SOURCES := main.cpp
+USE_LIBDL := 1
 
 include $(LEVEL)/Makefile.rules
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58517.187826.patch
Type: text/x-patch
Size: 1667 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190221/febe7485/attachment.bin>


More information about the lldb-commits mailing list