Skip to contentSkip to conversation

Introduce and work-around bug 101915 on lmbench

PATCH Applied Giulio Benetti 2 participants 4 messages Aug 14, 2021 – Aug 19, 2021

lore
Share & tools
lore
#0 lore raw

cover Introduce and work-around bug 101915 on lmbench

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

Giulio Benetti (2):
toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_101915 package/lmbench: fix build failure due to gcc bug 101915

 package/lmbench/lmbench.mk | 4 ++++
 toolchain/Config.in        | 7 +++++++
 2 files changed, 11 insertions(+)
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot
#1 lore raw

PATCH 1/2 toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_101915

lmbench package fails to build for the Microblaze architecture with optimization enabled with gcc = 11.1.0:
http://autobuild.buildroot.net/results/ae1/ae1e4d61ed367c6cb64442c60d98882cc7985346/

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

---
 toolchain/Config.in | 7 +++++++
 1 file changed, 7 insertions(+)
toolchain/Config.in +7 -0
index 3888eeafe2..07320fdef9 100644
@@ -177,6 +177,13 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_101737
 	bool
 	default y if BR2_sh4
 
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101915
+# ICE: in extract_insn, at recog.c:2294 on microblaze.
+# This bug still exists in gcc = 11.1.0
+config BR2_TOOLCHAIN_HAS_GCC_BUG_101915
+	bool
+	default y if BR2_microblaze
+
 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
#2 lore raw

PATCH 2/2 package/lmbench: fix build failure due to gcc bug 101915

In reply to Giulio Benetti

The lmbench package exhibits gcc bug 101915 when built for the Microblaze 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_101915=y.

Fixes:
http://autobuild.buildroot.net/results/ae1/ae1e4d61ed367c6cb64442c60d98882cc7985346/

---
 package/lmbench/lmbench.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/lmbench/lmbench.mk +4 -0
index 2f3b19b5f8..b0f99ff106 100644
@@ -18,6 +18,10 @@ LMBENCH_CFLAGS += `$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`
 LMBENCH_LDLIBS = `$(PKG_CONFIG_HOST_BINARY) --libs libtirpc`
 endif
 
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_101915),y)
+LMBENCH_CFLAGS += -O0
+endif
+
 LMBENCH_POST_PATCH_HOOKS += UPDATE_CONFIG_HOOK
 
 define LMBENCH_CONFIGURE_CMDS
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot
#3 lore raw
In reply to Giulio Benetti
Quoted 6 lines · On Sat, 14 Aug 2021 23:52:05 +0200 Giulio Benetti…

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

Giulio Benetti (2):
toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_101915 package/lmbench: fix build failure due to gcc bug 101915

Applied to master, thanks.

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