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

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(+)

-- 
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_101915
  2021-08-14 21:52 [Buildroot] [PATCH 0/2] Introduce and work-around bug 101915 on lmbench Giulio Benetti
@ 2021-08-14 21:52 ` Giulio Benetti
  2021-08-14 21:52 ` [Buildroot] [PATCH 2/2] package/lmbench: fix build failure due to gcc bug 101915 Giulio Benetti
  2021-08-19 20:59 ` [Buildroot] [PATCH 0/2] Introduce and work-around bug 101915 on lmbench Thomas Petazzoni
  2 siblings, 0 replies; 4+ messages in thread
From: Giulio Benetti @ 2021-08-14 21:52 UTC (permalink / raw)
  To: buildroot
  Cc: Giulio Benetti, Romain Naour, Thomas De Schampheleire, Thomas Petazzoni

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

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 3888eeafe2..07320fdef9 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -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
 
-- 
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/lmbench: fix build failure due to gcc bug 101915
  2021-08-14 21:52 [Buildroot] [PATCH 0/2] Introduce and work-around bug 101915 on lmbench Giulio Benetti
  2021-08-14 21:52 ` [Buildroot] [PATCH 1/2] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_101915 Giulio Benetti
@ 2021-08-14 21:52 ` Giulio Benetti
  2021-08-19 20:59 ` [Buildroot] [PATCH 0/2] Introduce and work-around bug 101915 on lmbench Thomas Petazzoni
  2 siblings, 0 replies; 4+ messages in thread
From: Giulio Benetti @ 2021-08-14 21:52 UTC (permalink / raw)
  To: buildroot
  Cc: Giulio Benetti, Romain Naour, Thomas De Schampheleire, Thomas Petazzoni

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/

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 package/lmbench/lmbench.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/lmbench/lmbench.mk b/package/lmbench/lmbench.mk
index 2f3b19b5f8..b0f99ff106 100644
--- a/package/lmbench/lmbench.mk
+++ b/package/lmbench/lmbench.mk
@@ -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
-- 
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 101915 on lmbench
  2021-08-14 21:52 [Buildroot] [PATCH 0/2] Introduce and work-around bug 101915 on lmbench Giulio Benetti
  2021-08-14 21:52 ` [Buildroot] [PATCH 1/2] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_101915 Giulio Benetti
  2021-08-14 21:52 ` [Buildroot] [PATCH 2/2] package/lmbench: fix build failure due to gcc bug 101915 Giulio Benetti
@ 2021-08-19 20:59 ` Thomas Petazzoni
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2021-08-19 20:59 UTC (permalink / raw)
  To: Giulio Benetti; +Cc: Romain Naour, Thomas De Schampheleire, buildroot

On Sat, 14 Aug 2021 23:52:05 +0200
Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:

> 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.

-- 
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 21:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-14 21:52 [Buildroot] [PATCH 0/2] Introduce and work-around bug 101915 on lmbench Giulio Benetti
2021-08-14 21:52 ` [Buildroot] [PATCH 1/2] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_101915 Giulio Benetti
2021-08-14 21:52 ` [Buildroot] [PATCH 2/2] package/lmbench: fix build failure due to gcc bug 101915 Giulio Benetti
2021-08-19 20:59 ` [Buildroot] [PATCH 0/2] Introduce and work-around bug 101915 on lmbench 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.