[Python-checkins] gh-78630: Drop invalid HP aCC compiler switch -fPIC on HP-UX (#8847)

erlend-aasland webhook-mailer at python.org
Thu May 19 11:42:31 EDT 2022


https://github.com/python/cpython/commit/09be18a73d81aa82cc57a782f3b0a9811e43ad3b
commit: 09be18a73d81aa82cc57a782f3b0a9811e43ad3b
branch: main
author: Michael Osipov <michael.osipov at siemens.com>
committer: erlend-aasland <erlend.aasland at protonmail.com>
date: 2022-05-19T17:42:21+02:00
summary:

gh-78630: Drop invalid HP aCC compiler switch -fPIC on HP-UX (#8847)

At compile time, '+z' is already properly used with HP aCC, and shared
libraries are correctly linked with '+b'. The '-fPIC' switch can safely be
dropped.

files:
A Misc/NEWS.d/next/Build/2018-08-21-11-10-18.bpo-34449.Z3qm3c.rst
M setup.py

diff --git a/Misc/NEWS.d/next/Build/2018-08-21-11-10-18.bpo-34449.Z3qm3c.rst b/Misc/NEWS.d/next/Build/2018-08-21-11-10-18.bpo-34449.Z3qm3c.rst
new file mode 100644
index 0000000000000..53b75aee9cc27
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2018-08-21-11-10-18.bpo-34449.Z3qm3c.rst
@@ -0,0 +1 @@
+Drop invalid compiler switch ``-fPIC`` for HP aCC on HP-UX. Patch by Michael Osipov.
diff --git a/setup.py b/setup.py
index f45cd6de33749..4c497346e8d7e 100644
--- a/setup.py
+++ b/setup.py
@@ -1408,9 +1408,6 @@ def detect_ctypes(self):
             # finding some -z option for the Sun compiler.
             extra_link_args.append('-mimpure-text')
 
-        elif HOST_PLATFORM.startswith('hp-ux'):
-            extra_link_args.append('-fPIC')
-
         ext = Extension('_ctypes',
                         include_dirs=include_dirs,
                         extra_compile_args=extra_compile_args,



More information about the Python-checkins mailing list