From 6b9e1d1d7ab03dcd54b53bce53c59ffc368ee9c9 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Mon, 26 Feb 2018 17:28:35 +0100 Subject: [PATCH] Replace patch 291 with the upstream fix. --- ...up-Link-ctypes-against-dl-explicitly.patch | 32 +++++++------------ python3.spec | 1 + 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/00291-setup-Link-ctypes-against-dl-explicitly.patch b/00291-setup-Link-ctypes-against-dl-explicitly.patch index 4bf4801..6539003 100644 --- a/00291-setup-Link-ctypes-against-dl-explicitly.patch +++ b/00291-setup-Link-ctypes-against-dl-explicitly.patch @@ -1,25 +1,15 @@ -From aae2ef0bace0e38f4ee5aaa4642aa32450a84216 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= -Date: Tue, 23 Jan 2018 14:43:43 +0100 -Subject: [PATCH] setup: Link ctypes against dl explicitly - ---- - setup.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - diff --git a/setup.py b/setup.py -index c23628a2a9..9e40bb53e6 100644 +index f4f6e4fdb1f0..8536c350fe3a 100644 --- a/setup.py +++ b/setup.py -@@ -1935,7 +1935,7 @@ class PyBuildExt(build_ext): - self.use_system_libffi = False - include_dirs = [] +@@ -2005,6 +2005,10 @@ def detect_ctypes(self, inc_dirs, lib_dirs): + ext.libraries.append(ffi_lib) + self.use_system_libffi = True + ++ if sysconfig.get_config_var('HAVE_LIBDL'): ++ # for dlopen, see bpo-32647 ++ ext.libraries.append('dl') ++ + def _decimal_ext(self): extra_compile_args = [] -- extra_link_args = [] -+ extra_link_args = ['-ldl'] - sources = ['_ctypes/_ctypes.c', - '_ctypes/callbacks.c', - '_ctypes/callproc.c', --- -2.16.1 - + undef_macros = [] diff --git a/python3.spec b/python3.spec index 9b033c9..3a6cf71 100644 --- a/python3.spec +++ b/python3.spec @@ -370,6 +370,7 @@ Patch290: 00290-cryptmodule-Include-crypt.h-for-declaration-of-crypt.patch # Build fails with undefined references to dlopen / dlsym otherwise. # See: https://bugzilla.redhat.com/show_bug.cgi?id=1537489 # and: https://src.fedoraproject.org/rpms/redhat-rpm-config/c/078af19 +# Fixed upstream: https://bugs.python.org/issue32647 Patch291: 00291-setup-Link-ctypes-against-dl-explicitly.patch # 00292 #