Kaydet (Commit) 03b75ddf authored tarafından Thomas Heller's avatar Thomas Heller

On HPUX, -fPIC must be used for linking. _ctypes now builds on HP-UX

IA64 and PA machines.

The ctypes unittests work fine on the IA64, but dump core in
test_qsort on the PA.
üst c0128838
...@@ -25,6 +25,7 @@ ffi_platforms = { ...@@ -25,6 +25,7 @@ ffi_platforms = {
'SH64': ['src/sh64/sysv.S', 'src/sh64/ffi.c'], 'SH64': ['src/sh64/sysv.S', 'src/sh64/ffi.c'],
'PA': ['src/pa/linux.S', 'src/pa/ffi.c'], 'PA': ['src/pa/linux.S', 'src/pa/ffi.c'],
'PA_LINUX': ['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@' ffi_srcdir = '@srcdir@'
......
...@@ -1580,6 +1580,9 @@ class PyBuildExt(build_ext): ...@@ -1580,6 +1580,9 @@ class PyBuildExt(build_ext):
# finding some -z option for the Sun compiler. # finding some -z option for the Sun compiler.
extra_link_args.append('-mimpure-text') extra_link_args.append('-mimpure-text')
elif sys.platform.startswith('hpux'):
extra_link_args.append('-fPIC')
ext = Extension('_ctypes', ext = Extension('_ctypes',
include_dirs=include_dirs, include_dirs=include_dirs,
extra_compile_args=extra_compile_args, extra_compile_args=extra_compile_args,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment