[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 09:52:42 PST 2019
mgorny created this revision.
mgorny added reviewers: krytarowski, labath, jasonmolenda, jingham.
mgorny added a project: LLDB.
Herald added a subscriber: abidh.
Fix the load_* using test Makefiles not to link -ldl on NetBSD.
There is no such a library on NetBSD, and dlopen() is available
without a library. Quoting the manpage:
(These functions are not in a library. They are included in every
dynamically linked program automatically.)
Repository:
rLLDB LLDB
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
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,10 +1,14 @@
LEVEL := ../../make
CXX_SOURCES := main.cpp
-LD_EXTRAS := -ldl
+LD_EXTRAS :=
include $(LEVEL)/Makefile.rules
+ifneq ($(OS),NetBSD)
+LD_EXTRAS += -ldl
+endif
+
all: hidden_lib a.out
hidden_lib:
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,11 +2,15 @@
LIB_PREFIX := loadunload_
-LD_EXTRAS := -L. -l$(LIB_PREFIX)d -ldl
+LD_EXTRAS := -L. -l$(LIB_PREFIX)d
CXX_SOURCES := main.cpp
include $(LEVEL)/Makefile.rules
+ifneq ($(OS),NetBSD)
+LD_EXTRAS += -ldl
+endif
+
a.out: lib_a lib_b lib_c lib_d hidden_lib_d install_name_tool
lib_%:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58517.187812.patch
Type: text/x-patch
Size: 1152 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190221/516a308a/attachment.bin>
More information about the lldb-commits
mailing list