Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/1] package/nodejs: fix hard float error
@ 2015-01-12 20:52 Jörg Krause
  2015-01-12 21:18 ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: Jörg Krause @ 2015-01-12 20:52 UTC (permalink / raw)
  To: buildroot

Add support for building nodejs with hard floating ABI if supported by the
target and remove bogus comment. Buildroot does propose this tuning.

Basically, you have three cases of floating point strategies:

 * soft float, i.e 'soft' in nodejs speak. This is enabled in Buildroot
   when BR2_ARM_EABI=y and BR2_SOFT_FLOAT=y.

 * hard float using integer registers to pass floating point arguments,
   i.e 'softfp' in nodejs speak. This is enabled in Buildroot when
   BR2_ARM_EABI=y and BR2_SOFT_FLOAT is disabled.

 * hard float using floating pointer registers to pass floating point
   arguments, i.e 'hard' in nodejs speak. This is enabled in Buildroot
   when BR2_ARM_EABIHF=y.

This patch fixes "[Buildroot] Float error on SAMA5D3 Xplained using nodejs":
http://lists.busybox.net/pipermail/buildroot/2014-December/114254.html

Tested at run-time by me on a TI Beaglebone Black.

Signed-off-by: J?rg Krause <jkrause@posteo.de>
Reported-by: C?dric Heyman <c.heyman@til-technologies.fr>
Suggested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
Changes v1 -> v2:
  - simplify logic by using the floating point ABI value from
    BR2_GCC_TARGET_FLOAT_ABI (Thomas)
---
 package/nodejs/nodejs.mk | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/package/nodejs/nodejs.mk b/package/nodejs/nodejs.mk
index ad598d9..5f7d005 100644
--- a/package/nodejs/nodejs.mk
+++ b/package/nodejs/nodejs.mk
@@ -56,14 +56,8 @@ else ifeq ($(BR2_mipsel),y)
 NODEJS_CPU = mipsel
 else ifeq ($(BR2_arm),y)
 NODEJS_CPU = arm
-# V8 needs to know what floating point ABI the target is using.  There's also
-# a 'hard' option which we're not exposing here at the moment, because
-# buildroot itself doesn't really support it at present.
-ifeq ($(BR2_SOFT_FLOAT),y)
-NODEJS_ARM_FP = soft
-else
-NODEJS_ARM_FP = softfp
-endif
+# V8 needs to know what floating point ABI the target is using.
+NODEJS_ARM_FP = $(BR2_GCC_TARGET_FLOAT_ABI)
 endif
 
 define NODEJS_CONFIGURE_CMDS
-- 
2.2.1

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

* [Buildroot] [PATCH v2 1/1] package/nodejs: fix hard float error
  2015-01-12 20:52 [Buildroot] [PATCH v2 1/1] package/nodejs: fix hard float error Jörg Krause
@ 2015-01-12 21:18 ` Thomas Petazzoni
  2015-01-12 21:35   ` Jörg Krause
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2015-01-12 21:18 UTC (permalink / raw)
  To: buildroot

Dear J?rg Krause,

On Mon, 12 Jan 2015 21:52:01 +0100, J?rg Krause wrote:

> +# V8 needs to know what floating point ABI the target is using.
> +NODEJS_ARM_FP = $(BR2_GCC_TARGET_FLOAT_ABI)

Since this variable is a string, I've added a $(call qstrip,...), for
good measure. And then applied your patch, thanks!

Since you're looking at nodejs, can you have a look at the thread
http://lists.busybox.net/pipermail/buildroot/2014-November/112880.html
(which contains one patch), and send an updated patch series to make
the necessary modifications? They looked good in principle, but not
nicely separated in multiple patches.

Thanks a lot!

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

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

* [Buildroot] [PATCH v2 1/1] package/nodejs: fix hard float error
  2015-01-12 21:18 ` Thomas Petazzoni
@ 2015-01-12 21:35   ` Jörg Krause
  0 siblings, 0 replies; 3+ messages in thread
From: Jörg Krause @ 2015-01-12 21:35 UTC (permalink / raw)
  To: buildroot

Thomas,

On Mo, 2015-01-12 at 22:18 +0100, Thomas Petazzoni wrote:
> Dear J?rg Krause,
> 
> On Mon, 12 Jan 2015 21:52:01 +0100, J?rg Krause wrote:
> 
> > +# V8 needs to know what floating point ABI the target is using.
> > +NODEJS_ARM_FP = $(BR2_GCC_TARGET_FLOAT_ABI)
> 
> Since this variable is a string, I've added a $(call qstrip,...), for
> good measure. And then applied your patch, thanks!
> 
> Since you're looking at nodejs, can you have a look at the thread
> http://lists.busybox.net/pipermail/buildroot/2014-November/112880.html
> (which contains one patch), and send an updated patch series to make
> the necessary modifications? They looked good in principle, but not
> nicely separated in multiple patches.

I've already looked at this:
http://lists.busybox.net/pipermail/buildroot/2014-December/115275.html

In short:
  * newer npm is only installed as a module on the target, but not used
as the package manager for installing the node modules
  * I cannot find any resources about the npm options --target_arch and
--prefix

IMO, the only thing to think about is to use the -g option. This will
install also the binaries of node modules to usr/bin. But I've to check
this.

J?rg

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

end of thread, other threads:[~2015-01-12 21:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-12 20:52 [Buildroot] [PATCH v2 1/1] package/nodejs: fix hard float error Jörg Krause
2015-01-12 21:18 ` Thomas Petazzoni
2015-01-12 21:35   ` Jörg Krause

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