Skip to content

Commit 4e9999f

Browse files
author
thomas.heller
committed
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. git-svn-id: http://svn.python.org/projects/python/trunk@63511 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 56a66e4 commit 4e9999f

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

Modules/_ctypes/libffi/fficonfig.py.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ ffi_platforms = {
2525
'SH64': ['src/sh64/sysv.S', 'src/sh64/ffi.c'],
2626
'PA': ['src/pa/linux.S', 'src/pa/ffi.c'],
2727
'PA_LINUX': ['src/pa/linux.S', 'src/pa/ffi.c'],
28+
'PA_HPUX': ['src/pa/hpux32.s', 'src/pa/ffi.c'],
2829
}
2930

3031
ffi_srcdir = '@srcdir@'

setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1580,6 +1580,9 @@ def detect_ctypes(self, inc_dirs, lib_dirs):
15801580
# finding some -z option for the Sun compiler.
15811581
extra_link_args.append('-mimpure-text')
15821582

1583+
elif sys.platform.startswith('hpux'):
1584+
extra_link_args.append('-fPIC')
1585+
15831586
ext = Extension('_ctypes',
15841587
include_dirs=include_dirs,
15851588
extra_compile_args=extra_compile_args,

0 commit comments

Comments
 (0)