From: Giulio Benetti Date: Wed, 26 Jun 2019 12:58:55 +0000 (+0200) Subject: package/libnss: re-enable package on microblaze X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2716244b340a87186a8fd6e89cd7f18197ba3cdb;p=buildroot.git package/libnss: re-enable package on microblaze With Microblaze Gcc version < 8.x the build hangs due to bug 85862: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85862 To avoid this, the libnss package has a !BR2_TOOLCHAIN_HAS_GCC_BUG_85862 dependency. However, gcc bug 85862 only triggers when optimization is enabled, so we can work around the issue by passing -O0, which is what we do in other Buildroot packages to work around this bug. Signed-off-by: Giulio Benetti Signed-off-by: Thomas Petazzoni --- 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