diff --git a/package/libnss/Config.in b/package/libnss/Config.in index 34ddb91dfa..599c9a6536 100644 --- a/package/libnss/Config.in +++ b/package/libnss/Config.in @@ -3,7 +3,6 @@ config BR2_PACKAGE_LIBNSS depends on BR2_TOOLCHAIN_HAS_THREADS # libnspr depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT # libnspr depends on !BR2_STATIC_LIBS - depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_85862 select BR2_PACKAGE_LIBNSPR select BR2_PACKAGE_SQLITE select BR2_PACKAGE_ZLIB @@ -19,6 +18,3 @@ config BR2_PACKAGE_LIBNSS comment "libnss needs a toolchain w/ threads, dynamic library" depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS - -comment "libnss needs a toolchain not affected by GCC bug 85862" - depends on BR2_TOOLCHAIN_HAS_GCC_BUG_85862 diff --git a/package/libnss/libnss.mk b/package/libnss/libnss.mk index d72ae94c5b..34e9d41968 100644 --- a/package/libnss/libnss.mk +++ b/package/libnss/libnss.mk @@ -13,9 +13,15 @@ LIBNSS_DEPENDENCIES = libnspr sqlite zlib LIBNSS_LICENSE = MPL-2.0 LIBNSS_LICENSE_FILES = nss/COPYING +LIBNSS_CFLAGS = $(TARGET_CFLAGS) + +ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85862),y) +LIBNSS_CFLAGS += -O0 +endif + # 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 'OS_CFLAGS += $(LIBNSS_CFLAGS)' >> $(@D)/nss/coreconf/Linux.mk echo 'LDFLAGS += $(TARGET_LDFLAGS)' >> $(@D)/nss/coreconf/Linux.mk endef