From f669ea0d54302de31456d57286aa0e4ca1443e98 Mon Sep 17 00:00:00 2001 From: Lada Trimasova Date: Wed, 3 Feb 2016 22:33:02 +0300 Subject: Link with -ldl option only when it is supported -ldl option was used unconditionally while libdl is not supported when libc is static. Add build test to configure which checks if libdl is supported. QMAKE_LIBS_DYNLOAD in "src/corelib/plugin/plugin.pri" is now used only if libdl is available. qt_linux_find_symbol_sys from qlibrary_unix is now used only if QT_NO_DYNAMIC_LIBRARY is not defined. Initially reported by Buildroot autobuilder here: http://autobuild.buildroot.net/results/a85/a85a1839a45fb6102e53131ecc8f6dadf92bcdc2 Change-Id: I0397472456efdc4f3ab5f24d01253bee8048a9d1 Reviewed-by: Oswald Buddenhagen --- src/corelib/plugin/qlibrary_unix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/plugin/qlibrary_unix.cpp') diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp index cd158a9e49..13bc129605 100644 --- a/src/corelib/plugin/qlibrary_unix.cpp +++ b/src/corelib/plugin/qlibrary_unix.cpp @@ -286,7 +286,7 @@ bool QLibraryPrivate::unload_sys() return true; } -#ifdef Q_OS_LINUX +#if defined(Q_OS_LINUX) && !defined(QT_NO_DYNAMIC_LIBRARY) Q_CORE_EXPORT QFunctionPointer qt_linux_find_symbol_sys(const char *symbol) { return QFunctionPointer(dlsym(RTLD_DEFAULT, symbol)); -- cgit v1.2.3