Skip to contentSkip to conversation

package/nodejs: bump version (branch yem/node)

PATCH New Yann E. MORIN 6 participants 12 messages Oct 19, 2015 – Nov 22, 2015

lore
Share & tools
lore
#0 lore raw

v3 cover package/nodejs: bump version (branch yem/node)

Hello All!

This series is an attempt at bumping nodejs to a newer release.

A previous submission was made by Jaap a while back (and I had missed it so far, only got pointed to it on IRC lately):

    http://lists.busybox.net/pipermail/buildroot/2015-October/thread.html#141220

Yet, this patch was incomplete, and since I had already been working on that, here's my series now. ;-)

Note that in the meantime, nodejs has also released a newer version, 4.2.0 and then a day later 4.2.1 (because big problem?). There's nothing new since 4.2.1, but it is still only a week old, so I'd wait a bit to see if they spit out yet another bug-fix release for 4.2.x shortly...

Changes v2 -> v3:
- simplify conditions for ARM and VFPv2 (Thomas)
- fix commit log (J?rg)
- fix commit log in a patch (Thomas)

Changes v1 -> v2:
- original sumbmisison from Jaap considered v1
- needs gcc >= 4.8
- fix architectural ARM dependencies (armv6+ *and* VFPv2)
- forward-port more patches from 0.12.7
- use .tar.xz for 4.2.x

Regards,
Yann E. MORIN.

The following changes since commit 84120c10f5ba6c8c4b8d32068616cbdb8a8a8102:

musl: Make only shared libraries conditional (2015-10-19 23:04:48 +0200)

are available in the git repository at:

git://git.busybox.net/~ymorin/git/buildroot yem/node

for you to fetch changes up to eb34ab6d35a15dfbec70263091f58c3e7ec2efab:

package/nodejs: add version 4.1.2 (2015-10-19 23:57:11 +0200)

----------------------------------------------------------------
Yann E. MORIN (2):
package/nodejs: fix architectural dependencies on ARM package/nodejs: add version 4.1.2

 ...01-Remove-dependency-on-Python-bz2-module.patch | 31 ++++++++
 .../0002-gyp-force-link-command-to-use-CXX.patch   | 29 +++++++
 ...hon-variable-instead-of-hardcoding-Python.patch | 88 ++++++++++++++++++++++
 package/nodejs/4.1.2/0004-fix-arm-vfpv2.patch      | 18 +++++
 package/nodejs/Config.in                           | 24 +++++-
 package/nodejs/nodejs.hash                         |  3 +
 package/nodejs/nodejs.mk                           |  4 +
 7 files changed, 194 insertions(+), 3 deletions(-)
 create mode 100644 package/nodejs/4.1.2/0001-Remove-dependency-on-Python-bz2-module.patch
 create mode 100644 package/nodejs/4.1.2/0002-gyp-force-link-command-to-use-CXX.patch
 create mode 100644 package/nodejs/4.1.2/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch
 create mode 100644 package/nodejs/4.1.2/0004-fix-arm-vfpv2.patch
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#1 lore raw

PATCH v3 1/2 package/nodejs: fix architectural dependencies on ARM

On ARM, starting with v0.12.x, the V8 JS engine is now requires at least an armv6 and at least a VFPv2.

Since we're about to introduce the v4.x version, which has the same requirements, introduce an intermediate variable to hold that condition.

Cc J?rg Krause <[email protected]>
Cc Martin Bark <[email protected]>
Cc Thomas Petazzoni <[email protected]>

---
Changes v2 -> v3:
- use simpler default conditions (Thomas)
- fix commit log (J?rg)

---
 package/nodejs/Config.in | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
package/nodejs/Config.in +10 -2
index 329d270..034557b 100644
@@ -25,6 +25,15 @@ comment "nodejs needs a toolchain w/ C++, dynamic library, threads"
 
 if BR2_PACKAGE_NODEJS
 
+# Starting with 0.12.x, on ARM, V8 (the JS engine)
+# now requires an armv6+ and a VFPv2+.
+config BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS
+	bool
+	# On supported architectures other than ARM, no special requirement
+	default y if !BR2_arm
+	# On ARM, at least ARMv6+ with VFPv2+ is needed
+	default y if !BR2_ARM_CPU_ARMV5 && BR2_ARM_CPU_HAS_VFPV2
+
 choice
 	prompt "Node.js version"
 	default BR2_BR2_PACKAGE_NODEJS_0_10_X if BR2_ARM_CPU_ARMV5
@@ -35,10 +44,9 @@ choice
 config BR2_BR2_PACKAGE_NODEJS_0_10_X
 	bool "v0.10.40"
 
-# V8 included with v0.12.5 requires at least ARMv6
 config BR2_BR2_PACKAGE_NODEJS_0_12_X
 	bool "v0.12.7"
-	depends on !BR2_ARM_CPU_ARMV5
+	depends on BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS
 
 endchoice
 
Signature · 1 line
1.9.1
#2 lore raw

PATCH v3 2/2 package/nodejs: add version 4.1.2

In reply to Yann E. MORIN

We add a new version, because it is not API-compatible with the previous versions.

Also, nodejs-4.1.2 requires gcc >= 4.8.

Forward-port patches from 0.12.7:
- 0001-Remove-dependency-on-Python-bz2-module.patch partially applied

    upstream;
  - 0002-gyp-force-link-command-to-use-CXX.patch slightly refreshed;
  - 0003-Use-a-python-variable-instead-of-hardcoding-Python.patch
    largely refreshed to address new occurences of hard-coded calls;

- 0004-fix-build-error-without-OpenSSL-support.patch applied upstream
- 0005-Fix-typo-for-arm-predefined-macro-in-atomicops_inte.patch applied upstream.

New patch:
- 0004-fix-arm-vfpv2.patch to fix the gcc -mfpu option for VFPv2.

Cc J?rg Krause <[email protected]>
Cc Martin Bark <[email protected]>
Cc Jaap Crezee <[email protected]>
Cc Thomas Petazzoni <[email protected]>

---
Changes v2 -> v3:
- fix commit log in patch 0001 (thomas)

---
 ...01-Remove-dependency-on-Python-bz2-module.patch | 31 ++++++++
 .../0002-gyp-force-link-command-to-use-CXX.patch   | 29 +++++++
 ...hon-variable-instead-of-hardcoding-Python.patch | 88 ++++++++++++++++++++++
 package/nodejs/4.1.2/0004-fix-arm-vfpv2.patch      | 18 +++++
 package/nodejs/Config.in                           | 12 ++-
 package/nodejs/nodejs.hash                         |  3 +
 package/nodejs/nodejs.mk                           |  4 +
 7 files changed, 184 insertions(+), 1 deletion(-)
 create mode 100644 package/nodejs/4.1.2/0001-Remove-dependency-on-Python-bz2-module.patch
 create mode 100644 package/nodejs/4.1.2/0002-gyp-force-link-command-to-use-CXX.patch
 create mode 100644 package/nodejs/4.1.2/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch
 create mode 100644 package/nodejs/4.1.2/0004-fix-arm-vfpv2.patch
package/nodejs/4.1.2/0001-Remove-dependency-on-Python-bz2-module.patch new file +31 -0
new file mode 100644
index 0000000..65bceef
@@ -0,0 +1,31 @@
+From 3d4817c152d6f3afddcc699949c4d1664da91e2b Mon Sep 17 00:00:00 2001
+From: Martin Bark <[email protected]>
+Date: Tue, 30 Jun 2015 09:43:11 +0100
+Subject: [PATCH 1/4] Remove dependency on Python bz2 module
+
+Do not import the bz2 module, it is not used.
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+[Martin: adapt to 0.12.5]
+Signed-off-by: Martin Bark <[email protected]>
+[yann.morin.1998 at free.fr: adapt to 4.1.2]
+Signed-off-by: "Yann E. MORIN" <[email protected]>
+---
+ deps/v8/tools/js2c.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/deps/v8/tools/js2c.py b/deps/v8/tools/js2c.py
+index 77485f6..371caf5 100755
+--- a/deps/v8/tools/js2c.py
++++ b/deps/v8/tools/js2c.py
+@@ -34,7 +34,6 @@
+ import os, re, sys, string
+ import optparse
+ import jsmin
+-import bz2
+ import textwrap
+ 
+ 
+-- 
+2.1.4
+
package/nodejs/4.1.2/0002-gyp-force-link-command-to-use-CXX.patch new file +29 -0
new file mode 100644
index 0000000..5746582
@@ -0,0 +1,29 @@
+From 90a3c113c19ec615249ab880c45c6c0a8d369098 Mon Sep 17 00:00:00 2001
+From: Martin Bark <[email protected]>
+Date: Tue, 30 Jun 2015 09:43:47 +0100
+Subject: [PATCH 2/4] gyp: force link command to use CXX
+
+Signed-off-by: Samuel Martin <[email protected]>
+Signed-off-by: Martin Bark <[email protected]>
+[yann.morin.1998 at free.fr: adapt to 4.1.2]
+Signed-off-by: "Yann E. MORIN" <[email protected]>
+---
+ tools/gyp/pylib/gyp/generator/make.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/gyp/pylib/gyp/generator/make.py b/tools/gyp/pylib/gyp/generator/make.py
+index b88a433..0a1f2e0 100644
+--- a/tools/gyp/pylib/gyp/generator/make.py
++++ b/tools/gyp/pylib/gyp/generator/make.py
+@@ -142,7 +142,7 @@ cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
+ # special "figure out circular dependencies" flags around the entire
+ # input list during linking.
+ quiet_cmd_link = LINK($(TOOLSET)) $@
+-cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)
++cmd_link = $(CXX.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)
+ 
+ # We support two kinds of shared objects (.so):
+ # 1) shared_library, which is just bundling together many dependent libraries
+-- 
+2.1.4
+
package/nodejs/4.1.2/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch new file +88 -0

88 lines not on this page · raw message

package/nodejs/4.1.2/0004-fix-arm-vfpv2.patch new file +18 -0
new file mode 100644
index 0000000..b753dfe
@@ -0,0 +1,18 @@
+configure: fix ARM VFPv2
+
+The gcc -mfpu flag for VFPv2 is 'vfp', not 'vfpv2'.
+
+Signed-off-by: "Yann E. MORIN" <[email protected]>
+
+diff -durN a/configure b/configure
+--- a/configure
++++ b/configure
+@@ -611,7 +611,7 @@
+     o['variables']['arm_fpu'] = 'vfpv3'
+     o['variables']['arm_version'] = '7'
+   else:
+-    o['variables']['arm_fpu'] = 'vfpv2'
++    o['variables']['arm_fpu'] = 'vfp'
+     o['variables']['arm_version'] = '6' if is_arch_armv6() else 'default'
+ 
+   o['variables']['arm_thumb'] = 0      # -marm
package/nodejs/Config.in +11 -1
index 034557b..5128901 100644
@@ -37,7 +37,7 @@ config BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS
 choice
 	prompt "Node.js version"
 	default BR2_BR2_PACKAGE_NODEJS_0_10_X if BR2_ARM_CPU_ARMV5
-	default BR2_BR2_PACKAGE_NODEJS_0_12_X
+	default BR2_BR2_PACKAGE_NODEJS_4_X
 	help
 	  Select the version of Node.js you wish to use.
 
@@ -48,12 +48,22 @@ config BR2_BR2_PACKAGE_NODEJS_0_12_X
 	bool "v0.12.7"
 	depends on BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS
 
+config BR2_BR2_PACKAGE_NODEJS_4_X
+	bool "v4.1.2"
+	depends on BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+
+comment "v4.1.2 needs a toolchain w/ gcc >= 4.8"
+	depends on BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS
+	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+
 endchoice
 
 config BR2_PACKAGE_NODEJS_VERSION_STRING
 	string
 	default "0.10.40"	if BR2_BR2_PACKAGE_NODEJS_0_10_X
 	default "0.12.7"	if BR2_BR2_PACKAGE_NODEJS_0_12_X
+	default "4.1.2"		if BR2_BR2_PACKAGE_NODEJS_4_X
 
 menu "Module Selection"
 
package/nodejs/nodejs.hash +3 -0
index 9be2806..ab506df 100644
@@ -3,3 +3,6 @@ sha256	bae79c2fd959aebe1629af36077bebbb760128db753da226d2344cd91499149f  node-v0
 
 # From upstream URL: http://nodejs.org/dist/v0.12.7/SHASUMS256.txt
 sha256	b23d64df051c9c969b0c583f802d5d71de342e53067127a5061415be7e12f39d  node-v0.12.7.tar.gz
+
+# From upstream URL: http://nodejs.org/dist/v4.1.2/SHASUMS256.txt
+sha256  443c8251e812b1f2c4b3e9152a47df23c55567ade739e017e2c0ca0869b71e74  node-v4.1.2.tar.xz
package/nodejs/nodejs.mk +4 -0
index 414f3f3..099b3f0 100644
@@ -5,7 +5,11 @@
 ################################################################################
 
 NODEJS_VERSION = $(call qstrip,$(BR2_PACKAGE_NODEJS_VERSION_STRING))
+ifeq ($(BR2_BR2_PACKAGE_NODEJS_4_X),y)
+NODEJS_SOURCE = node-v$(NODEJS_VERSION).tar.xz
+else
 NODEJS_SOURCE = node-v$(NODEJS_VERSION).tar.gz
+endif
 NODEJS_SITE = http://nodejs.org/dist/v$(NODEJS_VERSION)
 NODEJS_DEPENDENCIES = host-python host-nodejs zlib \
 	$(call qstrip,$(BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL_DEPS))
Signature · 1 line
1.9.1
#3 lore raw

PATCH v3 2/2 package/nodejs: add version 4.1.2

Yann, All,

Great work on the patch set. Unfortunately i just checked and node.js 4.2.1 is the current release so i think this patch set needs updating.

Note that v4.2.0 marked the first long term support version of node.js, see https://nodejs.org/en/blog/release/v4.2.0 and
https://github.com/nodejs/LTS.

Thanks

Martin

Quoted 297 lines · Yann E. MORIN

We add a new version, because it is not API-compatible with the previous versions.

Also, nodejs-4.1.2 requires gcc >= 4.8.

Forward-port patches from 0.12.7:
- 0001-Remove-dependency-on-Python-bz2-module.patch partially applied

    upstream;
  - 0002-gyp-force-link-command-to-use-CXX.patch slightly refreshed;
  - 0003-Use-a-python-variable-instead-of-hardcoding-Python.patch
    largely refreshed to address new occurences of hard-coded calls;

- 0004-fix-build-error-without-OpenSSL-support.patch applied upstream
- 0005-Fix-typo-for-arm-predefined-macro-in-atomicops_inte.patch applied upstream.

New patch:
- 0004-fix-arm-vfpv2.patch to fix the gcc -mfpu option for VFPv2.

Cc J?rg Krause <[email protected]>
Cc Martin Bark <[email protected]>
Cc Jaap Crezee <[email protected]>
Cc Thomas Petazzoni <[email protected]>

---
Changes v2 -> v3:
- fix commit log in patch 0001 (thomas)

---
 ...01-Remove-dependency-on-Python-bz2-module.patch | 31 ++++++++
 .../0002-gyp-force-link-command-to-use-CXX.patch   | 29 +++++++
 ...hon-variable-instead-of-hardcoding-Python.patch | 88 ++++++++++++++++++++++
 package/nodejs/4.1.2/0004-fix-arm-vfpv2.patch      | 18 +++++
 package/nodejs/Config.in                           | 12 ++-
 package/nodejs/nodejs.hash                         |  3 +
 package/nodejs/nodejs.mk                           |  4 +
 7 files changed, 184 insertions(+), 1 deletion(-)
 create mode 100644 package/nodejs/4.1.2/0001-Remove-dependency-on-Python-bz2-module.patch
 create mode 100644 package/nodejs/4.1.2/0002-gyp-force-link-command-to-use-CXX.patch
 create mode 100644 package/nodejs/4.1.2/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch
 create mode 100644 package/nodejs/4.1.2/0004-fix-arm-vfpv2.patch
package/nodejs/4.1.2/0001-Remove-dependency-on-Python-bz2-module.patch new file +31 -0
new file mode 100644
index 0000000..65bceef
@@ -0,0 +1,31 @@
+From 3d4817c152d6f3afddcc699949c4d1664da91e2b Mon Sep 17 00:00:00 2001
+From: Martin Bark <[email protected]>
+Date: Tue, 30 Jun 2015 09:43:11 +0100
+Subject: [PATCH 1/4] Remove dependency on Python bz2 module
+
+Do not import the bz2 module, it is not used.
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+[Martin: adapt to 0.12.5]
+Signed-off-by: Martin Bark <[email protected]>
+[yann.morin.1998 at free.fr: adapt to 4.1.2]
+Signed-off-by: "Yann E. MORIN" <[email protected]>
+---
+ deps/v8/tools/js2c.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/deps/v8/tools/js2c.py b/deps/v8/tools/js2c.py
+index 77485f6..371caf5 100755
+--- a/deps/v8/tools/js2c.py
++++ b/deps/v8/tools/js2c.py
+@@ -34,7 +34,6 @@
+ import os, re, sys, string
+ import optparse
+ import jsmin
+-import bz2
+ import textwrap
+
+
+--
+2.1.4
+
package/nodejs/4.1.2/0002-gyp-force-link-command-to-use-CXX.patch new file +29 -0
new file mode 100644
index 0000000..5746582
@@ -0,0 +1,29 @@
+From 90a3c113c19ec615249ab880c45c6c0a8d369098 Mon Sep 17 00:00:00 2001
+From: Martin Bark <[email protected]>
+Date: Tue, 30 Jun 2015 09:43:47 +0100
+Subject: [PATCH 2/4] gyp: force link command to use CXX
+
+Signed-off-by: Samuel Martin <[email protected]>
+Signed-off-by: Martin Bark <[email protected]>
+[yann.morin.1998 at free.fr: adapt to 4.1.2]
+Signed-off-by: "Yann E. MORIN" <[email protected]>
+---
+ tools/gyp/pylib/gyp/generator/make.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/gyp/pylib/gyp/generator/make.py b/tools/gyp/pylib/gyp/generator/make.py
+index b88a433..0a1f2e0 100644
+--- a/tools/gyp/pylib/gyp/generator/make.py
++++ b/tools/gyp/pylib/gyp/generator/make.py
+@@ -142,7 +142,7 @@ cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
+ # special "figure out circular dependencies" flags around the entire
+ # input list during linking.
+ quiet_cmd_link = LINK($(TOOLSET)) $@
+-cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)
++cmd_link = $(CXX.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)
+
+ # We support two kinds of shared objects (.so):
+ # 1) shared_library, which is just bundling together many dependent libraries
+--
+2.1.4
+
package/nodejs/4.1.2/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch new file +88 -0
new file mode 100644
index 0000000..2e266af
@@ -0,0 +1,88 @@
+From 4a48c65921b0f05b621aef5b902b6aa54811ad7a Mon Sep 17 00:00:00 2001
+From: Martin Bark <[email protected]>
+Date: Tue, 30 Jun 2015 09:44:33 +0100
+Subject: [PATCH 3/4] Use a python variable instead of hardcoding Python
+
+The nodejs build system uses python in a number of locations. However,
+there are some locations where it hardcodes 'python' as the Python
+interpreter. However, this causes problems when we need to use python2
+instead of just python.
+
+This patch fixes that by using the python variable already in place in
+the nodejs build system.
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+[Martin: adapt to 0.12.5]
+Signed-off-by: Martin Bark <[email protected]>
+[yann.morin.1998 at free.fr: adapat to 4.1.2]
+Signed-off-by: "Yann E. MORIN" <[email protected]>
+---
+ deps/v8/tools/gyp/v8.gyp | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/deps/v8/tools/gyp/v8.gyp b/deps/v8/tools/gyp/v8.gyp
+index c703155..06c0b2b 100644
+--- a/deps/v8/tools/gyp/v8.gyp
++++ b/deps/v8/tools/gyp/v8.gyp
+@@ -1696,14 +1696,14 @@
+                       '<(PRODUCT_DIR)/natives_blob_host.bin',
+                     ],
+                     'action': [
+-                      'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob_host.bin'
++                      '<(python)', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob_host.bin'
+                     ],
+                   }, {
+                     'outputs': [
+                       '<(PRODUCT_DIR)/natives_blob.bin',
+                     ],
+                     'action': [
+-                      'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob.bin'
++                      '<(python)', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob.bin'
+                     ],
+                   }],
+                 ],
+@@ -1712,7 +1712,7 @@
+                   '<(PRODUCT_DIR)/natives_blob.bin',
+                 ],
+                 'action': [
+-                  'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob.bin'
++                  '<(python)', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob.bin'
+                 ],
+               }],
+             ],
+@@ -1812,7 +1812,7 @@
+             '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
+           ],
+           'action': [
+-            'python',
++            '<(python)',
+             '../../tools/js2c.py',
+             '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
+             'CORE',
+@@ -1838,7 +1838,7 @@
+             '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
+           ],
+           'action': [
+-            'python',
++            '<(python)',
+             '../../tools/js2c.py',
+             '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
+             'EXPERIMENTAL',
+@@ -1863,7 +1863,7 @@
+             '<(SHARED_INTERMEDIATE_DIR)/extras-libraries.cc',
+           ],
+           'action': [
+-            'python',
++            '<(python)',
+             '../../tools/js2c.py',
+             '<(SHARED_INTERMEDIATE_DIR)/extras-libraries.cc',
+             'EXTRAS',
+@@ -1900,7 +1900,7 @@
+               '<(SHARED_INTERMEDIATE_DIR)/debug-support.cc',
+             ],
+             'action': [
+-              'python',
++              '<(python)',
+               '../../tools/gen-postmortem-metadata.py',
+               '<@(_outputs)',
+               '<@(heapobject_files)'
package/nodejs/4.1.2/0004-fix-arm-vfpv2.patch new file +18 -0
new file mode 100644
index 0000000..b753dfe
@@ -0,0 +1,18 @@
+configure: fix ARM VFPv2
+
+The gcc -mfpu flag for VFPv2 is 'vfp', not 'vfpv2'.
+
+Signed-off-by: "Yann E. MORIN" <[email protected]>
+
+diff -durN a/configure b/configure
+--- a/configure
++++ b/configure
+@@ -611,7 +611,7 @@
+     o['variables']['arm_fpu'] = 'vfpv3'
+     o['variables']['arm_version'] = '7'
+   else:
+-    o['variables']['arm_fpu'] = 'vfpv2'
++    o['variables']['arm_fpu'] = 'vfp'
+     o['variables']['arm_version'] = '6' if is_arch_armv6() else 'default'
+
+   o['variables']['arm_thumb'] = 0      # -marm
package/nodejs/Config.in +11 -1
index 034557b..5128901 100644
@@ -37,7 +37,7 @@ config BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS
 choice
        prompt "Node.js version"
        default BR2_BR2_PACKAGE_NODEJS_0_10_X if BR2_ARM_CPU_ARMV5
-       default BR2_BR2_PACKAGE_NODEJS_0_12_X
+       default BR2_BR2_PACKAGE_NODEJS_4_X
        help
          Select the version of Node.js you wish to use.
 
@@ -48,12 +48,22 @@ config BR2_BR2_PACKAGE_NODEJS_0_12_X
        bool "v0.12.7"
        depends on BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS
 
+config BR2_BR2_PACKAGE_NODEJS_4_X
+       bool "v4.1.2"
+       depends on BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS
+       depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+
+comment "v4.1.2 needs a toolchain w/ gcc >= 4.8"
+       depends on BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS
+       depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+
 endchoice
 
 config BR2_PACKAGE_NODEJS_VERSION_STRING
        string
        default "0.10.40"       if BR2_BR2_PACKAGE_NODEJS_0_10_X
        default "0.12.7"        if BR2_BR2_PACKAGE_NODEJS_0_12_X
+       default "4.1.2"         if BR2_BR2_PACKAGE_NODEJS_4_X
 
 menu "Module Selection"
 
package/nodejs/nodejs.hash +3 -0
index 9be2806..ab506df 100644
@@ -3,3 +3,6 @@ sha256  bae79c2fd959aebe1629af36077bebbb760128db753da226d2344cd91499149f  node-v0
 
 # From upstream URL: http://nodejs.org/dist/v0.12.7/SHASUMS256.txt
 sha256 b23d64df051c9c969b0c583f802d5d71de342e53067127a5061415be7e12f39d  node-v0.12.7.tar.gz
+
+# From upstream URL: http://nodejs.org/dist/v4.1.2/SHASUMS256.txt
+sha256  443c8251e812b1f2c4b3e9152a47df23c55567ade739e017e2c0ca0869b71e74  node-v4.1.2.tar.xz
package/nodejs/nodejs.mk +4 -1
index 414f3f3..099b3f0 100644
@@ -5,7 +5,11 @@
 ################################################################################
 
 NODEJS_VERSION = $(call qstrip,$(BR2_PACKAGE_NODEJS_VERSION_STRING))
+ifeq ($(BR2_BR2_PACKAGE_NODEJS_4_X),y)
+NODEJS_SOURCE = node-v$(NODEJS_VERSION).tar.xz
+else
 NODEJS_SOURCE = node-v$(NODEJS_VERSION).tar.gz
+endif
 NODEJS_SITE = http://nodejs.org/dist/v$(NODEJS_VERSION)
 NODEJS_DEPENDENCIES = host-python host-nodejs zlib \
        $(call qstrip,$(BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL_DEPS))
--

1.9.1

#4 lore raw

PATCH v3 2/2 package/nodejs: add version 4.1.2

Hi,

Yann I ran your patches last night and I got Illegal instruction on a Pi B. I've started on a 4.2.1 patch/build/test late last night to see if the arm fixes that landed in Node's fix the problem.

Chapman.... aka madwax....

-----Original Message-----
From: buildroot [mailto:buildroot-bounces at busybox.net] On Behalf Of Martin Bark
Sent: 20 October 2015 09:25
To: Yann E. MORIN <[email protected]>
Cc: Thomas Petazzoni <[email protected]>; buildroot at buildroot.org
Subject: Re: [Buildroot] [PATCH 2/2 v3] package/nodejs: add version 4.1.2

Yann, All,

Great work on the patch set. Unfortunately i just checked and node.js 4.2.1 is the current release so i think this patch set needs updating.

Note that v4.2.0 marked the first long term support version of node.js, see https://nodejs.org/en/blog/release/v4.2.0 and https://github.com/nodejs/LTS.

Thanks

Martin

Quoted 327 lines · Yann E. MORIN

We add a new version, because it is not API-compatible with the previous versions.

Also, nodejs-4.1.2 requires gcc >= 4.8.

Forward-port patches from 0.12.7:
- 0001-Remove-dependency-on-Python-bz2-module.patch partially applied

    upstream;
  - 0002-gyp-force-link-command-to-use-CXX.patch slightly refreshed;
  - 0003-Use-a-python-variable-instead-of-hardcoding-Python.patch
    largely refreshed to address new occurences of hard-coded calls;

- 0004-fix-build-error-without-OpenSSL-support.patch applied upstream
- 0005-Fix-typo-for-arm-predefined-macro-in-atomicops_inte.patch applied upstream.

New patch:
- 0004-fix-arm-vfpv2.patch to fix the gcc -mfpu option for VFPv2.

Cc J?rg Krause <[email protected]>
Cc Martin Bark <[email protected]>
Cc Jaap Crezee <[email protected]>
Cc Thomas Petazzoni <[email protected]>

---
Changes v2 -> v3:
- fix commit log in patch 0001 (thomas)

---
 ...01-Remove-dependency-on-Python-bz2-module.patch | 31 ++++++++
 .../0002-gyp-force-link-command-to-use-CXX.patch   | 29 +++++++
 ...hon-variable-instead-of-hardcoding-Python.patch | 88 ++++++++++++++++++++++
 package/nodejs/4.1.2/0004-fix-arm-vfpv2.patch      | 18 +++++
 package/nodejs/Config.in                           | 12 ++-
 package/nodejs/nodejs.hash                         |  3 +
 package/nodejs/nodejs.mk                           |  4 +
 7 files changed, 184 insertions(+), 1 deletion(-)  create mode 100644 
package/nodejs/4.1.2/0001-Remove-dependency-on-Python-bz2-module.patch
 create mode 100644 
package/nodejs/4.1.2/0002-gyp-force-link-command-to-use-CXX.patch
 create mode 100644 

package/nodejs/4.1.2/0003-Use-a-python-variable-instead-of-hardcoding- Python.patch create mode 100644 package/nodejs/4.1.2/0004-fix-arm-vfpv2.patch

(quoted diff) +0 -0

a/package/nodejs/4.1.2/0001-Remove-dependency-on-Python-bz2-module.pat ch b/package/nodejs/4.1.2/0001-Remove-dependency-on-Python-bz2-module.pat ch
new file mode 100644
index 0000000..65bceef

package/nodejs/4.1.2/0001-Remove-dependency-on-Python-bz2-module new file +33 -0
+++ .patch
@@ -0,0 +1,31 @@
+From 3d4817c152d6f3afddcc699949c4d1664da91e2b Mon Sep 17 00:00:00 
+2001
+From: Martin Bark <[email protected]>
+Date: Tue, 30 Jun 2015 09:43:11 +0100
+Subject: [PATCH 1/4] Remove dependency on Python bz2 module
+
+Do not import the bz2 module, it is not used.
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+[Martin: adapt to 0.12.5]
+Signed-off-by: Martin Bark <[email protected]>
+[yann.morin.1998 at free.fr: adapt to 4.1.2]
+Signed-off-by: "Yann E. MORIN" <[email protected]>
+---
+ deps/v8/tools/js2c.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/deps/v8/tools/js2c.py b/deps/v8/tools/js2c.py index 
+77485f6..371caf5 100755
+--- a/deps/v8/tools/js2c.py
++++ b/deps/v8/tools/js2c.py
+@@ -34,7 +34,6 @@
+ import os, re, sys, string
+ import optparse
+ import jsmin
+-import bz2
+ import textwrap
+
+
+--
+2.1.4
+
(quoted diff) +0 -0

a/package/nodejs/4.1.2/0002-gyp-force-link-command-to-use-CXX.patch b/package/nodejs/4.1.2/0002-gyp-force-link-command-to-use-CXX.patch new file mode 100644
index 0000000..5746582

package/nodejs/4.1.2/0002-gyp-force-link-command-to-use-CXX.patc new file +35 -0
+++ h
@@ -0,0 +1,29 @@
+From 90a3c113c19ec615249ab880c45c6c0a8d369098 Mon Sep 17 00:00:00 
+2001
+From: Martin Bark <[email protected]>
+Date: Tue, 30 Jun 2015 09:43:47 +0100
+Subject: [PATCH 2/4] gyp: force link command to use CXX
+
+Signed-off-by: Samuel Martin <[email protected]>
+Signed-off-by: Martin Bark <[email protected]>
+[yann.morin.1998 at free.fr: adapt to 4.1.2]
+Signed-off-by: "Yann E. MORIN" <[email protected]>
+---
+ tools/gyp/pylib/gyp/generator/make.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/gyp/pylib/gyp/generator/make.py 
+b/tools/gyp/pylib/gyp/generator/make.py
+index b88a433..0a1f2e0 100644
+--- a/tools/gyp/pylib/gyp/generator/make.py
++++ b/tools/gyp/pylib/gyp/generator/make.py
+@@ -142,7 +142,7 @@ cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) 
+crsT $@ $(filter %.o,$^)  # special "figure out circular 
+dependencies" flags around the entire  # input list during linking.
+ quiet_cmd_link = LINK($(TOOLSET)) $@ -cmd_link = $(LINK.$(TOOLSET)) 
+$(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group 
+$(LD_INPUTS) -Wl,--end-group $(LIBS)
++cmd_link = $(CXX.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o 
++$@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS)
+
+ # We support two kinds of shared objects (.so):
+ # 1) shared_library, which is just bundling together many dependent 
+libraries
+--
+2.1.4
+
(quoted diff) +0 -0

a/package/nodejs/4.1.2/0003-Use-a-python-variable-instead-of-hardcodin g-Python.patch b/package/nodejs/4.1.2/0003-Use-a-python-variable-instead-of-hardcodin g-Python.patch
new file mode 100644
index 0000000..2e266af

package/nodejs/4.1.2/0003-Use-a-python-variable-instead-of-hardc new file +91 -0
+++ oding-Python.patch
@@ -0,0 +1,88 @@
+From 4a48c65921b0f05b621aef5b902b6aa54811ad7a Mon Sep 17 00:00:00 
+2001
+From: Martin Bark <[email protected]>
+Date: Tue, 30 Jun 2015 09:44:33 +0100
+Subject: [PATCH 3/4] Use a python variable instead of hardcoding 
+Python
+
+The nodejs build system uses python in a number of locations. 
+However, there are some locations where it hardcodes 'python' as the 
+Python interpreter. However, this causes problems when we need to use 
+python2 instead of just python.
+
+This patch fixes that by using the python variable already in place 
+in the nodejs build system.
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+[Martin: adapt to 0.12.5]
+Signed-off-by: Martin Bark <[email protected]>
+[yann.morin.1998 at free.fr: adapat to 4.1.2]
+Signed-off-by: "Yann E. MORIN" <[email protected]>
+---
+ deps/v8/tools/gyp/v8.gyp | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/deps/v8/tools/gyp/v8.gyp b/deps/v8/tools/gyp/v8.gyp 
+index c703155..06c0b2b 100644
+--- a/deps/v8/tools/gyp/v8.gyp
++++ b/deps/v8/tools/gyp/v8.gyp
+@@ -1696,14 +1696,14 @@
+                       '<(PRODUCT_DIR)/natives_blob_host.bin',
+                     ],
+                     'action': [
+-                      'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob_host.bin'
++                      '<(python)', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob_host.bin'
+                     ],
+                   }, {
+                     'outputs': [
+                       '<(PRODUCT_DIR)/natives_blob.bin',
+                     ],
+                     'action': [
+-                      'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob.bin'
++                      '<(python)', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob.bin'
+                     ],
+                   }],
+                 ],
+@@ -1712,7 +1712,7 @@
+                   '<(PRODUCT_DIR)/natives_blob.bin',
+                 ],
+                 'action': [
+-                  'python', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob.bin'
++                  '<(python)', '<@(_inputs)', '<(PRODUCT_DIR)/natives_blob.bin'
+                 ],
+               }],
+             ],
+@@ -1812,7 +1812,7 @@
+             '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
+           ],
+           'action': [
+-            'python',
++            '<(python)',
+             '../../tools/js2c.py',
+             '<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
+             'CORE',
+@@ -1838,7 +1838,7 @@
+             '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
+           ],
+           'action': [
+-            'python',
++            '<(python)',
+             '../../tools/js2c.py',
+             '<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
+             'EXPERIMENTAL',
+@@ -1863,7 +1863,7 @@
+             '<(SHARED_INTERMEDIATE_DIR)/extras-libraries.cc',
+           ],
+           'action': [
+-            'python',
++            '<(python)',
+             '../../tools/js2c.py',
+             '<(SHARED_INTERMEDIATE_DIR)/extras-libraries.cc',
+             'EXTRAS',
+@@ -1900,7 +1900,7 @@
+               '<(SHARED_INTERMEDIATE_DIR)/debug-support.cc',
+             ],
+             'action': [
+-              'python',
++              '<(python)',
+               '../../tools/gen-postmortem-metadata.py',
+               '<@(_outputs)',
+               '<@(heapobject_files)'
package/nodejs/4.1.2/0004-fix-arm-vfpv2.patch new file +18 -0
new file mode 100644
index 0000000..b753dfe
@@ -0,0 +1,18 @@
+configure: fix ARM VFPv2
+
+The gcc -mfpu flag for VFPv2 is 'vfp', not 'vfpv2'.
+
+Signed-off-by: "Yann E. MORIN" <[email protected]>
+
+diff -durN a/configure b/configure
+--- a/configure
++++ b/configure
+@@ -611,7 +611,7 @@
+     o['variables']['arm_fpu'] = 'vfpv3'
+     o['variables']['arm_version'] = '7'
+   else:
+-    o['variables']['arm_fpu'] = 'vfpv2'
++    o['variables']['arm_fpu'] = 'vfp'
+     o['variables']['arm_version'] = '6' if is_arch_armv6() else 'default'
+
+   o['variables']['arm_thumb'] = 0      # -marm
package/nodejs/Config.in index renamed from package/nodejs/Config.in +0 -0

034557b..5128901 100644

package/nodejs/Config.in +11 -1
@@ -37,7 +37,7 @@ config BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS
 choice
        prompt "Node.js version"
        default BR2_BR2_PACKAGE_NODEJS_0_10_X if BR2_ARM_CPU_ARMV5
-       default BR2_BR2_PACKAGE_NODEJS_0_12_X
+       default BR2_BR2_PACKAGE_NODEJS_4_X
        help
          Select the version of Node.js you wish to use.
 
@@ -48,12 +48,22 @@ config BR2_BR2_PACKAGE_NODEJS_0_12_X
        bool "v0.12.7"
        depends on BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS
 
+config BR2_BR2_PACKAGE_NODEJS_4_X
+       bool "v4.1.2"
+       depends on BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS
+       depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+
+comment "v4.1.2 needs a toolchain w/ gcc >= 4.8"
+       depends on BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS
+       depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+
 endchoice
 
 config BR2_PACKAGE_NODEJS_VERSION_STRING
        string
        default "0.10.40"       if BR2_BR2_PACKAGE_NODEJS_0_10_X
        default "0.12.7"        if BR2_BR2_PACKAGE_NODEJS_0_12_X
+       default "4.1.2"         if BR2_BR2_PACKAGE_NODEJS_4_X
 
 menu "Module Selection"
 
package/nodejs/nodejs.hash +0 -0
index 9be2806..ab506df 100644
@@ -3,3 +3,6 @@ sha256  

bae79c2fd959aebe1629af36077bebbb760128db753da226d2344cd91499149f node-v0

# From upstream URL: http://nodejs.org/dist/v0.12.7/SHASUMS256.txt
sha256
b23d64df051c9c969b0c583f802d5d71de342e53067127a5061415be7e12f39d node-v0.12.7.tar.gz

package/nodejs/nodejs.hash +5 -0
+
+# From upstream URL: http://nodejs.org/dist/v4.1.2/SHASUMS256.txt
+sha256  
+443c8251e812b1f2c4b3e9152a47df23c55567ade739e017e2c0ca0869b71e74  
+node-v4.1.2.tar.xz
package/nodejs/nodejs.mk index renamed from package/nodejs/nodejs.mk +0 -0

414f3f3..099b3f0 100644

package/nodejs/nodejs.mk +3 -1
@@ -5,7 +5,11 @@
 
 ######################################################################
 ##########
 
 NODEJS_VERSION = $(call qstrip,$(BR2_PACKAGE_NODEJS_VERSION_STRING))
+ifeq ($(BR2_BR2_PACKAGE_NODEJS_4_X),y) NODEJS_SOURCE = 
+node-v$(NODEJS_VERSION).tar.xz else
 NODEJS_SOURCE = node-v$(NODEJS_VERSION).tar.gz
+endif
 NODEJS_SITE = http://nodejs.org/dist/v$(NODEJS_VERSION)
 NODEJS_DEPENDENCIES = host-python host-nodejs zlib \
        $(call qstrip,$(BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL_DEPS))
--
Quoted 2 lines

1.9.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#5 lore raw

PATCH v3 2/2 package/nodejs: add version 4.1.2

In reply to Martin Bark

Martin, All,

On 2015-10-20 09:25 +0100, Martin Bark spake thusly:

Quoted 2 lines

Great work on the patch set. Unfortunately i just checked and node.js 4.2.1 is the current release so i think this patch set needs updating.

Have you read what I wrote in my cover-letter:
http://lists.busybox.net/pipermail/buildroot/2015-October/142440.html

Note that in the meantime, nodejs has also released a newer version, 4.2.0 and then a day later 4.2.1 (because big problem?). There's nothing new since 4.2.1, but it is still only a week old, so I'd wait a bit to see if they spit out yet another bug-fix release for 4.2.x shortly...

So... ;-)

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#6 lore raw

PATCH v3 2/2 package/nodejs: add version 4.1.2

Yann,

Quoted 9 lines · Yann E. MORIN

Martin, All,

On 2015-10-20 09:25 +0100, Martin Bark spake thusly:

Quoted 2 lines

Great work on the patch set. Unfortunately i just checked and node.js 4.2.1 is the current release so i think this patch set needs updating.

Have you read what I wrote in my cover-letter:
http://lists.busybox.net/pipermail/buildroot/2015-October/142440.html

Quoted 6 lines

Note that in the meantime, nodejs has also released a newer version, 4.2.0 and then a day later 4.2.1 (because big problem?). There's nothing new since 4.2.1, but it is still only a week old, so I'd wait a bit to see if they spit out yet another bug-fix release for 4.2.x shortly...

So... ;-)

Ah, i missed that, oops.

Thanks

Martin

Quoted 11 lines

Regards,
Yann E. MORIN.

--
.-----------------.--------------------.------------------.--------------------.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

'------------------------------^-------^------------------^--------------------'

#7 lore raw

PATCH v3 2/2 package/nodejs: add version 4.1.2

Hi all,

Can somebody please add the following (might not be completely right, that's why I post it like this):

[jaap at jaap /data/work/zupr/git/buildroot ]$ git diff

package/nodejs/Config.in +1 -1
index 5128901..8d0ecad 100644
@@ -32,7 +32,7 @@ config BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS
        # On supported architectures other than ARM, no special requirement
        default y if !BR2_arm
        # On ARM, at least ARMv6+ with VFPv2+ is needed
-       default y if !BR2_ARM_CPU_ARMV5 && BR2_ARM_CPU_HAS_VFPV2
+	default y if !BR2_ARM_CPU_ARMV5 && BR2_ARM_CPU_HAS_VFPV2 || BR2_ARM_CPU_HAS_NEON
 
 choice
        prompt "Node.js version"

[jaap at jaap /data/work/zupr/git/buildroot ]$

To my oppinion Neon is a VFPv2 succesor. NodeJS builds and runs fine with Neon selected instead of VFPv2 for Cortex-A9.

Kind regards,

Jaap Crezee

#8 lore raw

PATCH v3 2/2 package/nodejs: add version 4.1.2

Quoted 22 lines · Jaap Crezee

Hi all,

Can somebody please add the following (might not be completely right, that's why I post it like this):

[jaap at jaap /data/work/zupr/git/buildroot ]$ git diff

package/nodejs/Config.in +1 -1
index 5128901..8d0ecad 100644
@@ -32,7 +32,7 @@ config BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS
        # On supported architectures other than ARM, no special requirement
        default y if !BR2_arm
        # On ARM, at least ARMv6+ with VFPv2+ is needed
-       default y if !BR2_ARM_CPU_ARMV5 && BR2_ARM_CPU_HAS_VFPV2
+	default y if !BR2_ARM_CPU_ARMV5 && BR2_ARM_CPU_HAS_VFPV2 || BR2_ARM_CPU_HAS_NEON
 
 choice
        prompt "Node.js version"

[jaap at jaap /data/work/zupr/git/buildroot ]$

Quoted 2 lines

To my oppinion Neon is a VFPv2 succesor. NodeJS builds and runs fine with Neon selected instead of VFPv2 for Cortex-A9.

You have a good point. I don't think it's possible to have a NEON core without
VFP floating point unit. Hm, looking at [1], NEON and FPU are independently optional, so theoretically you could have a Cortex-A9 with one but not the other. But that probably doesn't exist in practice (in fact, we don't know any Cortex-A9 that doesn't have both).

However, I think it should be fixed in Config.in.arm instead. Basically,
whenever NEON is selected, the VFP's 'maybe' should be converted into a 'has'. So something like

arch/Config.in.arm +2 -0
@@ -244,6 +244,9 @@ config BR2_ARM_ENABLE_NEON
        bool "Enable NEON SIMD extension support"
        depends on BR2_ARM_CPU_MAYBE_HAS_NEON
        select BR2_ARM_CPU_HAS_NEON
+       select BR2_ARM_CPU_HAS_VFPV3 if BR2_ARM_CPU_MAYBE_HAS_VFPV3
+       select BR2_ARM_CPU_HAS_VFPV4 if BR2_ARM_CPU_MAYBE_HAS_VFPV4
        help
          For some CPU cores, the NEON SIMD extension is optional.
          Select this option if you are certain your particular

(Note that the VFPv2 cores never have NEON - at least as far as I know. Checked
arm.com and that seems to be correct.)

However, when you look at it like that, the option is not named correctly. What
the option is really about is specifying that the optional floating point/NEON unit is indeed present.

Alternatively, if we really do want to support the case where only one of NEON
and VFPv3/4 is present, we should have a separate option similar to BR2_ARM_ENABLE_NEON to enable the FPU. And in that case, of course, all the MAYBEs should be removed from the Floating point strategy choice.

Regards,
Arnout

[1] http://www.arm.com/products/processors/cortex-a/cortex-a9.php

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#9 lore raw

PATCH v3 2/2 package/nodejs: add version 4.1.2

On 11/22/15 01:16, Arnout Vandecappelle wrote:

Thanks for your follow up!

Quoted 5 lines

You have a good point. I don't think it's possible to have a NEON core without
VFP floating point unit. Hm, looking at [1], NEON and FPU are independently optional, so theoretically you could have a Cortex-A9 with one but not the other. But that probably doesn't exist in practice (in fact, we don't know any Cortex-A9 that doesn't have both).

You are right, I dived further into it:

http://www.arm.com/cortex-a9.php

Advanced SIMD NEON? unit (Optional)

and

Cortex-A9 Floating-Point Unit (FPU)
(Optional)

But... as you also state, I have never seen any Cortex-A8 or higher witout a VFP-unit. Anyone? Because that's stupid of me, but I advise clients about (TI though) Cortex-A8 and higher in always having a VFP unit...

Quoted 17 lines

However, I think it should be fixed in Config.in.arm instead. Basically,
whenever NEON is selected, the VFP's 'maybe' should be converted into a 'has'. So something like

arch/Config.in.arm +2 -0
@@ -244,6 +244,9 @@ config BR2_ARM_ENABLE_NEON
        bool "Enable NEON SIMD extension support"
        depends on BR2_ARM_CPU_MAYBE_HAS_NEON
        select BR2_ARM_CPU_HAS_NEON
+       select BR2_ARM_CPU_HAS_VFPV3 if BR2_ARM_CPU_MAYBE_HAS_VFPV3
+       select BR2_ARM_CPU_HAS_VFPV4 if BR2_ARM_CPU_MAYBE_HAS_VFPV4
        help
          For some CPU cores, the NEON SIMD extension is optional.
          Select this option if you are certain your particular
 
 (Note that the VFPv2 cores never have NEON - at least as far as I know. Checked
Quoted 1 line

arm.com and that seems to be correct.)

Agree. I see the compiler being called with -mfpmath=neon (or something alike) so it seems to be working next to VFPv2.

Quoted 3 lines

However, when you look at it like that, the option is not named correctly. What
the option is really about is specifying that the optional floating point/NEON unit is indeed present.

Here you have a good point.

Quoted 4 lines

Alternatively, if we really do want to support the case where only one of NEON
and VFPv3/4 is present, we should have a separate option similar to BR2_ARM_ENABLE_NEON to enable the FPU. And in that case, of course, all the MAYBEs should be removed from the Floating point strategy choice.

Anyone has more available time than me to look into patching this? Would be greatly appreciated; would be using this for various customers of mine...

See http://www.arm.com/Cortex-A9-chip-diagram-LG.png also.

regards,

Jaap Crezee

#10 lore raw

PATCH v3 2/2 package/nodejs: add version 4.1.2

In reply to Arnout Vandecappelle

Jaap, Arnout, All,

Quoted 7 lines · Arnout Vandecappelle
Quoted 6 lines · Jaap Crezee

Hi all,

Can somebody please add the following (might not be completely right, that's why I post it like this):

Quoted 11 lines

package/nodejs/Config.in config BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS · line 35

Quoted 11 lines

[jaap at jaap /data/work/zupr/git/buildroot ]$ git diff

package/nodejs/Config.in +1 -1
index 5128901..8d0ecad 100644
@@ -32,7 +32,7 @@ config BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS
        # On supported architectures other than ARM, no special requirement
        default y if !BR2_arm
        # On ARM, at least ARMv6+ with VFPv2+ is needed
-       default y if !BR2_ARM_CPU_ARMV5 && BR2_ARM_CPU_HAS_VFPV2
+     default y if !BR2_ARM_CPU_ARMV5 && BR2_ARM_CPU_HAS_VFPV2 || BR2_ARM_CPU_HAS_NEON

I was just about to submit a patch to bump node.js to v4.2.2. In v4.2.2 there is now a new --with-arm-fpu configure option (see
https://github.com/nodejs/node/commit/17665af) which allows us to set the fpu to one of vfpv2, vfpv3, vfpv3-d16 or neon. Perhaps with this change it makes sense to have the || BR2_ARM_CPU_HAS_NEON since this is what the configure script will allow.

The node.js Config.in is trying to say at a minimum we need vfpv2 i.e. it wants this

        default y if !BR2_ARM_CPU_ARMV5 && BR2_ARM_CPU_HAS_AT_LEAST_VFPV2
Quoted 31 lines
Quoted 7 lines
package/nodejs/Config.in +0 -0
 choice
        prompt "Node.js version"

[jaap at jaap /data/work/zupr/git/buildroot ]$

To my oppinion Neon is a VFPv2 succesor. NodeJS builds and runs fine with Neon selected instead of VFPv2 for Cortex-A9.

You have a good point. I don't think it's possible to have a NEON core without
VFP floating point unit. Hm, looking at [1], NEON and FPU are independently optional, so theoretically you could have a Cortex-A9 with one but not the other. But that probably doesn't exist in practice (in fact, we don't know any Cortex-A9 that doesn't have both).

However, I think it should be fixed in Config.in.arm instead. Basically,
whenever NEON is selected, the VFP's 'maybe' should be converted into a 'has'. So something like

arch/Config.in.arm +2 -0
@@ -244,6 +244,9 @@ config BR2_ARM_ENABLE_NEON
        bool "Enable NEON SIMD extension support"
        depends on BR2_ARM_CPU_MAYBE_HAS_NEON
        select BR2_ARM_CPU_HAS_NEON
+       select BR2_ARM_CPU_HAS_VFPV3 if BR2_ARM_CPU_MAYBE_HAS_VFPV3
+       select BR2_ARM_CPU_HAS_VFPV4 if BR2_ARM_CPU_MAYBE_HAS_VFPV4
        help
          For some CPU cores, the NEON SIMD extension is optional.
          Select this option if you are certain your particular
 
 (Note that the VFPv2 cores never have NEON - at least as far as I know. Checked
Quoted 1 line

arm.com and that seems to be correct.)

The need for at least vfpv2 comes from googles v8 javascript engine that node.js uses. I found this comment in the V8 code
https://github.com/nodejs/node/blob/master/deps/v8/src/base/cpu.cc#L526-L529
which says
" ... neon is only available on architectures with vfpv3." and "... it is possible to have neon without vfp" which seems to make sense.

Thanks

Martin

Quoted 23 lines

However, when you look at it like that, the option is not named correctly. What
the option is really about is specifying that the optional floating point/NEON unit is indeed present.

Alternatively, if we really do want to support the case where only one of NEON
and VFPv3/4 is present, we should have a separate option similar to BR2_ARM_ENABLE_NEON to enable the FPU. And in that case, of course, all the MAYBEs should be removed from the Floating point strategy choice.

Regards,
Arnout

[1] http://www.arm.com/products/processors/cortex-a/cortex-a9.php
--

Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#11 lore raw

v3 cover package/nodejs: bump version (branch yem/node)

In reply to Yann E. MORIN

Dear Yann E. MORIN,

Quoted 3 lines · Yann E. MORIN

Yann E. MORIN (2):
package/nodejs: fix architectural dependencies on ARM package/nodejs: add version 4.1.2

Applied, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com