Skip to content

Commit 6c17ba9

Browse files
committed
build node fix: get_gas_version from node v10.5.0
1 parent e578a88 commit 6c17ba9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

node/configure

+6-3
Original file line numberDiff line numberDiff line change
@@ -676,24 +676,27 @@ def get_xcode_version(cc):
676676

677677
def get_gas_version(cc):
678678
try:
679+
custom_env = os.environ.copy()
680+
custom_env["LC_ALL"] = "C"
679681
proc = subprocess.Popen(shlex.split(cc) + ['-Wa,-v', '-c', '-o',
680682
'/dev/null', '-x',
681683
'assembler', '/dev/null'],
682684
stdin=subprocess.PIPE, stderr=subprocess.PIPE,
683-
stdout=subprocess.PIPE)
685+
stdout=subprocess.PIPE, env=custom_env)
684686
except OSError:
685687
error('''No acceptable C compiler found!
686688
687689
Please make sure you have a C compiler installed on your system and/or
688690
consider adjusting the CC environment variable if you installed
689691
it in a non-standard prefix.''')
690692

691-
match = re.match(r"GNU assembler version ([2-9]\.[0-9]+)",
692-
proc.communicate()[1])
693+
gas_ret = proc.communicate()[1]
694+
match = re.match(r"GNU assembler version ([2-9]\.[0-9]+)", gas_ret)
693695

694696
if match:
695697
return match.group(1)
696698
else:
699+
warn('Could not recognize `gas`: ' + gas_ret)
697700
return '0'
698701

699702
# Note: Apple clang self-reports as clang 4.2.0 and gcc 4.2.1. It passes

0 commit comments

Comments
 (0)