summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-02-25 04:07:24 -0800
committerChristian Heimes <christian@python.org>2018-02-25 13:07:24 +0100
commit4cb373359d5ff29b222b10207516d294f3a54ad8 (patch)
treee75a39ac93e562ade3d2d6931dfcfb30d0c5a754 /setup.py
parentff7528f089b60f8372c658f3bc3b14b059114da9 (diff)
downloadcpython-git-4cb373359d5ff29b222b10207516d294f3a54ad8.tar.gz
[3.7] bpo-32647: Link ctypes extension with libdl. (GH-5550) (#5874)
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 5bb9692575f10f4a7c7f1c2c0c70956baf6d5c23) Co-authored-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index f4f6e4fdb1..8536c350fe 100644
--- a/setup.py
+++ b/setup.py
@@ -2005,6 +2005,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 _decimal_ext(self):
extra_compile_args = []
undef_macros = []