From 214ff0a9d5848cca202ea3590fc667a5b0c9fa4e Mon Sep 17 00:00:00 2001 From: Evandro Oliveira Date: Sun, 29 Apr 2018 03:49:21 -0300 Subject: [PATCH] build: fix 'gas_version' check on localized environments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Richard Lau Reviewed-By: Ruben Bridgewater Reviewed-By: James M Snell --- configure | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure b/configure index c4dda999fd2..97a75b98569 100755 --- a/configure +++ b/configure @@ -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!