Joshua J Cogliati added the comment:
Looking at the patch (3078fdb7cf3d for Issue1488098) it has:
if target_lang == "c++" and self.compiler_cxx:
- linker[0] = self.compiler_cxx[0]
One possibility is that that the problem was:
linker[0] = self.compiler_cxx[0]
which would also cause a compiler_cxx like:
export CXX="env BAR=FOO g++"
to fail. Possibly the code:
linker[i] = self.compiler_cxx[i]
managed to hit on an index value that worked better for the CXX that Ronald had
on his system.
I think the root cause is the special casing of
if target_lang == "c++" and self.compiler_cxx:
and I think that few enough people use a c++ for extensions and of those, most
use CXX="g++" or something similar where the complicated but incorrect version
that is in Python works.
Basically, if you have something like CXX="g++" then both the version before
3078fdb7cf3d and after 3078fdb7cf3d work.
If you have something like CXX="env BAR=FOO g++"
then the version before 3078fdb7cf3d would not have worked.
I think it is likely that if 3078fdb7cf3d had completely eliminated:
- if target_lang == "c++" and self.compiler_cxx:
- linker[0] = self.compiler_cxx[0]
instead of adding new code to try and work around the problem it also would
have fixed the problem that Issue1488098 encountered.
I am guessing this problem really started with changeset 771b6f521b95 in 2002.
This codes purpose is:
(UnixCCompiler.link): Included target_lang parameter, and made linker command
use compiler_cxx, if target_lang is 'c++'.
and that change is the one that added:
linker[0] = self.compiler_cxx[0]
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue8027>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com