[2.7] bpo-32647: Link ctypes extension with libdl. (GH-5550) (#5877)
The ctypes module used to depend on indirect linking for dlopen. The shared
extension is now explicitly linked against libdl on platforms with dl.
Signed-off-by: Christian Heimes <christian@python.org>.
(cherry picked from commit 5bb9692575
)
Co-authored-by: Christian Heimes <christian@python.org>
This commit is contained in:
parent
3d87f4cf9c
commit
4bb9b9aea0
|
@ -0,0 +1,2 @@
|
|||
The ctypes module used to depend on indirect linking for dlopen. The shared
|
||||
extension is now explicitly linked against libdl on platforms with dl.
|
4
setup.py
4
setup.py
|
@ -2149,6 +2149,10 @@ class PyBuildExt(build_ext):
|
|||
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 _detect_nis(self, inc_dirs, lib_dirs):
|
||||
if host_platform in {'win32', 'cygwin', 'qnx6'}:
|
||||
return None
|
||||
|
|
Loading…
Reference in New Issue