build: don't change locale on smartos
PR-URL: https://github.com/nodejs/node/pull/21220 Fixes: https://github.com/nodejs/build/issues/1327 Refs: https://github.com/nodejs/node/pull/20394 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
This commit is contained in:
parent
c46b99e254
commit
be8cfc7f7e
8
configure
vendored
8
configure
vendored
@ -672,6 +672,9 @@ def get_xcode_version(cc):
|
|||||||
def get_gas_version(cc):
|
def get_gas_version(cc):
|
||||||
try:
|
try:
|
||||||
custom_env = os.environ.copy()
|
custom_env = os.environ.copy()
|
||||||
|
# smartos (a.k.a. sunos5) does not have the en_US locale, and will give:
|
||||||
|
# `setlocale: LC_ALL: cannot change locale (en_US): Invalid argument`
|
||||||
|
if 'sunos' not in sys.platform:
|
||||||
custom_env["LC_ALL"] = "en_US"
|
custom_env["LC_ALL"] = "en_US"
|
||||||
proc = subprocess.Popen(shlex.split(cc) + ['-Wa,-v', '-c', '-o',
|
proc = subprocess.Popen(shlex.split(cc) + ['-Wa,-v', '-c', '-o',
|
||||||
'/dev/null', '-x',
|
'/dev/null', '-x',
|
||||||
@ -685,12 +688,13 @@ def get_gas_version(cc):
|
|||||||
consider adjusting the CC environment variable if you installed
|
consider adjusting the CC environment variable if you installed
|
||||||
it in a non-standard prefix.''')
|
it in a non-standard prefix.''')
|
||||||
|
|
||||||
match = re.match(r"GNU assembler version ([2-9]\.[0-9]+)",
|
gas_ret = proc.communicate()[1]
|
||||||
proc.communicate()[1])
|
match = re.match(r"GNU assembler version ([2-9]\.[0-9]+)", gas_ret)
|
||||||
|
|
||||||
if match:
|
if match:
|
||||||
return match.group(1)
|
return match.group(1)
|
||||||
else:
|
else:
|
||||||
|
warn('Could not recognize `gas`: ' + gas_ret)
|
||||||
return '0'
|
return '0'
|
||||||
|
|
||||||
# Note: Apple clang self-reports as clang 4.2.0 and gcc 4.2.1. It passes
|
# Note: Apple clang self-reports as clang 4.2.0 and gcc 4.2.1. It passes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user