summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2006-08-04 18:57:34 (GMT)
committerThomas Heller <theller@ctypes.org>2006-08-04 18:57:34 (GMT)
commit1798489547a259876c495280dcd5d649269967f3 (patch)
tree547ac1b02c504c40e28c8b99fc72d7287b49fb8c
parent74d36f0d95d40f7ae70fbc4d695528c8b769d229 (diff)
downloadcpython-1798489547a259876c495280dcd5d649269967f3.zip
cpython-1798489547a259876c495280dcd5d649269967f3.tar.gz
cpython-1798489547a259876c495280dcd5d649269967f3.tar.bz2
Fix #1530448 - fix ctypes build failure on solaris 10.
The '-mimpure-text' linker flag is required when linking _ctypes.so.
-rw-r--r--Misc/NEWS2
-rw-r--r--setup.py5
2 files changed, 7 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index a6797f4..d4eb218 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -48,6 +48,8 @@ Tests
Build
-----
+- Bug #1530448, ctypes buld failure on Solaris 10 was fixed.
+
Mac
---
diff --git a/setup.py b/setup.py
index 0feb484..67ddade 100644
--- a/setup.py
+++ b/setup.py
@@ -1349,6 +1349,7 @@ class PyBuildExt(build_ext):
self.use_system_libffi = False
include_dirs = []
extra_compile_args = []
+ extra_link_args = []
sources = ['_ctypes/_ctypes.c',
'_ctypes/callbacks.c',
'_ctypes/callproc.c',
@@ -1363,9 +1364,13 @@ class PyBuildExt(build_ext):
# XXX Is this still needed?
## extra_link_args.extend(['-read_only_relocs', 'warning'])
+ elif sys.platform == 'sunos5':
+ extra_link_args.append('-mimpure-text')
+
ext = Extension('_ctypes',
include_dirs=include_dirs,
extra_compile_args=extra_compile_args,
+ extra_link_args=extra_link_args,
libraries=[],
sources=sources,
depends=depends)