mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
dist/tools/compile_commands: Fix interoperability with localized GCC
GCC supports localized outputs, depending on the currently set locale. This broke the compile-commands target, as the regexes only match the English output. By invoking the compiler explicitly with the C locale, it ensures the expected English language output.
This commit is contained in:
parent
4ffa4112d4
commit
53c8ebc287
@ -27,9 +27,11 @@ def detect_includes_and_version_gcc(compiler):
|
||||
:rtype: tuple
|
||||
"""
|
||||
try:
|
||||
process_env = dict(os.environ)
|
||||
process_env["LC_MESSAGES"] = "C"
|
||||
with subprocess.Popen([compiler, "-v", "-E", "-"],
|
||||
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE) as proc:
|
||||
stderr=subprocess.PIPE, env=process_env) as proc:
|
||||
inputdata = b"typedef int dont_be_pedantic;"
|
||||
_, stderrdata = proc.communicate(input=inputdata)
|
||||
except FileNotFoundError:
|
||||
|
Loading…
Reference in New Issue
Block a user