Skip to contentSkip to conversation

package/matio: fix build failure due to gcc bug 99410

PATCH Applied Giulio Benetti 3 participants 3 messages Apr 8, 2023 – Apr 11, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/matio: fix build failure due to gcc bug 99410

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/

---
 package/matio/matio.mk | 8 ++++++++
 1 file changed, 8 insertions(+)
package/matio/matio.mk +8 -0
index 5e09f4e6ce..2ba9c8f568 100644
@@ -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
 
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 10 lines · Giulio Benetti

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/

Applied to master, thanks.

Regards,
Arnout

Quoted 13 lines
---
  package/matio/matio.mk | 8 ++++++++
  1 file changed, 8 insertions(+)
package/matio/matio.mk +1 -0
index 5e09f4e6ce..2ba9c8f568 100644
@@ -15,6 +15,14 @@ MATIO_INSTALL_STAGING = YES
  # va_copy()
  MATIO_CONF_ENV = ac_cv_va_copy=yes
 
+MATIO_CFLAGS = $(TARGET_CFLAGS)

package/matio/matio.mk MATIO_INSTALL_STAGING = YES · line 28

Quoted 10 lines
package/matio/matio.mk +7 -0
+
+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
 

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
In reply to Giulio Benetti
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Giulio" == Giulio Benetti <[email protected]> writes:

The matio package exhibits gcc bug 99410 when built for the Nios2 architecture with optimization enabled, which causes a build failure.

Quoted 7 lines

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/

Committed to 2023.02.x and 2022.02.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot