Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/2 v3] package/nodejs: bump version (branch yem/node)
@ 2015-10-19 21:59 Yann E. MORIN
  2015-10-19 21:59 ` [Buildroot] [PATCH 1/2 v3] package/nodejs: fix architectural dependencies on ARM Yann E. MORIN
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Yann E. MORIN @ 2015-10-19 21:59 UTC (permalink / raw)
  To: buildroot

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

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 1/2 v3] package/nodejs: fix architectural dependencies on ARM
  2015-10-19 21:59 [Buildroot] [PATCH 0/2 v3] package/nodejs: bump version (branch yem/node) Yann E. MORIN
@ 2015-10-19 21:59 ` Yann E. MORIN
  2015-10-19 21:59 ` [Buildroot] [PATCH 2/2 v3] package/nodejs: add version 4.1.2 Yann E. MORIN
  2015-10-20  8:02 ` [Buildroot] [PATCH 0/2 v3] package/nodejs: bump version (branch yem/node) Thomas Petazzoni
  2 siblings, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2015-10-19 21:59 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: J?rg Krause <joerg.krause@embedded.rocks>
Cc: Martin Bark <martin@barkynet.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

---
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(-)

diff --git a/package/nodejs/Config.in b/package/nodejs/Config.in
index 329d270..034557b 100644
--- a/package/nodejs/Config.in
+++ b/package/nodejs/Config.in
@@ -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
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 2/2 v3] package/nodejs: add version 4.1.2
  2015-10-19 21:59 [Buildroot] [PATCH 0/2 v3] package/nodejs: bump version (branch yem/node) Yann E. MORIN
  2015-10-19 21:59 ` [Buildroot] [PATCH 1/2 v3] package/nodejs: fix architectural dependencies on ARM Yann E. MORIN
@ 2015-10-19 21:59 ` Yann E. MORIN
  2015-10-20  8:25   ` Martin Bark
  2015-10-20  8:02 ` [Buildroot] [PATCH 0/2 v3] package/nodejs: bump version (branch yem/node) Thomas Petazzoni
  2 siblings, 1 reply; 12+ messages in thread
From: Yann E. MORIN @ 2015-10-19 21:59 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: J?rg Krause <joerg.krause@embedded.rocks>
Cc: Martin Bark <martin@barkynet.com>
Cc: Jaap Crezee <jaap@jcz.nl>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

---
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

diff --git a/package/nodejs/4.1.2/0001-Remove-dependency-on-Python-bz2-module.patch b/package/nodejs/4.1.2/0001-Remove-dependency-on-Python-bz2-module.patch
new file mode 100644
index 0000000..65bceef
--- /dev/null
+++ b/package/nodejs/4.1.2/0001-Remove-dependency-on-Python-bz2-module.patch
@@ -0,0 +1,31 @@
+From 3d4817c152d6f3afddcc699949c4d1664da91e2b Mon Sep 17 00:00:00 2001
+From: Martin Bark <martin@barkynet.com>
+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 <thomas.petazzoni@free-electrons.com>
+[Martin: adapt to 0.12.5]
+Signed-off-by: Martin Bark <martin@barkynet.com>
+[yann.morin.1998 at free.fr: adapt to 4.1.2]
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+---
+ 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
+
diff --git 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
--- /dev/null
+++ b/package/nodejs/4.1.2/0002-gyp-force-link-command-to-use-CXX.patch
@@ -0,0 +1,29 @@
+From 90a3c113c19ec615249ab880c45c6c0a8d369098 Mon Sep 17 00:00:00 2001
+From: Martin Bark <martin@barkynet.com>
+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 <s.martin49@gmail.com>
+Signed-off-by: Martin Bark <martin@barkynet.com>
+[yann.morin.1998 at free.fr: adapt to 4.1.2]
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+---
+ 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
+
diff --git a/package/nodejs/4.1.2/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch b/package/nodejs/4.1.2/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch
new file mode 100644
index 0000000..2e266af
--- /dev/null
+++ b/package/nodejs/4.1.2/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch
@@ -0,0 +1,88 @@
+From 4a48c65921b0f05b621aef5b902b6aa54811ad7a Mon Sep 17 00:00:00 2001
+From: Martin Bark <martin@barkynet.com>
+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 <thomas.petazzoni@free-electrons.com>
+[Martin: adapt to 0.12.5]
+Signed-off-by: Martin Bark <martin@barkynet.com>
+[yann.morin.1998 at free.fr: adapat to 4.1.2]
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+---
+ 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)'
diff --git a/package/nodejs/4.1.2/0004-fix-arm-vfpv2.patch b/package/nodejs/4.1.2/0004-fix-arm-vfpv2.patch
new file mode 100644
index 0000000..b753dfe
--- /dev/null
+++ b/package/nodejs/4.1.2/0004-fix-arm-vfpv2.patch
@@ -0,0 +1,18 @@
+configure: fix ARM VFPv2
+
+The gcc -mfpu flag for VFPv2 is 'vfp', not 'vfpv2'.
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+
+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
diff --git a/package/nodejs/Config.in b/package/nodejs/Config.in
index 034557b..5128901 100644
--- a/package/nodejs/Config.in
+++ b/package/nodejs/Config.in
@@ -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"
 
diff --git a/package/nodejs/nodejs.hash b/package/nodejs/nodejs.hash
index 9be2806..ab506df 100644
--- a/package/nodejs/nodejs.hash
+++ b/package/nodejs/nodejs.hash
@@ -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
diff --git a/package/nodejs/nodejs.mk b/package/nodejs/nodejs.mk
index 414f3f3..099b3f0 100644
--- a/package/nodejs/nodejs.mk
+++ b/package/nodejs/nodejs.mk
@@ -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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 0/2 v3] package/nodejs: bump version (branch yem/node)
  2015-10-19 21:59 [Buildroot] [PATCH 0/2 v3] package/nodejs: bump version (branch yem/node) Yann E. MORIN
  2015-10-19 21:59 ` [Buildroot] [PATCH 1/2 v3] package/nodejs: fix architectural dependencies on ARM Yann E. MORIN
  2015-10-19 21:59 ` [Buildroot] [PATCH 2/2 v3] package/nodejs: add version 4.1.2 Yann E. MORIN
@ 2015-10-20  8:02 ` Thomas Petazzoni
  2 siblings, 0 replies; 12+ messages in thread
From: Thomas Petazzoni @ 2015-10-20  8:02 UTC (permalink / raw)
  To: buildroot

Dear Yann E. MORIN,

On Mon, 19 Oct 2015 23:59:04 +0200, Yann E. MORIN wrote:

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

Applied, thanks.

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 2/2 v3] package/nodejs: add version 4.1.2
  2015-10-19 21:59 ` [Buildroot] [PATCH 2/2 v3] package/nodejs: add version 4.1.2 Yann E. MORIN
@ 2015-10-20  8:25   ` Martin Bark
  2015-10-20  9:01     ` Richard Chapman
  2015-10-20 16:25     ` Yann E. MORIN
  0 siblings, 2 replies; 12+ messages in thread
From: Martin Bark @ 2015-10-20  8:25 UTC (permalink / raw)
  To: buildroot

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

On 19 October 2015 at 22:59, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> 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.
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: J?rg Krause <joerg.krause@embedded.rocks>
> Cc: Martin Bark <martin@barkynet.com>
> Cc: Jaap Crezee <jaap@jcz.nl>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>
> ---
> 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
>
> diff --git a/package/nodejs/4.1.2/0001-Remove-dependency-on-Python-bz2-module.patch b/package/nodejs/4.1.2/0001-Remove-dependency-on-Python-bz2-module.patch
> new file mode 100644
> index 0000000..65bceef
> --- /dev/null
> +++ b/package/nodejs/4.1.2/0001-Remove-dependency-on-Python-bz2-module.patch
> @@ -0,0 +1,31 @@
> +From 3d4817c152d6f3afddcc699949c4d1664da91e2b Mon Sep 17 00:00:00 2001
> +From: Martin Bark <martin@barkynet.com>
> +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 <thomas.petazzoni@free-electrons.com>
> +[Martin: adapt to 0.12.5]
> +Signed-off-by: Martin Bark <martin@barkynet.com>
> +[yann.morin.1998 at free.fr: adapt to 4.1.2]
> +Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> +---
> + 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
> +
> diff --git 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
> --- /dev/null
> +++ b/package/nodejs/4.1.2/0002-gyp-force-link-command-to-use-CXX.patch
> @@ -0,0 +1,29 @@
> +From 90a3c113c19ec615249ab880c45c6c0a8d369098 Mon Sep 17 00:00:00 2001
> +From: Martin Bark <martin@barkynet.com>
> +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 <s.martin49@gmail.com>
> +Signed-off-by: Martin Bark <martin@barkynet.com>
> +[yann.morin.1998 at free.fr: adapt to 4.1.2]
> +Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> +---
> + 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
> +
> diff --git a/package/nodejs/4.1.2/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch b/package/nodejs/4.1.2/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch
> new file mode 100644
> index 0000000..2e266af
> --- /dev/null
> +++ b/package/nodejs/4.1.2/0003-Use-a-python-variable-instead-of-hardcoding-Python.patch
> @@ -0,0 +1,88 @@
> +From 4a48c65921b0f05b621aef5b902b6aa54811ad7a Mon Sep 17 00:00:00 2001
> +From: Martin Bark <martin@barkynet.com>
> +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 <thomas.petazzoni@free-electrons.com>
> +[Martin: adapt to 0.12.5]
> +Signed-off-by: Martin Bark <martin@barkynet.com>
> +[yann.morin.1998 at free.fr: adapat to 4.1.2]
> +Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> +---
> + 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)'
> diff --git a/package/nodejs/4.1.2/0004-fix-arm-vfpv2.patch b/package/nodejs/4.1.2/0004-fix-arm-vfpv2.patch
> new file mode 100644
> index 0000000..b753dfe
> --- /dev/null
> +++ b/package/nodejs/4.1.2/0004-fix-arm-vfpv2.patch
> @@ -0,0 +1,18 @@
> +configure: fix ARM VFPv2
> +
> +The gcc -mfpu flag for VFPv2 is 'vfp', not 'vfpv2'.
> +
> +Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> +
> +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
> diff --git a/package/nodejs/Config.in b/package/nodejs/Config.in
> index 034557b..5128901 100644
> --- a/package/nodejs/Config.in
> +++ b/package/nodejs/Config.in
> @@ -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"
>
> diff --git a/package/nodejs/nodejs.hash b/package/nodejs/nodejs.hash
> index 9be2806..ab506df 100644
> --- a/package/nodejs/nodejs.hash
> +++ b/package/nodejs/nodejs.hash
> @@ -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
> diff --git a/package/nodejs/nodejs.mk b/package/nodejs/nodejs.mk
> index 414f3f3..099b3f0 100644
> --- a/package/nodejs/nodejs.mk
> +++ b/package/nodejs/nodejs.mk
> @@ -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
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 2/2 v3] package/nodejs: add version 4.1.2
  2015-10-20  8:25   ` Martin Bark
@ 2015-10-20  9:01     ` Richard Chapman
  2015-10-20 16:25     ` Yann E. MORIN
  1 sibling, 0 replies; 12+ messages in thread
From: Richard Chapman @ 2015-10-20  9:01 UTC (permalink / raw)
  To: buildroot

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 <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>; 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

On 19 October 2015 at 22:59, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> 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.
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: J?rg Krause <joerg.krause@embedded.rocks>
> Cc: Martin Bark <martin@barkynet.com>
> Cc: Jaap Crezee <jaap@jcz.nl>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>
> ---
> 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
>
> diff --git 
> 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
> --- /dev/null
> +++ b/package/nodejs/4.1.2/0001-Remove-dependency-on-Python-bz2-module
> +++ .patch
> @@ -0,0 +1,31 @@
> +From 3d4817c152d6f3afddcc699949c4d1664da91e2b Mon Sep 17 00:00:00 
> +2001
> +From: Martin Bark <martin@barkynet.com>
> +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 <thomas.petazzoni@free-electrons.com>
> +[Martin: adapt to 0.12.5]
> +Signed-off-by: Martin Bark <martin@barkynet.com>
> +[yann.morin.1998 at free.fr: adapt to 4.1.2]
> +Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> +---
> + 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
> +
> diff --git 
> 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
> --- /dev/null
> +++ b/package/nodejs/4.1.2/0002-gyp-force-link-command-to-use-CXX.patc
> +++ h
> @@ -0,0 +1,29 @@
> +From 90a3c113c19ec615249ab880c45c6c0a8d369098 Mon Sep 17 00:00:00 
> +2001
> +From: Martin Bark <martin@barkynet.com>
> +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 <s.martin49@gmail.com>
> +Signed-off-by: Martin Bark <martin@barkynet.com>
> +[yann.morin.1998 at free.fr: adapt to 4.1.2]
> +Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> +---
> + 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
> +
> diff --git 
> 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
> --- /dev/null
> +++ b/package/nodejs/4.1.2/0003-Use-a-python-variable-instead-of-hardc
> +++ oding-Python.patch
> @@ -0,0 +1,88 @@
> +From 4a48c65921b0f05b621aef5b902b6aa54811ad7a Mon Sep 17 00:00:00 
> +2001
> +From: Martin Bark <martin@barkynet.com>
> +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 <thomas.petazzoni@free-electrons.com>
> +[Martin: adapt to 0.12.5]
> +Signed-off-by: Martin Bark <martin@barkynet.com>
> +[yann.morin.1998 at free.fr: adapat to 4.1.2]
> +Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> +---
> + 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)'
> diff --git a/package/nodejs/4.1.2/0004-fix-arm-vfpv2.patch 
> b/package/nodejs/4.1.2/0004-fix-arm-vfpv2.patch
> new file mode 100644
> index 0000000..b753dfe
> --- /dev/null
> +++ b/package/nodejs/4.1.2/0004-fix-arm-vfpv2.patch
> @@ -0,0 +1,18 @@
> +configure: fix ARM VFPv2
> +
> +The gcc -mfpu flag for VFPv2 is 'vfp', not 'vfpv2'.
> +
> +Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> +
> +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
> diff --git a/package/nodejs/Config.in b/package/nodejs/Config.in index 
> 034557b..5128901 100644
> --- a/package/nodejs/Config.in
> +++ b/package/nodejs/Config.in
> @@ -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"
>
> diff --git a/package/nodejs/nodejs.hash b/package/nodejs/nodejs.hash 
> index 9be2806..ab506df 100644
> --- a/package/nodejs/nodejs.hash
> +++ b/package/nodejs/nodejs.hash
> @@ -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
> diff --git a/package/nodejs/nodejs.mk b/package/nodejs/nodejs.mk index 
> 414f3f3..099b3f0 100644
> --- a/package/nodejs/nodejs.mk
> +++ b/package/nodejs/nodejs.mk
> @@ -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
>
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 2/2 v3] package/nodejs: add version 4.1.2
  2015-10-20  8:25   ` Martin Bark
  2015-10-20  9:01     ` Richard Chapman
@ 2015-10-20 16:25     ` Yann E. MORIN
  2015-10-20 16:32       ` Martin Bark
  1 sibling, 1 reply; 12+ messages in thread
From: Yann E. MORIN @ 2015-10-20 16:25 UTC (permalink / raw)
  To: buildroot

Martin, All,

On 2015-10-20 09:25 +0100, Martin Bark spake thusly:
> 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.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 2/2 v3] package/nodejs: add version 4.1.2
  2015-10-20 16:25     ` Yann E. MORIN
@ 2015-10-20 16:32       ` Martin Bark
  2015-11-21 19:53         ` Jaap Crezee
  0 siblings, 1 reply; 12+ messages in thread
From: Martin Bark @ 2015-10-20 16:32 UTC (permalink / raw)
  To: buildroot

Yann,

On 20 October 2015 at 17:25, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> Martin, All,
>
> On 2015-10-20 09:25 +0100, Martin Bark spake thusly:
>> 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... ;-)

Ah, i missed that, oops.

Thanks

Martin

>
> 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.  |
> '------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 2/2 v3] package/nodejs: add version 4.1.2
  2015-10-20 16:32       ` Martin Bark
@ 2015-11-21 19:53         ` Jaap Crezee
  2015-11-22  0:16           ` Arnout Vandecappelle
  0 siblings, 1 reply; 12+ messages in thread
From: Jaap Crezee @ 2015-11-21 19:53 UTC (permalink / raw)
  To: buildroot

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
diff --git a/package/nodejs/Config.in b/package/nodejs/Config.in
index 5128901..8d0ecad 100644
--- a/package/nodejs/Config.in
+++ b/package/nodejs/Config.in
@@ -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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 2/2 v3] package/nodejs: add version 4.1.2
  2015-11-21 19:53         ` Jaap Crezee
@ 2015-11-22  0:16           ` Arnout Vandecappelle
  2015-11-22 12:42             ` Jaap Crezee
  2015-11-22 21:28             ` Martin Bark
  0 siblings, 2 replies; 12+ messages in thread
From: Arnout Vandecappelle @ 2015-11-22  0:16 UTC (permalink / raw)
  To: buildroot

On 21-11-15 20:53, Jaap Crezee wrote:
> 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
> diff --git a/package/nodejs/Config.in b/package/nodejs/Config.in
> index 5128901..8d0ecad 100644
> --- a/package/nodejs/Config.in
> +++ b/package/nodejs/Config.in
> @@ -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.

 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

--- a/arch/Config.in.arm
+++ b/arch/Config.in.arm
@@ -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
-- 
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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 2/2 v3] package/nodejs: add version 4.1.2
  2015-11-22  0:16           ` Arnout Vandecappelle
@ 2015-11-22 12:42             ` Jaap Crezee
  2015-11-22 21:28             ` Martin Bark
  1 sibling, 0 replies; 12+ messages in thread
From: Jaap Crezee @ 2015-11-22 12:42 UTC (permalink / raw)
  To: buildroot

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

Thanks for your follow up!

>  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...

>  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
> 
> --- a/arch/Config.in.arm
> +++ b/arch/Config.in.arm
> @@ -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.)

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

>  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.

>  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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 2/2 v3] package/nodejs: add version 4.1.2
  2015-11-22  0:16           ` Arnout Vandecappelle
  2015-11-22 12:42             ` Jaap Crezee
@ 2015-11-22 21:28             ` Martin Bark
  1 sibling, 0 replies; 12+ messages in thread
From: Martin Bark @ 2015-11-22 21:28 UTC (permalink / raw)
  To: buildroot

Jaap, Arnout, All,

On 22 November 2015 at 00:16, Arnout Vandecappelle <arnout@mind.be> wrote:
> On 21-11-15 20:53, Jaap Crezee wrote:
>> 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
>> diff --git a/package/nodejs/Config.in b/package/nodejs/Config.in
>> index 5128901..8d0ecad 100644
>> --- a/package/nodejs/Config.in
>> +++ b/package/nodejs/Config.in
>> @@ -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

>>
>>  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
>
> --- a/arch/Config.in.arm
> +++ b/arch/Config.in.arm
> @@ -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.)

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

>
>  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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-11-22 21:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-19 21:59 [Buildroot] [PATCH 0/2 v3] package/nodejs: bump version (branch yem/node) Yann E. MORIN
2015-10-19 21:59 ` [Buildroot] [PATCH 1/2 v3] package/nodejs: fix architectural dependencies on ARM Yann E. MORIN
2015-10-19 21:59 ` [Buildroot] [PATCH 2/2 v3] package/nodejs: add version 4.1.2 Yann E. MORIN
2015-10-20  8:25   ` Martin Bark
2015-10-20  9:01     ` Richard Chapman
2015-10-20 16:25     ` Yann E. MORIN
2015-10-20 16:32       ` Martin Bark
2015-11-21 19:53         ` Jaap Crezee
2015-11-22  0:16           ` Arnout Vandecappelle
2015-11-22 12:42             ` Jaap Crezee
2015-11-22 21:28             ` Martin Bark
2015-10-20  8:02 ` [Buildroot] [PATCH 0/2 v3] package/nodejs: bump version (branch yem/node) Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox