summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorRefael Ackermann <refack@gmail.com>2018-06-08 15:47:51 -0400
committerRich Trott <rtrott@gmail.com>2018-06-08 16:34:41 -0700
commitbe8cfc7f7e49ac3e42a4c65e83002eb6a907e04b (patch)
treea363d9de8a3577fc99ad5c5f4d5702a4fe321950 /configure
parentc46b99e2542bd8facd895e3c553e910e88b6ff55 (diff)
downloadandroid-node-v8-be8cfc7f7e49ac3e42a4c65e83002eb6a907e04b.tar.gz
android-node-v8-be8cfc7f7e49ac3e42a4c65e83002eb6a907e04b.tar.bz2
android-node-v8-be8cfc7f7e49ac3e42a4c65e83002eb6a907e04b.zip
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>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure10
1 files changed, 7 insertions, 3 deletions
diff --git a/configure b/configure
index 97a75b9856..db9c45a868 100755
--- a/configure
+++ b/configure
@@ -672,7 +672,10 @@ def get_xcode_version(cc):
def get_gas_version(cc):
try:
custom_env = os.environ.copy()
- custom_env["LC_ALL"] = "en_US"
+ # 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"
proc = subprocess.Popen(shlex.split(cc) + ['-Wa,-v', '-c', '-o',
'/dev/null', '-x',
'assembler', '/dev/null'],
@@ -685,12 +688,13 @@ def get_gas_version(cc):
consider adjusting the CC environment variable if you installed
it in a non-standard prefix.''')
- match = re.match(r"GNU assembler version ([2-9]\.[0-9]+)",
- proc.communicate()[1])
+ gas_ret = proc.communicate()[1]
+ match = re.match(r"GNU assembler version ([2-9]\.[0-9]+)", gas_ret)
if match:
return match.group(1)
else:
+ warn('Could not recognize `gas`: ' + gas_ret)
return '0'
# Note: Apple clang self-reports as clang 4.2.0 and gcc 4.2.1. It passes