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 2cf37f5

Browse filesBrowse files
mutao-loongsontargos
authored andcommitted
Revert "build: remove mips support"
This reverts commit 9334e45. PR-URL: #27992 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
1 parent d0de204 commit 2cf37f5
Copy full SHA for 2cf37f5

File tree

Expand file treeCollapse file tree

3 files changed

+47
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+47
-4
lines changed
Open diff view settings
Collapse file

‎configure.py‎

Copy file name to clipboardExpand all lines: configure.py
+44-1Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,13 @@
4545

4646
valid_os = ('win', 'mac', 'solaris', 'freebsd', 'openbsd', 'linux',
4747
'android', 'aix', 'cloudabi')
48-
valid_arch = ('arm', 'arm64', 'ia32', 'ppc',
48+
valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64el', 'ppc',
4949
'ppc64', 'x32','x64', 'x86', 'x86_64', 's390', 's390x')
5050
valid_arm_float_abi = ('soft', 'softfp', 'hard')
5151
valid_arm_fpu = ('vfp', 'vfpv3', 'vfpv3-d16', 'neon')
52+
valid_mips_arch = ('loongson', 'r1', 'r2', 'r6', 'rx')
53+
valid_mips_fpu = ('fp32', 'fp64', 'fpxx')
54+
valid_mips_float_abi = ('soft', 'hard')
5255
valid_intl_modes = ('none', 'small-icu', 'full-icu', 'system-icu')
5356
with open ('tools/icu/icu_versions.json') as f:
5457
icu_versions = json.load(f)
@@ -365,6 +368,30 @@
365368
help='ARM FPU mode ({0}) [default: %default]'.format(
366369
', '.join(valid_arm_fpu)))
367370

371+
parser.add_option('--with-mips-arch-variant',
372+
action='store',
373+
dest='mips_arch_variant',
374+
default='r2',
375+
choices=valid_mips_arch,
376+
help='MIPS arch variant ({0}) [default: %default]'.format(
377+
', '.join(valid_mips_arch)))
378+
379+
parser.add_option('--with-mips-fpu-mode',
380+
action='store',
381+
dest='mips_fpu_mode',
382+
default='fp32',
383+
choices=valid_mips_fpu,
384+
help='MIPS FPU mode ({0}) [default: %default]'.format(
385+
', '.join(valid_mips_fpu)))
386+
387+
parser.add_option('--with-mips-float-abi',
388+
action='store',
389+
dest='mips_float_abi',
390+
default='hard',
391+
choices=valid_mips_float_abi,
392+
help='MIPS floating-point ABI ({0}) [default: %default]'.format(
393+
', '.join(valid_mips_float_abi)))
394+
368395
parser.add_option('--with-dtrace',
369396
action='store_true',
370397
dest='with_dtrace',
@@ -846,6 +873,8 @@ def host_arch_cc():
846873
'__aarch64__' : 'arm64',
847874
'__arm__' : 'arm',
848875
'__i386__' : 'ia32',
876+
'__MIPSEL__' : 'mipsel',
877+
'__mips__' : 'mips',
849878
'__PPC64__' : 'ppc64',
850879
'__PPC__' : 'ppc64',
851880
'__x86_64__' : 'x64',
@@ -861,6 +890,9 @@ def host_arch_cc():
861890
if rtn != 's390':
862891
break
863892

893+
if rtn == 'mipsel' and '_LP64' in k:
894+
rtn = 'mips64el'
895+
864896
return rtn
865897

866898

@@ -874,6 +906,7 @@ def host_arch_win():
874906
'AMD64' : 'x64',
875907
'x86' : 'ia32',
876908
'arm' : 'arm',
909+
'mips' : 'mips',
877910
}
878911

879912
return matchup.get(arch, 'ia32')
@@ -905,6 +938,14 @@ def configure_arm(o):
905938
o['variables']['arm_fpu'] = options.arm_fpu or arm_fpu
906939

907940

941+
def configure_mips(o):
942+
can_use_fpu_instructions = (options.mips_float_abi != 'soft')
943+
o['variables']['v8_can_use_fpu_instructions'] = b(can_use_fpu_instructions)
944+
o['variables']['v8_use_mips_abi_hardfloat'] = b(can_use_fpu_instructions)
945+
o['variables']['mips_arch_variant'] = options.mips_arch_variant
946+
o['variables']['mips_fpu_mode'] = options.mips_fpu_mode
947+
948+
908949
def gcc_version_ge(version_checked):
909950
for compiler in [(CC, 'c'), (CXX, 'c++')]:
910951
ok, is_clang, clang_version, compiler_version = \
@@ -949,6 +990,8 @@ def configure_node(o):
949990

950991
if target_arch == 'arm':
951992
configure_arm(o)
993+
elif target_arch in ('mips', 'mipsel', 'mips64el'):
994+
configure_mips(o)
952995

953996
if flavor == 'aix':
954997
o['variables']['node_target_type'] = 'static_library'
Collapse file

‎doc/api/process.md‎

Copy file name to clipboardExpand all lines: doc/api/process.md
+2-2Lines changed: 2 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -541,8 +541,8 @@ added: v0.5.0
541541
The `process.arch` property returns a string identifying the operating system
542542
CPU architecture for which the Node.js binary was compiled.
543543

544-
The current possible values are: `'arm'`, `'arm64'`, `'ia32'`,
545-
`'ppc'`, `'ppc64'`, `'s390'`, `'s390x'`, `'x32'`, and `'x64'`.
544+
The current possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,
545+
`'mipsel'`, `'ppc'`, `'ppc64'`, `'s390'`, `'s390x'`, `'x32'`, and `'x64'`.
546546

547547
```js
548548
console.log(`This processor architecture is ${process.arch}`);
Collapse file

‎doc/onboarding-extras.md‎

Copy file name to clipboardExpand all lines: doc/onboarding-extras.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,5 @@ need to be attached anymore, as only important bugfixes will be included.
8181
* `macos`, `windows`, `smartos`, `aix`
8282
* No linux, linux is the implied default
8383
* Architecture labels
84-
* `arm`, `s390`, `ppc`
84+
* `arm`, `mips`, `s390`, `ppc`
8585
* No x86{_64}, since that is the implied default

0 commit comments

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