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>2012-07-12 18:29:43 +0400
committerBen Noordhuis <info@bnoordhuis.nl>2012-07-12 18:29:46 +0400
commitc6bb361b8411132891bdbc816ceda6c147754cf6 (patch)
treed7baf8f6517321bf8250f3b66001d5f214e4e447 /configure
parent202df30aabc78fa571cf77ad93146b3c4d99fc6e (diff)
build: partially fix configure on ARM
V8 on ARM requires that armv7 is set. We don't have a good way to detect the CPU model right now so we pick a default and hope that it works okay for the majority of people. Non-scientific sampling - the ARM hardware I have lying around the house - suggests that ARMv5 and ARMv6 are still most common so armv7=0 it is. This obviously needs to be revisited sometime in the future.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure28
1 files changed, 11 insertions, 17 deletions
diff --git a/configure b/configure
index 6ce54b8b655..6c724111a8e 100755
--- a/configure
+++ b/configure
@@ -250,19 +250,6 @@ def host_arch_win():
return matchup.get(arch, 'ia32')
-def host_arch():
- """Host architecture. One of arm, ia32 or x64."""
- if os.name == 'nt':
- arch = host_arch_win()
- else:
- arch = host_arch_cc()
- return arch
-
-
-def target_arch():
- return host_arch()
-
-
def compiler_version():
try:
proc = subprocess.Popen(CC.split() + ['--version'], stdout=subprocess.PIPE)
@@ -278,17 +265,24 @@ def compiler_version():
def configure_node(o):
- # TODO add gdb
o['variables']['node_prefix'] = os.path.expanduser(options.prefix or '')
o['variables']['node_install_npm'] = b(not options.without_npm)
o['variables']['node_install_waf'] = b(not options.without_waf)
- o['variables']['host_arch'] = host_arch()
- o['variables']['target_arch'] = options.dest_cpu or target_arch()
o['default_configuration'] = 'Debug' if options.debug else 'Release'
- cc_version, is_clang = compiler_version()
+ host_arch = host_arch_win() if os.name == 'nt' else host_arch_cc()
+ target_arch = options.dest_cpu or host_arch
+ o['variables']['host_arch'] = host_arch
+ o['variables']['target_arch'] = target_arch
+
+ # V8 on ARM requires that armv7 is set. We don't have a good way to detect
+ # the CPU model right now so we pick a default and hope that it works okay
+ # for the majority of users.
+ if target_arch == 'arm':
+ o['variables']['armv7'] = 0 # FIXME
# clang has always supported -fvisibility=hidden, right?
+ cc_version, is_clang = compiler_version()
if not is_clang and cc_version < (4,0,0):
o['variables']['visibility'] = ''