-
Notifications
You must be signed in to change notification settings - Fork 104
Open
Description
Due to a hardcoded gnu suffix, the node-ffi-napi package fails to compile for other targets than libc.
This could be resolved by using the $(TARGET_SUFFIX) variable, which resolves to gnu on platforms that use glibc and are not arm or armeb, but to e.g. muslgnueabi on a target platform using the musl libc library on arm or armeb.
diff --git a/node-ffi-napi/Makefile b/node-ffi-napi/Makefile
index cad3be7b..b3610937 100644
--- a/node-ffi-napi/Makefile
+++ b/node-ffi-napi/Makefile
@@ -44,7 +44,7 @@ NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst
TMPNPM:=$(shell mktemp -u XXXXXXXXXX)
NPM_CACHE_DIR:=$(if $(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(TMP_DIR))
-TARGET_CFLAGS+=$(FPIC) -I$(BUILD_DIR)/libffi-$(PKG_LIBFFI_VERSION)/$(GNU_TARGET_NAME)-gnu
+TARGET_CFLAGS+=$(FPIC) -I$(BUILD_DIR)/libffi-$(PKG_LIBFFI_VERSION)/$(GNU_TARGET_NAME)-$(TARGET_SUFFIX)
TARGET_CPPFLAGS+=$(FPIC)
define Build/Compile
Metadata
Metadata
Assignees
Labels
No labels