mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
bpo-38472: setup.py uses LC_ALL=C to check the C compiler (GH-30929)
Fix GCC detection in setup.py when cross-compiling. The C compiler is
now run with LC_ALL=C. Previously, the detection failed with a German
locale.
(cherry picked from commit a9503ac394
)
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
49971b2d18
commit
ff11effab7
2 changed files with 5 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
|||
Fix GCC detection in setup.py when cross-compiling. The C compiler is now
|
||||
run with LC_ALL=C. Previously, the detection failed with a German locale.
|
4
setup.py
4
setup.py
|
@ -682,7 +682,9 @@ class PyBuildExt(build_ext):
|
|||
tmpfile = os.path.join(self.build_temp, 'ccpaths')
|
||||
if not os.path.exists(self.build_temp):
|
||||
os.makedirs(self.build_temp)
|
||||
ret = run_command('%s -E -v - </dev/null 2>%s 1>/dev/null' % (CC, tmpfile))
|
||||
# bpo-38472: With a German locale, GCC returns "gcc-Version 9.1.0
|
||||
# (GCC)", whereas it returns "gcc version 9.1.0" with the C locale.
|
||||
ret = run_command('LC_ALL=C %s -E -v - </dev/null 2>%s 1>/dev/null' % (CC, tmpfile))
|
||||
is_gcc = False
|
||||
is_clang = False
|
||||
in_incdirs = False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue