All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/2] Introduce and work-around bug 101952 on bullet
@ 2021-08-17 21:31 Giulio Benetti
  2021-08-17 21:31 ` [Buildroot] [PATCH 1/2] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_101952 Giulio Benetti
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Giulio Benetti @ 2021-08-17 21:31 UTC (permalink / raw)
  To: buildroot
  Cc: Giulio Benetti, Romain Naour, Thomas De Schampheleire,
	Thomas Petazzoni

This patchset introduce gcc bug 101952 and reference to it in bullet to
work it around by disabling optimization(-O0).

NOTE: this patchset must be applied *after* this patchset:
https://patchwork.ozlabs.org/project/buildroot/list/?series=258074

Giulio Benetti (2):
  toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_101952
  package/bullet: fix build failure due to gcc bug 101952

 package/bullet/bullet.mk | 2 +-
 toolchain/Config.in      | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 1/2] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_101952
  2021-08-17 21:31 [Buildroot] [PATCH 0/2] Introduce and work-around bug 101952 on bullet Giulio Benetti
@ 2021-08-17 21:31 ` Giulio Benetti
  2021-08-17 21:31 ` [Buildroot] [PATCH 2/2] package/bullet: fix build failure due to gcc bug 101952 Giulio Benetti
  2021-08-19 20:42 ` [Buildroot] [PATCH 0/2] Introduce and work-around bug 101952 on bullet Thomas Petazzoni
  2 siblings, 0 replies; 4+ messages in thread
From: Giulio Benetti @ 2021-08-17 21:31 UTC (permalink / raw)
  To: buildroot
  Cc: Giulio Benetti, Romain Naour, Thomas De Schampheleire,
	Thomas Petazzoni

bullet package fails to build for the SH4 architecture with optimization
enabled with gcc = 11.1.0:
http://autobuild.buildroot.net/results/32b/32bfaf0aae57ed18c18e82a72a958af9b3e1b241/

It's been reported upstream:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101952

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

diff --git a/toolchain/Config.in b/toolchain/Config.in
index c3edf8f48d..d9a49e87e6 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -191,6 +191,13 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_101916
 	bool
 	default y if BR2_sh4
 
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101952
+# ICE: on SH4: unaligned opcodes detected in executable segment.
+# This bug still exists in gcc = 11.1.0
+config BR2_TOOLCHAIN_HAS_GCC_BUG_101952
+	bool
+	default y if BR2_sh4
+
 config BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	bool
 
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 2/2] package/bullet: fix build failure due to gcc bug 101952
  2021-08-17 21:31 [Buildroot] [PATCH 0/2] Introduce and work-around bug 101952 on bullet Giulio Benetti
  2021-08-17 21:31 ` [Buildroot] [PATCH 1/2] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_101952 Giulio Benetti
@ 2021-08-17 21:31 ` Giulio Benetti
  2021-08-19 20:42 ` [Buildroot] [PATCH 0/2] Introduce and work-around bug 101952 on bullet Thomas Petazzoni
  2 siblings, 0 replies; 4+ messages in thread
From: Giulio Benetti @ 2021-08-17 21:31 UTC (permalink / raw)
  To: buildroot
  Cc: Giulio Benetti, Romain Naour, Thomas De Schampheleire,
	Thomas Petazzoni

The bullet package exhibits gcc bug 101952 when built for the SH4
architecture with optimization enabled, which causes a build failure.

As done for other packages in Buildroot work around this gcc bug by
setting optimization to -O0 if BR2_TOOLCHAIN_HAS_GCC_BUG_101952=y like we
already do for BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y.

Fixes:
http://autobuild.buildroot.net/results/32b/32bfaf0aae57ed18c18e82a72a958af9b3e1b241/

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 package/bullet/bullet.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/bullet/bullet.mk b/package/bullet/bullet.mk
index 01931b58a8..cc72be7c60 100644
--- a/package/bullet/bullet.mk
+++ b/package/bullet/bullet.mk
@@ -24,7 +24,7 @@ endif
 
 BULLET_CXXFLAGS = $(TARGET_CXXFLAGS)
 
-ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
+ifneq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180)$(BR2_TOOLCHAIN_HAS_GCC_BUG_101952),)
 BULLET_CXXFLAGS += -O0
 endif
 
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 0/2] Introduce and work-around bug 101952 on bullet
  2021-08-17 21:31 [Buildroot] [PATCH 0/2] Introduce and work-around bug 101952 on bullet Giulio Benetti
  2021-08-17 21:31 ` [Buildroot] [PATCH 1/2] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_101952 Giulio Benetti
  2021-08-17 21:31 ` [Buildroot] [PATCH 2/2] package/bullet: fix build failure due to gcc bug 101952 Giulio Benetti
@ 2021-08-19 20:42 ` Thomas Petazzoni
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2021-08-19 20:42 UTC (permalink / raw)
  To: Giulio Benetti; +Cc: Romain Naour, Thomas De Schampheleire, buildroot

On Tue, 17 Aug 2021 23:31:10 +0200
Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:

> Giulio Benetti (2):
>   toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_101952
>   package/bullet: fix build failure due to gcc bug 101952

Both applied. Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

end of thread, other threads:[~2021-08-19 20:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-17 21:31 [Buildroot] [PATCH 0/2] Introduce and work-around bug 101952 on bullet Giulio Benetti
2021-08-17 21:31 ` [Buildroot] [PATCH 1/2] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_101952 Giulio Benetti
2021-08-17 21:31 ` [Buildroot] [PATCH 2/2] package/bullet: fix build failure due to gcc bug 101952 Giulio Benetti
2021-08-19 20:42 ` [Buildroot] [PATCH 0/2] Introduce and work-around bug 101952 on bullet Thomas Petazzoni

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.