Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2020-06-16 12:17:27 +0300
committerShelley Vohr <shelley.vohr@gmail.com>2020-06-30 19:34:29 +0300
commitf0f9b6d3764c508b3f4e4a5a97bd59d6b8158a28 (patch)
tree573fe9fe7a0afd5a22e87ea1312f438aa9787add /configure.py
parent29e857fbb48f98ee7770d597c23608c7eda9f5db (diff)
build: configure byte order for mips targets
The build defaulted to the byte order of the host system but that can be different from the endianness of the target system. Refs: https://github.com/nodejs/node/issues/33703#issuecomment-644639158 PR-URL: https://github.com/nodejs/node/pull/33898 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/configure.py b/configure.py
index 87d99f75be6..b06b1c55859 100755
--- a/configure.py
+++ b/configure.py
@@ -1012,12 +1012,14 @@ def configure_arm(o):
o['variables']['arm_fpu'] = options.arm_fpu or arm_fpu
-def configure_mips(o):
+def configure_mips(o, target_arch):
can_use_fpu_instructions = (options.mips_float_abi != 'soft')
o['variables']['v8_can_use_fpu_instructions'] = b(can_use_fpu_instructions)
o['variables']['v8_use_mips_abi_hardfloat'] = b(can_use_fpu_instructions)
o['variables']['mips_arch_variant'] = options.mips_arch_variant
o['variables']['mips_fpu_mode'] = options.mips_fpu_mode
+ host_byteorder = 'little' if target_arch in ('mipsel', 'mips64el') else 'big'
+ o['variables']['v8_host_byteorder'] = host_byteorder
def gcc_version_ge(version_checked):
@@ -1077,7 +1079,7 @@ def configure_node(o):
if target_arch == 'arm':
configure_arm(o)
elif target_arch in ('mips', 'mipsel', 'mips64el'):
- configure_mips(o)
+ configure_mips(o, target_arch)
if flavor == 'aix':
o['variables']['node_target_type'] = 'static_library'