From 2093d65a80b2c4bb6baa26062fc9c18d19b24c07 Mon Sep 17 00:00:00 2001 From: Fushan Wen Date: Sun, 2 Oct 2022 10:34:40 +0800 Subject: [Linux] Remove workaround for glibc to actually unload a library The workaround was added to fix a bug in glibc prior to 2.25, which was released on 2017-02-05. Since the supported platforms of Qt6 at least have glibc 2.26 (SUSE Linux Enterprise Server 15 SP2), it's time to remove the workaround. See also: http://sourceware.org/bugzilla/show_bug.cgi?id=11941 Pick-to: 6.4 Change-Id: Ia2aab5b0a512c44d4a4312877a0177b6b5df6428 Reviewed-by: Thiago Macieira Reviewed-by: Volker Hilsheimer --- src/corelib/plugin/qlibrary.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/corelib/plugin/qlibrary.cpp') diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp index 6a3f13bb81..79725e258e 100644 --- a/src/corelib/plugin/qlibrary.cpp +++ b/src/corelib/plugin/qlibrary.cpp @@ -341,12 +341,7 @@ inline void QLibraryStore::cleanup() if (lib->libraryUnloadCount.loadRelaxed() > 0) { Q_ASSERT(lib->pHnd.loadRelaxed()); lib->libraryUnloadCount.storeRelaxed(1); -#ifdef __GLIBC__ - // glibc has a bug in unloading from global destructors - // see https://bugzilla.novell.com/show_bug.cgi?id=622977 - // and http://sourceware.org/bugzilla/show_bug.cgi?id=11941 - lib->unload(QLibraryPrivate::NoUnloadSys); -#elif defined(Q_OS_DARWIN) +#if defined(Q_OS_DARWIN) // We cannot fully unload libraries, as we don't know if there are // lingering references (in system threads e.g.) to Objective-C classes // defined in the library. -- cgit v1.2.3