diff mbox series

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

Message ID 20230408184559.84189-1-giulio.benetti@benettiengineering.com
State Accepted
Headers show
Series package/matio: fix build failure due to gcc bug 99410 | expand

Commit Message

Giulio Benetti April 8, 2023, 6:45 p.m. UTC
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@benettiengineering.com>
---
 package/matio/matio.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Arnout Vandecappelle April 9, 2023, 1:32 p.m. UTC | #1
On 08/04/2023 20:45, Giulio Benetti wrote:
> 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@benettiengineering.com>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
>   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
>
Peter Korsgaard April 11, 2023, 12:12 p.m. UTC | #2
>>>>> "Giulio" == Giulio Benetti <giulio.benetti@benettiengineering.com> writes:

 > 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@benettiengineering.com>

Committed to 2023.02.x and 2022.02.x, thanks.
diff mbox series

Patch

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