From 65ebfaf0bee85a563b3f88da9ba1108cc3b032fd Mon Sep 17 00:00:00 2001 From: Michal Gorny Date: Thu, 21 Feb 2019 20:28:21 +0000 Subject: [lldb] [test] Do not link -ldl on NetBSD 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.) To resolve this portably, introduce a new USE_LIBDL option. If it set to 1, Makefile.rules automatically appends -ldl on platforms needing it. Differential Revision: https://reviews.llvm.org/D58517 llvm-svn: 354617 --- lldb/packages/Python/lldbsuite/test/make/Makefile.rules | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lldb/packages/Python/lldbsuite/test/make/Makefile.rules') diff --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules index 6d1ca51d0f3..378f5af3c5f 100644 --- a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules +++ b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules @@ -414,6 +414,15 @@ ifeq (1,$(USE_LIBCPP)) endif endif +#---------------------------------------------------------------------- +# Additional system libraries +#---------------------------------------------------------------------- +ifeq (1,$(USE_LIBDL)) + ifneq ($(OS),NetBSD) + LDFLAGS += -ldl + endif +endif + #---------------------------------------------------------------------- # dylib settings #---------------------------------------------------------------------- -- cgit v1.2.3