0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-21 21:19:50 +01:00

build: fix 'gas_version' check on localized environments

Some GNU assembler versions got localized outputs like...

```
Gnu assembler versão 2.30 (x86_64-linux-gnu) usando versão BFD (GNU Binutils for Ubuntu) 2.30
```

failing regex checker and the whole configure process.

PR-URL: https://github.com/nodejs/node/pull/20394
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Evandro Oliveira 2018-04-29 03:49:21 -03:00 committed by Anna Henningsen
parent 32c51f10d3
commit 214ff0a9d5
No known key found for this signature in database
GPG Key ID: 9C63F3A6CD2AD8F9

4
configure vendored
View File

@ -671,11 +671,13 @@ def get_xcode_version(cc):
def get_gas_version(cc):
try:
custom_env = os.environ.copy()
custom_env["LC_ALL"] = "en_US"
proc = subprocess.Popen(shlex.split(cc) + ['-Wa,-v', '-c', '-o',
'/dev/null', '-x',
'assembler', '/dev/null'],
stdin=subprocess.PIPE, stderr=subprocess.PIPE,
stdout=subprocess.PIPE)
stdout=subprocess.PIPE, env=custom_env)
except OSError:
error('''No acceptable C compiler found!