LIBNSS_LICENSE = MPL-2.0
LIBNSS_LICENSE_FILES = nss/COPYING
+# Need to pass down TARGET_CFLAGS and TARGET_LDFLAGS
+define LIBNSS_FIXUP_LINUX_MK
+ echo 'OS_CFLAGS += $(TARGET_CFLAGS)' >> $(@D)/nss/coreconf/Linux.mk
+ echo 'LDFLAGS += $(TARGET_LDFLAGS)' >> $(@D)/nss/coreconf/Linux.mk
+endef
+
+LIBNSS_PRE_CONFIGURE_HOOKS += LIBNSS_FIXUP_LINUX_MK
+
# --gc-sections triggers binutils ld segfault
# https://sourceware.org/bugzilla/show_bug.cgi?id=21180
ifeq ($(BR2_microblaze),y)
MOZILLA_CLIENT=1 \
NSPR_INCLUDE_DIR=$(STAGING_DIR)/usr/include/nspr \
NSPR_LIB_DIR=$(STAGING_DIR)/usr/lib \
- BUILD_OPT=1 \
NS_USE_GCC=1 \
NSS_DISABLE_GTESTS=1 \
NSS_USE_SYSTEM_SQLITE=1 \
NATIVE_CC="$(HOSTCC)" \
OS_ARCH="Linux" \
OS_RELEASE="2.6" \
- OS_TEST="$(LIBNSS_ARCH)"
+ OS_TEST="$(LIBNSS_ARCH)" \
+ NSS_ENABLE_WERROR=0
# #pragma usage needs gcc >= 4.8
# See https://bugzilla.mozilla.org/show_bug.cgi?id=1226179
MOZILLA_CLIENT=1 \
NSPR_INCLUDE_DIR=$(HOST_DIR)/include/nspr \
NSPR_LIB_DIR=$(HOST_DIR)/lib \
- BUILD_OPT=1 \
NS_USE_GCC=1 \
NSS_DISABLE_GTESTS=1 \
NSS_USE_SYSTEM_SQLITE=1 \
SQLITE_INCLUDE_DIR=$(HOST_DIR)/include \
ZLIB_INCLUDE_DIR=$(HOST_DIR)/include \
- NSS_ENABLE_ECC=1
+ NSS_ENABLE_ECC=1 \
+ NSS_ENABLE_WERROR=0
HOST_LIBNSS_DEPENDENCIES = host-libnspr host-sqlite host-zlib