All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/2] treat gcc bug 90620 in a common way
@ 2019-05-29 15:57 Giulio Benetti
  2019-05-29 15:57 ` [Buildroot] [PATCH 1/2] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_90620 Giulio Benetti
  2019-05-29 15:57 ` [Buildroot] [PATCH 2/2] package/haproxy: re-enable package on Microblaze Giulio Benetti
  0 siblings, 2 replies; 3+ messages in thread
From: Giulio Benetti @ 2019-05-29 15:57 UTC (permalink / raw)
  To: buildroot

As done for other Gcc bugs introduce and use
BR2_TOOLCHAIN_HAS_GCC_BUG_90620 in affected package:
- haproxy
This is more consistent than checking same conditions for every package
and putting a comment on top of it.

Giulio Benetti (2):
  toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_90620
  package/haproxy: re-enable package on Microblaze

 package/haproxy/Config.in  | 2 --
 package/haproxy/haproxy.mk | 9 ++++++++-
 toolchain/Config.in        | 8 ++++++++
 3 files changed, 16 insertions(+), 3 deletions(-)

-- 
2.17.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 1/2] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_90620
  2019-05-29 15:57 [Buildroot] [PATCH 0/2] treat gcc bug 90620 in a common way Giulio Benetti
@ 2019-05-29 15:57 ` Giulio Benetti
  2019-05-29 15:57 ` [Buildroot] [PATCH 2/2] package/haproxy: re-enable package on Microblaze Giulio Benetti
  1 sibling, 0 replies; 3+ messages in thread
From: Giulio Benetti @ 2019-05-29 15:57 UTC (permalink / raw)
  To: buildroot

GCC fails on building haproxy for the Microblaze Arch:
http://autobuild.buildroot.org/results/64706f96db793777de9d3ec63b0a47d776cf33fd/build-end.log

Originally reported for gpsd:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90620

Fixed on Gcc 8.x but regressed in Gcc 9.x.

Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
 toolchain/Config.in | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/toolchain/Config.in b/toolchain/Config.in
index f73a5364fc..3f562e8d3c 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -152,6 +152,14 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_85862
 	default y if BR2_microblaze
 	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7
 
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90620
+# ICE: in do_output_reload, at reload1.c:7978 on microblaze.
+# It's been fixed on Gcc 8.x but reappeared on Gcc 9.x
+config BR2_TOOLCHAIN_HAS_GCC_BUG_90620
+	bool
+	default y if BR2_microblaze
+	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_8 || BR2_TOOLCHAIN_GCC_AT_LEAST_9
+
 config BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	bool
 
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 2/2] package/haproxy: re-enable package on Microblaze
  2019-05-29 15:57 [Buildroot] [PATCH 0/2] treat gcc bug 90620 in a common way Giulio Benetti
  2019-05-29 15:57 ` [Buildroot] [PATCH 1/2] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_90620 Giulio Benetti
@ 2019-05-29 15:57 ` Giulio Benetti
  1 sibling, 0 replies; 3+ messages in thread
From: Giulio Benetti @ 2019-05-29 15:57 UTC (permalink / raw)
  To: buildroot

With Microblaze Gcc version < 8.x build gives:
'internal compiler error: in do_output_reload, at reload1.c:7978'
This is due to bug 90620:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90620. To avoid this, the
haproxy package has a !BR2_microblaze dependency. However, gcc bug
90620 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.

So, this commit passes -O0 when BR2_TOOLCHAIN_HAS_GCC_BUG_90620, and
re-enables haproxy on Microblaze.

Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
 package/haproxy/Config.in  | 2 --
 package/haproxy/haproxy.mk | 9 ++++++++-
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/package/haproxy/Config.in b/package/haproxy/Config.in
index 670de5a3ee..db63143a74 100644
--- a/package/haproxy/Config.in
+++ b/package/haproxy/Config.in
@@ -1,8 +1,6 @@
 config BR2_PACKAGE_HAPROXY_ARCH_SUPPORTS
 	bool
 	default y
-	# internal compiler error: in do_output_reload, at reload1.c:7978
-	depends on !BR2_microblaze
 	# src/proto_http.c:6330:1: internal compiler error: Segmentation fault
 	depends on !BR2_nios2
 	# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60040
diff --git a/package/haproxy/haproxy.mk b/package/haproxy/haproxy.mk
index e382f61f8e..fde9d5edc6 100644
--- a/package/haproxy/haproxy.mk
+++ b/package/haproxy/haproxy.mk
@@ -69,9 +69,16 @@ endif
 
 HAPROXY_MAKE_OPTS += ADDLIB="$(HAPROXY_LIBS)"
 
+HAPROXY_CFLAGS = $(TARGET_CFLAGS)
+
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_90620),y)
+HAPROXY_CFLAGS += -O0
+endif
+
 define HAPROXY_BUILD_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
-		$(HAPROXY_MAKE_OPTS) -C $(@D)
+		$(HAPROXY_MAKE_OPTS) CFLAGS="$(HAPROXY_CFLAGS)" \
+		 -C $(@D)
 endef
 
 define HAPROXY_INSTALL_TARGET_CMDS
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-05-29 15:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-29 15:57 [Buildroot] [PATCH 0/2] treat gcc bug 90620 in a common way Giulio Benetti
2019-05-29 15:57 ` [Buildroot] [PATCH 1/2] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_90620 Giulio Benetti
2019-05-29 15:57 ` [Buildroot] [PATCH 2/2] package/haproxy: re-enable package on Microblaze Giulio Benetti

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.