Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 78c7d66

Browse filesBrowse files
refacktargos
authored andcommitted
build: don't change locale on smartos
PR-URL: #21220 Fixes: nodejs/build#1327 Refs: #20394 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
1 parent 2655c7b commit 78c7d66
Copy full SHA for 78c7d66

File tree

Expand file treeCollapse file tree

1 file changed

+7
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-3
lines changed
Open diff view settings
Collapse file

‎configure‎

Copy file name to clipboardExpand all lines: configure
+7-3Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,10 @@ def get_xcode_version(cc):
672672
def get_gas_version(cc):
673673
try:
674674
custom_env = os.environ.copy()
675-
custom_env["LC_ALL"] = "en_US"
675+
# smartos (a.k.a. sunos5) does not have the en_US locale, and will give:
676+
# `setlocale: LC_ALL: cannot change locale (en_US): Invalid argument`
677+
if 'sunos' not in sys.platform:
678+
custom_env["LC_ALL"] = "en_US"
676679
proc = subprocess.Popen(shlex.split(cc) + ['-Wa,-v', '-c', '-o',
677680
'/dev/null', '-x',
678681
'assembler', '/dev/null'],
@@ -685,12 +688,13 @@ def get_gas_version(cc):
685688
consider adjusting the CC environment variable if you installed
686689
it in a non-standard prefix.''')
687690

688-
match = re.match(r"GNU assembler version ([2-9]\.[0-9]+)",
689-
proc.communicate()[1])
691+
gas_ret = proc.communicate()[1]
692+
match = re.match(r"GNU assembler version ([2-9]\.[0-9]+)", gas_ret)
690693

691694
if match:
692695
return match.group(1)
693696
else:
697+
warn('Could not recognize `gas`: ' + gas_ret)
694698
return '0'
695699

696700
# Note: Apple clang self-reports as clang 4.2.0 and gcc 4.2.1. It passes

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.