[pypy-commit] pypy py3.5: Issue #2747

arigo pypy.commits at gmail.com
Sun Feb 11 14:38:17 EST 2018


Author: Armin Rigo <arigo at tunes.org>
Branch: py3.5
Changeset: r93802:b256fef073df
Date: 2018-02-11 20:37 +0100
http://bitbucket.org/pypy/pypy/changeset/b256fef073df/

Log:	Issue #2747

	unixccompiler.py thinks the compiler is not GCC because it is ``cc``
	with PyPy.

diff --git a/lib-python/3/distutils/unixccompiler.py b/lib-python/3/distutils/unixccompiler.py
--- a/lib-python/3/distutils/unixccompiler.py
+++ b/lib-python/3/distutils/unixccompiler.py
@@ -222,6 +222,10 @@
         return "-L" + dir
 
     def _is_gcc(self, compiler_name):
+        if "__pypy__" in sys.builtin_module_names:   # issue #2747
+            if (compiler_name.startswith('cc') or
+                compiler_name.startswith('c++')):
+                return True
         return "gcc" in compiler_name or "g++" in compiler_name
 
     def runtime_library_dir_option(self, dir):


More information about the pypy-commit mailing list