nodejs: build for the right MIPS architecture variant
authorVicente Olivert Riera <Vincent.Riera@imgtec.com>
Tue, 8 Dec 2015 14:24:47 +0000 (14:24 +0000)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 12 Dec 2015 17:25:01 +0000 (18:25 +0100)
Fixes:

  http://autobuild.buildroot.net/results/faa/faae16b543e146b230256d7653d181fb895c83fc/

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/nodejs/nodejs.mk

index edf8bac98360f589b2ff829a70b8524b8d2a4228..7ede89d2f14db7141f50910c2776925acf2528f3 100644 (file)
@@ -66,6 +66,18 @@ NODEJS_CPU = arm
 NODEJS_ARM_FP = $(call qstrip,$(BR2_GCC_TARGET_FLOAT_ABI))
 endif
 
+# MIPS architecture specific options
+ifeq ($(BR2_mips)$(BR2_mipsel),y)
+ifeq ($(BR2_mips_32r6),y)
+NODEJS_MIPS_ARCH_VARIANT = r6
+NODEJS_MIPS_FPU_MODE = fp64
+else ifeq ($(BR2_mips_32r2),y)
+NODEJS_MIPS_ARCH_VARIANT = r2
+else ifeq ($(BR2_mips_32),y)
+NODEJS_MIPS_ARCH_VARIANT = r1
+endif
+endif
+
 define NODEJS_CONFIGURE_CMDS
        (cd $(@D); \
                $(TARGET_CONFIGURE_OPTS) \
@@ -81,6 +93,8 @@ define NODEJS_CONFIGURE_CMDS
                --without-etw \
                --dest-cpu=$(NODEJS_CPU) \
                $(if $(NODEJS_ARM_FP),--with-arm-float-abi=$(NODEJS_ARM_FP)) \
+               $(if $(NODEJS_MIPS_ARCH_VARIANT),--with-mips-arch-variant=$(NODEJS_MIPS_ARCH_VARIANT)) \
+               $(if $(NODEJS_MIPS_FPU_MODE),--with-mips-fpu-mode=$(NODEJS_MIPS_FPU_MODE)) \
                --dest-os=linux \
        )
 endef