This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

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.
  • Loading branch information...
1 parent 202df30 commit c6bb361b8411132891bdbc816ceda6c147754cf6 @bnoordhuis bnoordhuis committed Jul 12, 2012
Showing with 11 additions and 17 deletions.
  1. +11 −17 configure
View
@@ -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'] = ''

2 comments on commit c6bb361

Is there an easy way to override this and re-enable armv7 from the command line when building? The pandaboard, beagleboards, and anything else using Cortex-A processors (lots of tablets and at least some phones included here) are armv7.

Member

bnoordhuis replied Jul 12, 2012

Not right now but you can edit config.gypi. I'll probably add a configure switch eventually (have to think through the ramifications first).

Please sign in to comment.