]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-35198 Fix C++ extension compilation on AIX (GH-10437)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 4 Mar 2019 15:06:36 +0000 (07:06 -0800)
committerGitHub <noreply@github.com>
Mon, 4 Mar 2019 15:06:36 +0000 (07:06 -0800)
commit06e9953d5e3f0144ec8247b61541e7be85d55b50
tree010590cdb704e2b6ba94473be583d4b34bbc622c
parent84fa6b9e5932af981cb299c0c5ac80b9cc37c3fa
bpo-35198 Fix C++ extension compilation on AIX (GH-10437)

For C++ extensions, distutils tries to replace the C compiler with the
C++ compiler, but it assumes that C compiler is the first element after
any environment variables set. On AIX, linking goes through ld_so_aix,
so it is the first element and the compiler is the next element. Thus
the replacement is faulty:

ld_so_aix gcc ... -> g++ gcc ...

Also, it assumed that self.compiler_cxx had only 1 element or that
there were the same number of elements as the linker has and in the
same order. This might not be the case, so instead concatenate
everything together.
(cherry picked from commit 800d5cd75025876d79ab05980925a05d8e36b63d)

Co-authored-by: Kevin Adler <kadler@us.ibm.com>
Lib/distutils/unixccompiler.py
Misc/NEWS.d/next/Library/2018-11-09-12-45-28.bpo-35198.EJ8keW.rst [new file with mode: 0644]