[Buildroot] [git commit branch/2023.02.x] package/matio: fix build failure due to gcc bug 99410

Peter Korsgaard peter at korsgaard.com
Tue Apr 11 12:11:10 UTC 2023


commit: https://git.buildroot.net/buildroot/commit/?id=8c84c53a15b738acc69c0518a1b21b4ff717fbfc
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2023.02.x

The matio package exhibits gcc bug 99410 when built for the Nios2
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_99410=y.

Fixes:
http://autobuild.buildroot.net/results/971/9714160b80a0d1a01983d29af38a95049c07b4d3/

Signed-off-by: Giulio Benetti <giulio.benetti at benettiengineering.com>
Signed-off-by: Arnout Vandecappelle <arnout at mind.be>
(cherry picked from commit 97f8cc355b164ce023cd6a098051ce63c7a25f9a)
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
 package/matio/matio.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/package/matio/matio.mk b/package/matio/matio.mk
index 5e09f4e6ce..2ba9c8f568 100644
--- a/package/matio/matio.mk
+++ b/package/matio/matio.mk
@@ -15,6 +15,14 @@ MATIO_INSTALL_STAGING = YES
 # va_copy()
 MATIO_CONF_ENV = ac_cv_va_copy=yes
 
+MATIO_CFLAGS = $(TARGET_CFLAGS)
+
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_99410),y)
+MATIO_CFLAGS += -O0
+endif
+
+MATIO_CONF_ENV += CFLAGS="$(MATIO_CFLAGS)"
+
 # mat73 require hdf5 (not available), extented-sparse take 2KB
 MATIO_CONF_OPTS = --disable-mat73 --enable-extended-sparse
 



More information about the buildroot mailing list