Introduce and work-around bug 101916 on heirloom-mailx
cover Introduce and work-around bug 101916 on heirloom-mailx
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(-)
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_101916
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
--- toolchain/Config.in | 7 +++++++ 1 file changed, 7 insertions(+)
toolchain/Config.in +7 -0
@@ -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
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 2/2 package/heirloom-mailx: fix build failure due to gcc bug 101916
In reply to Giulio BenettiThe 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/
--- package/heirloom-mailx/heirloom-mailx.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
package/heirloom-mailx/heirloom-mailx.mk +9 -1
@@ -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
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] http://lists.busybox.net/mailman/listinfo/buildroot
Thomas Petazzoni
AppliedQuoted 3 lines · On Sun, 15 Aug 2021 00:58:01 +0200 Giulio Benetti…
Giulio Benetti (2):
toolchain: introduceBR2_TOOLCHAIN_HAS_GCC_BUG_101916package/heirloom-mailx: fix build failure due to gcc bug 101916
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