Skip to content

Commit c688a00

Browse files
oliveiraevtargos
authored andcommitted
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: #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]>
1 parent 4757771 commit c688a00

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

configure

+3-1
Original file line numberDiff line numberDiff line change
@@ -671,11 +671,13 @@ def get_xcode_version(cc):
671671

672672
def get_gas_version(cc):
673673
try:
674+
custom_env = os.environ.copy()
675+
custom_env["LC_ALL"] = "en_US"
674676
proc = subprocess.Popen(shlex.split(cc) + ['-Wa,-v', '-c', '-o',
675677
'/dev/null', '-x',
676678
'assembler', '/dev/null'],
677679
stdin=subprocess.PIPE, stderr=subprocess.PIPE,
678-
stdout=subprocess.PIPE)
680+
stdout=subprocess.PIPE, env=custom_env)
679681
except OSError:
680682
error('''No acceptable C compiler found!
681683

0 commit comments

Comments
 (0)