Created
December 18, 2011 23:13
-
-
Save ry/1494780 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 09927155e778e4980ed09cdbeced28b2d294de7c | |
Author: Ryan Dahl <ry@tinyclouds.org> | |
Date: Sat Dec 17 12:13:16 2011 -0800 | |
Attempt to fix configure --dest-cpu | |
diff --git a/configure b/configure | |
index 1104c75..9e28811 100755 | |
--- a/configure | |
+++ b/configure | |
@@ -153,13 +153,23 @@ def host_arch(): | |
'arm': 'arm', | |
'x86': 'ia32', | |
'i386': 'ia32', | |
+ 'ia32': 'ia32', | |
'x86_64': 'x64', | |
- }.get(arch, 'ia32') | |
+ 'x64': 'x64', | |
+ }.get(arch) | |
def target_arch(): | |
- # TODO act on options.dest_cpu | |
- return host_arch() | |
+ return { | |
+ 'arm': 'arm', | |
+ 'x86': 'ia32', | |
+ 'i386': 'ia32', | |
+ 'ia32': 'ia32', | |
+ 'x86_64': 'x64', | |
+ 'x64': 'x64', | |
+ 'amd64': 'x64', | |
+ }.get(options.dest_cpu, host_arch()) | |
+ | |
def configure_node(o): | |
@@ -169,7 +179,9 @@ def configure_node(o): | |
o['variables']['node_use_dtrace'] = b(options.with_dtrace) | |
o['variables']['node_install_npm'] = b(not options.without_npm) | |
o['variables']['host_arch'] = host_arch() | |
+ o['variables']['v8_host_arch'] = target_arch() | |
o['variables']['target_arch'] = target_arch() | |
+ o['variables']['v8_target_arch'] = target_arch() | |
# TODO move to node.gyp | |
if sys.platform == 'sunos5': | |
@@ -266,4 +278,5 @@ json.dump(output, f, indent=2, skipkeys=True) | |
f.write("\n") | |
f.close() | |
-subprocess.call(['tools/gyp_node','-f', 'make']) | |
+subprocess.call(['tools/gyp_node','-f', 'make', '-D', 'target_arch=' + | |
+ target_arch(), '-D', 'v8_target_arch=' + target_arch()]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment