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>
This commit is contained in:
Martin Bark 2019-03-17 20:48:00 +00:00 committed by Thomas Petazzoni
parent 30742cb4ee
commit 620038c149

View File

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