From 0bc7d7e1bb6613460340bf3c9b3a2243f8d5269f Mon Sep 17 00:00:00 2001 From: Evandro Oliveira Date: Sun, 29 Apr 2018 03:49:21 -0300 Subject: [PATCH] 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. --- configure | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 17e13a48d47e5a..9784a11bec452e 100755 --- a/configure +++ b/configure @@ -676,11 +676,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!