Introduce and work-around bug 101952 on bullet
cover Introduce and work-around bug 101952 on bullet
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(-)
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 1/2 toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_101952
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
--- toolchain/Config.in | 7 +++++++ 1 file changed, 7 insertions(+)
toolchain/Config.in +7 -0
@@ -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
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 2/2 package/bullet: fix build failure due to gcc bug 101952
In reply to Giulio BenettiThe 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/
--- package/bullet/bullet.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/bullet/bullet.mk +1 -1
@@ -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
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] http://lists.busybox.net/mailman/listinfo/buildroot
Quoted 3 lines · On Tue, 17 Aug 2021 23:31:10 +0200 Giulio Benetti…
Giulio Benetti (2):
toolchain: introduceBR2_TOOLCHAIN_HAS_GCC_BUG_101952package/bullet: fix build failure due to gcc bug 101952
Both applied. Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] http://lists.busybox.net/mailman/listinfo/buildroot