* [Buildroot] [PATCH 0/2] Introduce and work-around bug 101916 on heirloom-mailx
@ 2021-08-14 22:58 Giulio Benetti
2021-08-14 22:58 ` [Buildroot] [PATCH 1/2] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_101916 Giulio Benetti
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Giulio Benetti @ 2021-08-14 22:58 UTC (permalink / raw)
To: buildroot
Cc: Giulio Benetti, Romain Naour, Thomas De Schampheleire, Thomas Petazzoni
This patchset introduce gcc bug 101916 and reference to it in heirloom-mailx
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=258071
Giulio Benetti (2):
toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_101916
package/heirloom-mailx: fix build failure due to gcc bug 101916
package/heirloom-mailx/heirloom-mailx.mk | 10 +++++++++-
toolchain/Config.in | 7 +++++++
2 files changed, 16 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_101916
2021-08-14 22:58 [Buildroot] [PATCH 0/2] Introduce and work-around bug 101916 on heirloom-mailx Giulio Benetti
@ 2021-08-14 22:58 ` Giulio Benetti
2021-08-14 22:58 ` [Buildroot] [PATCH 2/2] package/heirloom-mailx: fix build failure due to gcc bug 101916 Giulio Benetti
2021-08-19 20:59 ` [Buildroot] [PATCH 0/2] Introduce and work-around bug 101916 on heirloom-mailx Thomas Petazzoni
2 siblings, 0 replies; 4+ messages in thread
From: Giulio Benetti @ 2021-08-14 22:58 UTC (permalink / raw)
To: buildroot
Cc: Giulio Benetti, Romain Naour, Thomas De Schampheleire, Thomas Petazzoni
heirloom-mailx package fails to build for the SH4 architecture with
optimization enabled with gcc = 11.1.0:
http://autobuild.buildroot.net/results/911/911f5c024834741754102ff1bbb05c4a64c54a0b/
It's been reported upstream:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101916
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 07320fdef9..c3edf8f48d 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -184,6 +184,13 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_101915
bool
default y if BR2_microblaze
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101916
+# ICE: on SH4: Segmentation fault signal terminated program cc1.
+# This bug still exists in gcc = 11.1.0
+config BR2_TOOLCHAIN_HAS_GCC_BUG_101916
+ 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/heirloom-mailx: fix build failure due to gcc bug 101916
2021-08-14 22:58 [Buildroot] [PATCH 0/2] Introduce and work-around bug 101916 on heirloom-mailx Giulio Benetti
2021-08-14 22:58 ` [Buildroot] [PATCH 1/2] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_101916 Giulio Benetti
@ 2021-08-14 22:58 ` Giulio Benetti
2021-08-19 20:59 ` [Buildroot] [PATCH 0/2] Introduce and work-around bug 101916 on heirloom-mailx Thomas Petazzoni
2 siblings, 0 replies; 4+ messages in thread
From: Giulio Benetti @ 2021-08-14 22:58 UTC (permalink / raw)
To: buildroot
Cc: Giulio Benetti, Romain Naour, Thomas De Schampheleire, Thomas Petazzoni
The heirloom-mailx package exhibits gcc bug 101916 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_101916=y.
Also introduce HEIRLOOM_MAILX_CFLAGS as done for other packages and move
the already present -fPIC CFLAG to it.
Fixes:
http://autobuild.buildroot.net/results/911/911f5c024834741754102ff1bbb05c4a64c54a0b/
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
package/heirloom-mailx/heirloom-mailx.mk | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/package/heirloom-mailx/heirloom-mailx.mk b/package/heirloom-mailx/heirloom-mailx.mk
index b3cece0cfc..e851e1dfcc 100644
--- a/package/heirloom-mailx/heirloom-mailx.mk
+++ b/package/heirloom-mailx/heirloom-mailx.mk
@@ -20,10 +20,18 @@ define HEIRLOOM_MAILX_CONFIGURE_CMDS
(cd $(@D); $(TARGET_CONFIGURE_OPTS) $(SHELL) ./makeconfig)
endef
+HEIRLOOM_MAILX_CFLAGS = $(TARGET_CFLAGS)
+
# -fPIC is needed to build with NIOS2 toolchains.
+HEIRLOOM_MAILX_CFLAGS += -fPIC
+
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_101916),y)
+HEIRLOOM_MAILX_CFLAGS += -O0
+endif
+
define HEIRLOOM_MAILX_BUILD_CMDS
$(TARGET_CONFIGURE_OPTS) $(MAKE) \
- CFLAGS="$(TARGET_CFLAGS) -fPIC" \
+ CFLAGS="$(HEIRLOOM_MAILX_CFLAGS)" \
-C $(@D)
endef
--
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 101916 on heirloom-mailx
2021-08-14 22:58 [Buildroot] [PATCH 0/2] Introduce and work-around bug 101916 on heirloom-mailx Giulio Benetti
2021-08-14 22:58 ` [Buildroot] [PATCH 1/2] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_101916 Giulio Benetti
2021-08-14 22:58 ` [Buildroot] [PATCH 2/2] package/heirloom-mailx: fix build failure due to gcc bug 101916 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 Sun, 15 Aug 2021 00:58:01 +0200
Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:
> Giulio Benetti (2):
> toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_101916
> package/heirloom-mailx: fix build failure due to gcc bug 101916
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 22:58 [Buildroot] [PATCH 0/2] Introduce and work-around bug 101916 on heirloom-mailx Giulio Benetti
2021-08-14 22:58 ` [Buildroot] [PATCH 1/2] toolchain: introduce BR2_TOOLCHAIN_HAS_GCC_BUG_101916 Giulio Benetti
2021-08-14 22:58 ` [Buildroot] [PATCH 2/2] package/heirloom-mailx: fix build failure due to gcc bug 101916 Giulio Benetti
2021-08-19 20:59 ` [Buildroot] [PATCH 0/2] Introduce and work-around bug 101916 on heirloom-mailx Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).