Skip to content

Commit

Permalink
build: fix 'gas_version' check on localized environments
Browse files Browse the repository at this point in the history
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: #20394
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
oliveiraev authored and targos committed Jun 13, 2018
1 parent 4757771 commit c688a00
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down

0 comments on commit c688a00

Please sign in to comment.