aboutsummaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorGravatar Martin Bark <martin@barkynet.com>2019-03-17 20:48:00 +0000
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2019-03-18 21:57:49 +0100
commit620038c1492311ce446d38d73318ef6b4ab8a7ba (patch)
tree423fb7c3f08e4b924de4439519fb31d1c93ca5c8 /package
parent30742cb4eee4510b803c53c7c12de31d8c256ad1 (diff)
downloadbuildroot-620038c1492311ce446d38d73318ef6b4ab8a7ba.tar.gz
buildroot-620038c1492311ce446d38d73318ef6b4ab8a7ba.tar.bz2
package/nodejs: link with libatomic when needed
Fixes: - http://autobuild.buildroot.net/results/804951467d3f5b212bd33b95dc8fe9c6f5f63838 Signed-off-by: Martin Bark <martin@barkynet.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'package')
-rw-r--r--package/nodejs/nodejs.mk10
1 files changed, 10 insertions, 0 deletions
diff --git a/package/nodejs/nodejs.mk b/package/nodejs/nodejs.mk
index 5cae449244..2577239e19 100644
--- a/package/nodejs/nodejs.mk
+++ b/package/nodejs/nodejs.mk
@@ -116,6 +116,12 @@ NODEJS_MIPS_ARCH_VARIANT = r1
endif
endif
+NODEJS_LDFLAGS = $(TARGET_LDFLAGS)
+
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+NODEJS_LDFLAGS += -latomic
+endif
+
define NODEJS_CONFIGURE_CMDS
mkdir -p $(@D)/bin
ln -sf $(HOST_DIR)/bin/python2 $(@D)/bin/python
@@ -123,6 +129,7 @@ define NODEJS_CONFIGURE_CMDS
(cd $(@D); \
$(TARGET_CONFIGURE_OPTS) \
PATH=$(@D)/bin:$(BR_PATH) \
+ LDFLAGS="$(NODEJS_LDFLAGS)" \
LD="$(TARGET_CXX)" \
PYTHON=$(HOST_DIR)/bin/python2 \
$(HOST_DIR)/bin/python2 ./configure \
@@ -145,6 +152,7 @@ define NODEJS_BUILD_CMDS
$(TARGET_CONFIGURE_OPTS) \
NO_LOAD=cctest.target.mk \
PATH=$(@D)/bin:$(BR_PATH) \
+ LDFLAGS="$(NODEJS_LDFLAGS)" \
LD="$(TARGET_CXX)"
endef
@@ -156,6 +164,7 @@ NODEJS_MODULES_LIST= $(call qstrip,\
# Define NPM for other packages to use
NPM = $(TARGET_CONFIGURE_OPTS) \
+ LDFLAGS="$(NODEJS_LDFLAGS)" \
LD="$(TARGET_CXX)" \
npm_config_arch=$(NODEJS_CPU) \
npm_config_target_arch=$(NODEJS_CPU) \
@@ -184,6 +193,7 @@ define NODEJS_INSTALL_TARGET_CMDS
$(TARGET_CONFIGURE_OPTS) \
NO_LOAD=cctest.target.mk \
PATH=$(@D)/bin:$(BR_PATH) \
+ LDFLAGS="$(NODEJS_LDFLAGS)" \
LD="$(TARGET_CXX)"
$(NODEJS_INSTALL_MODULES)
endef