All of lore.kernel.org
 help / color / mirror / Atom feed
From: Giulio Benetti <giulio.benetti@micronovasrl.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/2] package/libnss: re-enable package on microblaze
Date: Wed,  5 Jun 2019 14:13:36 +0200	[thread overview]
Message-ID: <20190605121336.2512-2-giulio.benetti@micronovasrl.com> (raw)
In-Reply-To: <20190605121336.2512-1-giulio.benetti@micronovasrl.com>

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 <giulio.benetti@micronovasrl.com>
---
 package/libnss/Config.in | 4 ----
 package/libnss/libnss.mk | 8 +++++++-
 2 files changed, 7 insertions(+), 5 deletions(-)

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 484c79e9da..893ff80154 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
 
-- 
2.17.1

  reply	other threads:[~2019-06-05 12:13 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-22 12:25 [Buildroot] [PATCH 0/8] fix GCC BUG 71124 and 85862 Giulio Benetti
2019-05-22 12:25 ` [Buildroot] [PATCH 1/8] toolchain: GCC bug 71124 Giulio Benetti
2019-05-22 12:25 ` [Buildroot] [PATCH 2/8] package/sqlite: fix BUG_71124 build timeout Giulio Benetti
2019-05-22 12:25 ` [Buildroot] [PATCH 3/8] package/ffmpeg: re-enable package if BUG_71124 is present Giulio Benetti
2019-05-22 12:25 ` [Buildroot] [PATCH 4/8] package/assimp: re-enable package if BR2_microblaze is enabled Giulio Benetti
2019-05-22 12:25 ` [Buildroot] [PATCH 5/8] package/libnss: re-enable package if BUG_85862 is present Giulio Benetti
2019-05-22 12:25 ` [Buildroot] [PATCH 6/8] package/ecryptfs-utils: allow building with GCC_BUG_85862 and on Microblaze Giulio Benetti
2019-05-22 12:25 ` [Buildroot] [PATCH 7/8] package/qt5webengine: re-enable building if BUG_85682=y on latest Qt5 Giulio Benetti
2019-05-22 12:25 ` [Buildroot] [PATCH 8/8] package/flashbench: remove old check if BR2_microblaze & BR2_sh2a Giulio Benetti
2019-05-22 12:31 ` [Buildroot] [PATCH 0/8] fix GCC BUG 71124 and 85862 Thomas Petazzoni
2019-05-22 12:34   ` Giulio Benetti
2019-05-22 13:02     ` Thomas Petazzoni
2019-05-22 13:15       ` Giulio Benetti
2019-05-22 13:58         ` [Buildroot] [PATCH v2 0/7] fix GCC BUG 85180 " Giulio Benetti
2019-05-22 13:59           ` [Buildroot] [PATCH v2 1/7] package/sqlite: fix BUG_85180 build timeout Giulio Benetti
2019-05-24 20:24             ` Thomas Petazzoni
     [not found]               ` <6dcdb1eb-5d48-e773-9711-1df461c542e2@micronovasrl.com>
2019-05-27  9:06                 ` Giulio Benetti
2019-05-27  9:37                   ` Thomas Petazzoni
2019-05-27  9:44                     ` Giulio Benetti
2019-05-27  9:46                       ` Thomas Petazzoni
2019-05-27 10:20                         ` Giulio Benetti
2019-05-27 18:10                           ` Giulio Benetti
2019-05-27 21:11                             ` Arnout Vandecappelle
2019-05-27 21:14                               ` Giulio Benetti
2019-05-27 21:28                                 ` Arnout Vandecappelle
2019-05-27 21:34                                   ` Giulio Benetti
2019-05-22 13:59           ` [Buildroot] [PATCH v2 2/7] package/ffmpeg: re-enable package if BUG_85180 is present Giulio Benetti
2019-05-24 21:16             ` Thomas Petazzoni
2019-06-06 15:00             ` Peter Korsgaard
2019-05-22 13:59           ` [Buildroot] [PATCH v2 3/7] package/assimp: re-enable package if BR2_microblaze is enabled Giulio Benetti
2019-05-24 21:16             ` Thomas Petazzoni
2019-05-22 13:59           ` [Buildroot] [PATCH v2 4/7] package/libnss: re-enable package if BUG_85862 is present Giulio Benetti
2019-05-24 21:15             ` Thomas Petazzoni
2019-05-27 10:10               ` Giulio Benetti
2019-06-05 12:13               ` [Buildroot] [PATCH 1/2] package/libnss: use correct CFLAGS and LDFLAGS Giulio Benetti
2019-06-05 12:13                 ` Giulio Benetti [this message]
2019-06-05 12:14                   ` [Buildroot] [PATCH 2/2] package/libnss: re-enable package on microblaze Giulio Benetti
2019-05-22 13:59           ` [Buildroot] [PATCH v2 5/7] package/ecryptfs-utils: allow building with GCC_BUG_85862 and on Microblaze Giulio Benetti
2019-05-27 17:28             ` Giulio Benetti
2019-05-27 19:13               ` Thomas Petazzoni
2019-05-27 20:34                 ` Giulio Benetti
2019-05-22 13:59           ` [Buildroot] [PATCH v2 6/7] package/qt5webengine: re-enable building if BUG_85682=y on latest Qt5 Giulio Benetti
2019-05-22 13:59           ` [Buildroot] [PATCH v2 7/7] package/flashbench: remove old check if BR2_microblaze & BR2_sh2a Giulio Benetti
2019-05-24 21:18             ` Thomas Petazzoni
2019-05-28  8:58               ` Giulio Benetti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190605121336.2512-2-giulio.benetti@micronovasrl.com \
    --to=giulio.benetti@micronovasrl.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.