STINNER Victor <vstin...@python.org> added the comment:

> This did work ages ago, but was broken when it was decided that compiler 
> paths (output of `gcc -E -v`) is no longer used for native builds and that 
> function was later even renamed: 
> https://github.com/python/cpython/commit/32f5fdd7f4213743fe2f6eedd0fe2108f3157021#diff-2eeaed663bd0d25b7e608891384b7298R514

Can you please elaborate?

setup.py of Python 2.7:

        if cross_compiling:
            self.add_gcc_paths()

setup.py of Python 3.5:

        # only change this for cross builds for 3.3, issues on Mageia
        if cross_compiling:
            self.add_gcc_paths()

In the 2.7, this code was changed in 2013 to fix bpo-17990:

"For Issue17086, 8ee6d96a1019 backported some cross-build patches to the 2.7 
branch.  The changes to setup.py detect_modules differ in the backport from 
those in default. In particular, in default, changes to the library and include 
directory lists used to build extensions modules are only made conditionally 
when cross-compiling.  But the 2.7 backport makes these changes 
unconditionally."

commit 6166709eec557f52075417b19676dccc9f405fda
Author: Ned Deily <n...@acm.org>
Date:   Wed May 15 18:00:45 2013 -0700

    Issue #17990: Only modify include and library search paths when 
cross-compiling.

----------
nosy: +vstinner

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38549>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to