From 1d2c31f13f25c84f3a72ca04aeffed805d4863b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Mon, 5 Jul 2021 21:54:08 +0200 Subject: [PATCH] Drop libdl patch for glibc >= 2.34, as it is upstreamed --- cmake-3.20.4-glibc_libdl.patch | 62 ---------------------------------- cmake.spec | 5 +-- 2 files changed, 1 insertion(+), 66 deletions(-) delete mode 100644 cmake-3.20.4-glibc_libdl.patch diff --git a/cmake-3.20.4-glibc_libdl.patch b/cmake-3.20.4-glibc_libdl.patch deleted file mode 100644 index 398a332..0000000 --- a/cmake-3.20.4-glibc_libdl.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 635ab930f6185d1ec3e4d99109e2edf0533b0d00 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= -Date: Wed, 23 Jun 2021 21:03:15 +0200 -Subject: [PATCH] testDynamicLoader: Use LIBDL_SO macro if defined. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Starting with glibc v2.34 there is no external version of libdl.so -anymore. It has been merged into the glibc libc.so. - -Assuming libdl.so will be present will break the test, thus the -LIBDL_SO macro should be used. If the macro is not defined on -the system, we ensure it will be defined using the previously -hardcoded value. - -Signed-off-by: Björn Esser ---- - cmake-3.20.4/Source/kwsys/testDynamicLoader.cxx | 14 ++++++++++++-- - 1 file changed, 12 insertions(+), 2 deletions(-) - -Index: cmake-3.21.0-rc1/Source/kwsys/testDynamicLoader.cxx -=================================================================== ---- cmake-3.21.0-rc1.orig/Source/kwsys/testDynamicLoader.cxx -+++ cmake-3.21.0-rc1/Source/kwsys/testDynamicLoader.cxx -@@ -8,6 +8,25 @@ - # include /* disable_debugger() API. */ - #endif - -+// Needed for __GLIBC__ test macro. -+#ifdef __linux__ -+# include -+#endif -+ -+// Will define LIBDL_SO macro on systems with glibc. -+#ifdef __GLIBC__ -+# include -+// Define to LIBC_SO, if not defined by above header. -+# ifndef LIBDL_SO -+# define LIBDL_SO LIBC_SO -+# endif -+#endif -+ -+// Define the LIBDL_SO macro, if not defined above. -+#ifndef LIBDL_SO -+# define LIBDL_SO "libdl.so" -+#endif -+ - // Work-around CMake dependency scanning limitation. This must - // duplicate the above list of headers. - #if 0 -@@ -107,8 +126,8 @@ int testDynamicLoader(int argc, char* ar - // This one is actually fun to test, since dlopen is by default - // loaded...wonder why :) - res += TestDynamicLoader("foobar.lib", "dlopen", 0, 1, 0); -- res += TestDynamicLoader("libdl.so", "dlopen", 1, 1, 1); -- res += TestDynamicLoader("libdl.so", "TestDynamicLoader", 1, 0, 1); -+ res += TestDynamicLoader(LIBDL_SO, "dlopen", 1, 1, 1); -+ res += TestDynamicLoader(LIBDL_SO, "TestDynamicLoader", 1, 0, 1); - #endif - // Now try on the generated library - std::string libname = GetLibName(KWSYS_NAMESPACE_STRING "TestDynload"); diff --git a/cmake.spec b/cmake.spec index d7384d5..e06d84c 100644 --- a/cmake.spec +++ b/cmake.spec @@ -106,10 +106,6 @@ Patch101: %{name}-fedora-flag_release.patch # Add dl to CMAKE_DL_LIBS on MINGW # https://gitlab.kitware.com/cmake/cmake/issues/17600 Patch102: %{name}-mingw-dl.patch -# (upstreamable) -# https://bugzilla.redhat.com/show_bug.cgi?id=1972535 -# fix FTBFS -Patch103: %{name}-3.20.4-glibc_libdl.patch # Patch for renaming on EPEL %if 0%{?name_suffix:1} @@ -522,6 +518,7 @@ popd %changelog * Mon Jul 05 2021 Björn Esser - 3.21.0-3.rc2 - cmake-3.21.0-rc2 +- Drop libdl patch for glibc >= 2.34, as it is upstreamed * Tue Jun 29 2021 Björn Esser - 3.21.0-2.rc1 - Rebuilt with upstreamed cmake-3.20.4-glibc_libdl.patch