| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -45,10 +45,13 @@ | |||
| 45 | 45 | ||
| 46 | 46 | valid_os = ('win', 'mac', 'solaris', 'freebsd', 'openbsd', 'linux', | |
| 47 | 47 | 'android', 'aix', 'cloudabi') | |
| 48 | - valid_arch = ('arm', 'arm64', 'ia32', 'ppc', | ||
| 48 | + valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64el', 'ppc', | ||
| 49 | 49 | 'ppc64', 'x32','x64', 'x86', 'x86_64', 's390', 's390x') | |
| 50 | 50 | valid_arm_float_abi = ('soft', 'softfp', 'hard') | |
| 51 | 51 | 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') | ||
| 52 | 55 | valid_intl_modes = ('none', 'small-icu', 'full-icu', 'system-icu') | |
| 53 | 56 | with open ('tools/icu/icu_versions.json') as f: | |
| 54 | 57 | icu_versions = json.load(f) | |
@@ -365,6 +368,30 @@ | |||
| 365 | 368 | help='ARM FPU mode ({0}) [default: %default]'.format( | |
| 366 | 369 | ', '.join(valid_arm_fpu))) | |
| 367 | 370 | ||
| 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 | + | ||
| 368 | 395 | parser.add_option('--with-dtrace', | |
| 369 | 396 | action='store_true', | |
| 370 | 397 | dest='with_dtrace', | |
@@ -846,6 +873,8 @@ def host_arch_cc(): | |||
| 846 | 873 | '__aarch64__' : 'arm64', | |
| 847 | 874 | '__arm__' : 'arm', | |
| 848 | 875 | '__i386__' : 'ia32', | |
| 876 | + '__MIPSEL__' : 'mipsel', | ||
| 877 | + '__mips__' : 'mips', | ||
| 849 | 878 | '__PPC64__' : 'ppc64', | |
| 850 | 879 | '__PPC__' : 'ppc64', | |
| 851 | 880 | '__x86_64__' : 'x64', | |
@@ -861,6 +890,9 @@ def host_arch_cc(): | |||
| 861 | 890 | if rtn != 's390': | |
| 862 | 891 | break | |
| 863 | 892 | ||
| 893 | + if rtn == 'mipsel' and '_LP64' in k: | ||
| 894 | + rtn = 'mips64el' | ||
| 895 | + | ||
| 864 | 896 | return rtn | |
| 865 | 897 | ||
| 866 | 898 | ||
@@ -874,6 +906,7 @@ def host_arch_win(): | |||
| 874 | 906 | 'AMD64' : 'x64', | |
| 875 | 907 | 'x86' : 'ia32', | |
| 876 | 908 | 'arm' : 'arm', | |
| 909 | + 'mips' : 'mips', | ||
| 877 | 910 | } | |
| 878 | 911 | ||
| 879 | 912 | return matchup.get(arch, 'ia32') | |
@@ -905,6 +938,14 @@ def configure_arm(o): | |||
| 905 | 938 | o['variables']['arm_fpu'] = options.arm_fpu or arm_fpu | |
| 906 | 939 | ||
| 907 | 940 | ||
| 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 | + | ||
| 908 | 949 | def gcc_version_ge(version_checked): | |
| 909 | 950 | for compiler in [(CC, 'c'), (CXX, 'c++')]: | |
| 910 | 951 | ok, is_clang, clang_version, compiler_version = \ | |
@@ -949,6 +990,8 @@ def configure_node(o): | |||
| 949 | 990 | ||
| 950 | 991 | if target_arch == 'arm': | |
| 951 | 992 | configure_arm(o) | |
| 993 | + elif target_arch in ('mips', 'mipsel', 'mips64el'): | ||
| 994 | + configure_mips(o) | ||
| 952 | 995 | ||
| 953 | 996 | if flavor == 'aix': | |
| 954 | 997 | o['variables']['node_target_type'] = 'static_library' | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -541,8 +541,8 @@ added: v0.5.0 | |||
| 541 | 541 | The `process.arch` property returns a string identifying the operating system | |
| 542 | 542 | CPU architecture for which the Node.js binary was compiled. | |
| 543 | 543 | ||
| 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'`. | ||
| 546 | 546 | ||
| 547 | 547 | ```js | |
| 548 | 548 | console.log(`This processor architecture is ${process.arch}`); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -81,5 +81,5 @@ need to be attached anymore, as only important bugfixes will be included. | |||
| 81 | 81 | * `macos`, `windows`, `smartos`, `aix` | |
| 82 | 82 | * No linux, linux is the implied default | |
| 83 | 83 | * Architecture labels | |
| 84 | - * `arm`, `s390`, `ppc` | ||
| 84 | + * `arm`, `mips`, `s390`, `ppc` | ||
| 85 | 85 | * No x86{_64}, since that is the implied default | |
| Back | FazBrowse Home | New Git URL |
0 commit comments