◐ Shell
clean mode source ↗

build: fix 'gas_version' check on localized environments · nodejs/node@c688a00

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