Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Make O3 compiles on ARM architecture #26

Open
wants to merge 2 commits into from

3 participants

@desaintmartin

Allow to correctly install O3 on ARM architecture.

Solve #19.

Basically, it just adds a platform check. If it is ARM, don't add -msse2. Maybe it should be the opposite: only add -msse2 on supported platforms.

@rngadam

Would also like to see this merged and Cloud9 updated...

@desaintmartin

Note: I forked the whole stack and tried to install Cloud9 with my packager that uses my node-libxml that uses this patch. And so far, it works. Tell me if there is a problem / a request to change the code.

I also preferred to explicitly disable it for ARM as we can't know future available archs for node.js (i.e code is future-proof and doesn't break on existing installs on classical archs ;)).

@rngadam

Thanks for the tip! I've also forked Cloud9 with some of my own changes... but I'm still wondering what you changed exactly to refer to your modified versions instead of whatever sm pulls?

Looking at your https://github.com/desaintmartin/cloud9/blob/master/package.json, seems like your packager it still pointing to ajaxorg?

@desaintmartin

I'm sorry, haven't pushed yet. Done now.
Only thing: I came across the known but old bug where I can't "cd" when installing node-libxml. But it disappeared magically, I think it was an error from me, but can you confirm it works?

@gflarity

Can we please get these merged? I also ran into the same issue.

@desaintmartin

Any news? I am more and more bored maintaining my own fork! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 13 additions and 7 deletions.
  1. +13 −7 wscript
View
20 wscript
@@ -1,3 +1,5 @@
+import platform
+
srcdir = '.'
blddir = 'build'
VERSION = '0.0.1'
@@ -5,23 +7,27 @@ VERSION = '0.0.1'
def set_options(opt):
opt.tool_options('compiler_cxx')
-def configure(conf):
+def configure(conf):
+ c_flags = ['-O3', '-ffast-math', '-fno-strict-aliasing']
+ # Don't append msse2 switch if not supported by architecture.
+ if not 'arm' in platform.machine():
+ c_flags.append('-msse2')
conf.check_tool('compiler_cxx')
- conf.check_tool('node_addon')
+ conf.check_tool('node_addon')
conf.add_os_flags('LDFLAGS','LINKFLAGS')
- conf.env.append_value('CCFLAGS', ['-O3', '-msse2', '-ffast-math', '-fno-strict-aliasing'])
- conf.env.append_value('CXXFLAGS', ['-O3', '-msse2', '-ffast-math', '-fno-strict-aliasing'])
+ conf.env.append_value('CCFLAGS', c_flags)
+ conf.env.append_value('CXXFLAGS', c_flags)
def build(bld):
- obj = bld.new_task_gen('cxx', 'shlib', 'node_addon')
+ obj = bld.new_task_gen('cxx', 'shlib', 'node_addon')
obj.target = 'o3'
obj.source = 'hosts/node-o3/sh_node.cc hosts/node-o3/sh_node_libs.cc'
-
+
obj.includes = """
include
hosts
modules
deps
"""
-
+
obj.lib = 'xml2'
Something went wrong with that request. Please try again.