diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile index 0dd9eb41a40891f0670f91a75a76e3fbc1b85d6b..6574478c8f47d68ff79f762686f1894a9e762f1c 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile @@ -2,8 +2,9 @@ LEVEL := ../../make 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 diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/Makefile index c4c3cfe3c18e2a25a4d9ceff537620236a25bd1a..0b7e66870303ff5ca311025f28c12e43f6e421b7 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/Makefile +++ b/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 diff --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules index 6d1ca51d0f3fdaa0cd1ae65d04d912276d9ff6ee..378f5af3c5fb0f8afe3e109e553e5a63c152cbbf 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 #----------------------------------------------------------------------