aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru Ardelean <ardeleanalex@gmail.com>2015-12-19 15:16:02 +0200
committerAlexandru Ardelean <ardeleanalex@gmail.com>2015-12-19 18:23:23 +0200
commite5ca27a97ced84c6bce0799de81cceb9c32e9cc7 (patch)
tree4771202a728bfe211670bb05712177a09972e2a3
parent9bd34cd554b624915ec9e7b61909ded75de703ae (diff)
node: fix build on x86 & x86.64 targets
For x86 and x86_64, nodejs has some special CPU code that needs to be selected by specifying the correct CPU name (correct for nodejs). On OpenWRT x86 is i386 ; node wants ia32 for this. And x86_64 is x64 on nodejs. So, we just need to do the proper substitutions. Note: the ARCH env-var is obtained from CONFIG_ARCH, after some subtitutions are applied. So, it shouldn't affect other target archs. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
-rw-r--r--lang/node/Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/lang/node/Makefile b/lang/node/Makefile
index 243c8a5b6..147410499 100644
--- a/lang/node/Makefile
+++ b/lang/node/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=node
PKG_VERSION:=v0.12.7
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=node-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://nodejs.org/dist/${PKG_VERSION}
@@ -40,8 +40,13 @@ define Package/node/description
package ecosystem, npm, is the largest ecosystem of open source libraries in the world.
endef
+CPU:=$(subst x86_64,x64,$(subst i386,ia32,$(ARCH)))
+
+MAKE_VARS += \
+ DESTCPU=$(CPU)
+
CONFIGURE_ARGS= \
- --dest-cpu=$(CONFIG_ARCH) \
+ --dest-cpu=$(CPU) \
--dest-os=linux \
--without-snapshot \
--shared-zlib \