Visitar URL original
bpo-38472: setup.py uses LC_ALL=C to check the C compiler by vstinner · Pull Request #30929 · python/cpython · GitHub
The Wayback Machine - https://web.archive.org/web/20220214221721/https://github.com/python/cpython/pull/30929/files
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-38472: setup.py uses LC_ALL=C to check the C compiler #30929

Merged
merged 1 commit into from Jan 26, 2022
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -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.
@@ -848,7 +848,9 @@ def add_cross_compiling_paths(self):
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