]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
On HPUX, -fPIC must be used for linking. _ctypes now builds on HP-UX
authorThomas Heller <theller@ctypes.org>
Tue, 20 May 2008 19:53:47 +0000 (19:53 +0000)
committerThomas Heller <theller@ctypes.org>
Tue, 20 May 2008 19:53:47 +0000 (19:53 +0000)
IA64 and PA machines.

The ctypes unittests work fine on the IA64, but dump core in
test_qsort on the PA.

Modules/_ctypes/libffi/fficonfig.py.in
setup.py

index 09c13db38d48faa7992a430002b5bbb194fd1871..f5f3810b0d91d63926865c7920275b11a2368d97 100644 (file)
@@ -25,6 +25,7 @@ ffi_platforms = {
     'SH64': ['src/sh64/sysv.S', 'src/sh64/ffi.c'],
     'PA': ['src/pa/linux.S', 'src/pa/ffi.c'],
     'PA_LINUX': ['src/pa/linux.S', 'src/pa/ffi.c'],
+    'PA_HPUX': ['src/pa/hpux32.s', 'src/pa/ffi.c'],
 }
 
 ffi_srcdir = '@srcdir@'
index 34035edd32c8d0fb8608dc8b6f8ede16d52ca343..4663cece8c14f4b08111e4490023be75f6eadf58 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -1580,6 +1580,9 @@ class PyBuildExt(build_ext):
             # finding some -z option for the Sun compiler.
             extra_link_args.append('-mimpure-text')
 
+        elif sys.platform.startswith('hpux'):
+            extra_link_args.append('-fPIC')
+
         ext = Extension('_ctypes',
                         include_dirs=include_dirs,
                         extra_compile_args=extra_compile_args,