All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/sox: work around gcc bug 68485
@ 2022-09-09 22:15 Giulio Benetti
  2022-09-10  7:05 ` Yann E. MORIN
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Giulio Benetti @ 2022-09-09 22:15 UTC (permalink / raw)
  To: buildroot; +Cc: Giulio Benetti

With Microblaze Gcc version <= 12.x the build fails due to gcc bug 68485:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485. The bug show up when
building sox with optimization but not when building with -O0. To work
around this, if BR2_TOOLCHAIN_HAS_GCC_BUG_68458=y, we force using -O0.

Fixes:
http://autobuild.buildroot.net/results/ac4/ac4fbd55529ac7b4e635a11766f842cd25a833a1/

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 package/sox/sox.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/package/sox/sox.mk b/package/sox/sox.mk
index 1896437ad4..d0329bf50d 100644
--- a/package/sox/sox.mk
+++ b/package/sox/sox.mk
@@ -26,6 +26,14 @@ SOX_CONF_OPTS = \
 	--with-distro="Buildroot" \
 	--disable-stack-protector
 
+SOX_CFLAGS = $(TARGET_CFLAGS)
+
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y)
+SOX_CFLAGS += -O0
+endif
+
+SOX_CONF_ENV += CFLAGS="$(SOX_CFLAGS)"
+
 ifeq ($(BR2_PACKAGE_ALSA_LIB_PCM),y)
 SOX_DEPENDENCIES += alsa-lib
 SOX_CONF_OPTS += --enable-alsa
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH] package/sox: work around gcc bug 68485
  2022-09-09 22:15 [Buildroot] [PATCH] package/sox: work around gcc bug 68485 Giulio Benetti
@ 2022-09-10  7:05 ` Yann E. MORIN
  2022-09-10 14:22   ` Giulio Benetti
  2022-09-11 19:17 ` Yann E. MORIN
  2022-09-18 21:12 ` Peter Korsgaard
  2 siblings, 1 reply; 6+ messages in thread
From: Yann E. MORIN @ 2022-09-10  7:05 UTC (permalink / raw)
  To: Giulio Benetti; +Cc: buildroot

Giulio, All,

On 2022-09-10 00:15 +0200, Giulio Benetti spake thusly:
> With Microblaze Gcc version <= 12.x the build fails due to gcc bug 68485:

Since the latest gcc versin is 12.x, then "gcc <= 12.x" actually means
all versions of gcc, no?

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485. The bug show up when
> building sox with optimization but not when building with -O0. To work
> around this, if BR2_TOOLCHAIN_HAS_GCC_BUG_68458=y, we force using -O0.
> 
> Fixes:
> http://autobuild.buildroot.net/results/ac4/ac4fbd55529ac7b4e635a11766f842cd25a833a1/
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> ---
>  package/sox/sox.mk | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/package/sox/sox.mk b/package/sox/sox.mk
> index 1896437ad4..d0329bf50d 100644
> --- a/package/sox/sox.mk
> +++ b/package/sox/sox.mk
> @@ -26,6 +26,14 @@ SOX_CONF_OPTS = \
>  	--with-distro="Buildroot" \
>  	--disable-stack-protector
>  
> +SOX_CFLAGS = $(TARGET_CFLAGS)
> +
> +ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y)

Since you said the bug only appears for microblaze, gcc <= 12, and this
specific gcc bug, then shouldn't all three conditions be used?
(excluding gcc version because of my earlier comment):

    ifeq ($(BR2_microblaze)$(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),yy)

I.e. there is no reason to penalise other architectures, since only
micrbolaze is impacted by that bug.

Regards,
Yann E. MORIN.

> +SOX_CFLAGS += -O0
> +endif
> +
> +SOX_CONF_ENV += CFLAGS="$(SOX_CFLAGS)"
> +
>  ifeq ($(BR2_PACKAGE_ALSA_LIB_PCM),y)
>  SOX_DEPENDENCIES += alsa-lib
>  SOX_CONF_OPTS += --enable-alsa
> -- 
> 2.34.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH] package/sox: work around gcc bug 68485
  2022-09-10  7:05 ` Yann E. MORIN
@ 2022-09-10 14:22   ` Giulio Benetti
  0 siblings, 0 replies; 6+ messages in thread
From: Giulio Benetti @ 2022-09-10 14:22 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: buildroot

Hi Yann,

On 10/09/22 09:05, Yann E. MORIN wrote:
> Giulio, All,
> 
> On 2022-09-10 00:15 +0200, Giulio Benetti spake thusly:
>> With Microblaze Gcc version <= 12.x the build fails due to gcc bug 68485:
> 
> Since the latest gcc versin is 12.x, then "gcc <= 12.x" actually means
> all versions of gcc, no?

Yes, it's only I'd prefer to keep track of the status of the bug in
commit log if possible for orienting on future bug status.

>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485. The bug show up when
>> building sox with optimization but not when building with -O0. To work
>> around this, if BR2_TOOLCHAIN_HAS_GCC_BUG_68458=y, we force using -O0.
>>
>> Fixes:
>> http://autobuild.buildroot.net/results/ac4/ac4fbd55529ac7b4e635a11766f842cd25a833a1/
>>
>> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>> ---
>>   package/sox/sox.mk | 8 ++++++++
>>   1 file changed, 8 insertions(+)
>>
>> diff --git a/package/sox/sox.mk b/package/sox/sox.mk
>> index 1896437ad4..d0329bf50d 100644
>> --- a/package/sox/sox.mk
>> +++ b/package/sox/sox.mk
>> @@ -26,6 +26,14 @@ SOX_CONF_OPTS = \
>>   	--with-distro="Buildroot" \
>>   	--disable-stack-protector
>>   
>> +SOX_CFLAGS = $(TARGET_CFLAGS)
>> +
>> +ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y)
> 
> Since you said the bug only appears for microblaze, gcc <= 12, and this
> specific gcc bug, then shouldn't all three conditions be used?
> (excluding gcc version because of my earlier comment):
> 
>      ifeq ($(BR2_microblaze)$(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),yy)
> 
> I.e. there is no reason to penalise other architectures, since only
> micrbolaze is impacted by that bug.

Yes, but this is already achieved by BR2_TOOLCHAIN_HAS_GCC_BUG_68485
because in toolchain/Config.in it:
default y if BR2_microblaze

Best regards
-- 
Giulio Benetti
Benetti Engineering sas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH] package/sox: work around gcc bug 68485
  2022-09-09 22:15 [Buildroot] [PATCH] package/sox: work around gcc bug 68485 Giulio Benetti
  2022-09-10  7:05 ` Yann E. MORIN
@ 2022-09-11 19:17 ` Yann E. MORIN
  2022-09-11 19:19   ` Giulio Benetti
  2022-09-18 21:12 ` Peter Korsgaard
  2 siblings, 1 reply; 6+ messages in thread
From: Yann E. MORIN @ 2022-09-11 19:17 UTC (permalink / raw)
  To: Giulio Benetti; +Cc: buildroot

Giulio, All,

On 2022-09-10 00:15 +0200, Giulio Benetti spake thusly:
> With Microblaze Gcc version <= 12.x the build fails due to gcc bug 68485:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485. The bug show up when
> building sox with optimization but not when building with -O0. To work
> around this, if BR2_TOOLCHAIN_HAS_GCC_BUG_68458=y, we force using -O0.

Given your feedback on my review, I have amended the commit log into a
form that looks (at least to me) more appropriate. Please review it and
yell if I made a mistake.

Applied to master, thanks.

Regards,
Yann E. MORIN.

> Fixes:
> http://autobuild.buildroot.net/results/ac4/ac4fbd55529ac7b4e635a11766f842cd25a833a1/
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> ---
>  package/sox/sox.mk | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/package/sox/sox.mk b/package/sox/sox.mk
> index 1896437ad4..d0329bf50d 100644
> --- a/package/sox/sox.mk
> +++ b/package/sox/sox.mk
> @@ -26,6 +26,14 @@ SOX_CONF_OPTS = \
>  	--with-distro="Buildroot" \
>  	--disable-stack-protector
>  
> +SOX_CFLAGS = $(TARGET_CFLAGS)
> +
> +ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y)
> +SOX_CFLAGS += -O0
> +endif
> +
> +SOX_CONF_ENV += CFLAGS="$(SOX_CFLAGS)"
> +
>  ifeq ($(BR2_PACKAGE_ALSA_LIB_PCM),y)
>  SOX_DEPENDENCIES += alsa-lib
>  SOX_CONF_OPTS += --enable-alsa
> -- 
> 2.34.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH] package/sox: work around gcc bug 68485
  2022-09-11 19:17 ` Yann E. MORIN
@ 2022-09-11 19:19   ` Giulio Benetti
  0 siblings, 0 replies; 6+ messages in thread
From: Giulio Benetti @ 2022-09-11 19:19 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: buildroot

Hi Yann,

On 11/09/22 21:17, Yann E. MORIN wrote:
> Giulio, All,
> 
> On 2022-09-10 00:15 +0200, Giulio Benetti spake thusly:
>> With Microblaze Gcc version <= 12.x the build fails due to gcc bug 68485:
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485. The bug show up when
>> building sox with optimization but not when building with -O0. To work
>> around this, if BR2_TOOLCHAIN_HAS_GCC_BUG_68458=y, we force using -O0.
> 
> Given your feedback on my review, I have amended the commit log into a
> form that looks (at least to me) more appropriate. Please review it and
> yell if I made a mistake.

It sounds very good.

Thank you!
-- 
Giulio Benetti
Benetti Engineering sas

> Applied to master, thanks.
> 
> Regards,
> Yann E. MORIN.
> 
>> Fixes:
>> http://autobuild.buildroot.net/results/ac4/ac4fbd55529ac7b4e635a11766f842cd25a833a1/
>>
>> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>> ---
>>   package/sox/sox.mk | 8 ++++++++
>>   1 file changed, 8 insertions(+)
>>
>> diff --git a/package/sox/sox.mk b/package/sox/sox.mk
>> index 1896437ad4..d0329bf50d 100644
>> --- a/package/sox/sox.mk
>> +++ b/package/sox/sox.mk
>> @@ -26,6 +26,14 @@ SOX_CONF_OPTS = \
>>   	--with-distro="Buildroot" \
>>   	--disable-stack-protector
>>   
>> +SOX_CFLAGS = $(TARGET_CFLAGS)
>> +
>> +ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y)
>> +SOX_CFLAGS += -O0
>> +endif
>> +
>> +SOX_CONF_ENV += CFLAGS="$(SOX_CFLAGS)"
>> +
>>   ifeq ($(BR2_PACKAGE_ALSA_LIB_PCM),y)
>>   SOX_DEPENDENCIES += alsa-lib
>>   SOX_CONF_OPTS += --enable-alsa
>> -- 
>> 2.34.1
>>
>> _______________________________________________
>> buildroot mailing list
>> buildroot@buildroot.org
>> https://lists.buildroot.org/mailman/listinfo/buildroot
> 

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH] package/sox: work around gcc bug 68485
  2022-09-09 22:15 [Buildroot] [PATCH] package/sox: work around gcc bug 68485 Giulio Benetti
  2022-09-10  7:05 ` Yann E. MORIN
  2022-09-11 19:17 ` Yann E. MORIN
@ 2022-09-18 21:12 ` Peter Korsgaard
  2 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2022-09-18 21:12 UTC (permalink / raw)
  To: Giulio Benetti; +Cc: buildroot

>>>>> "Giulio" == Giulio Benetti <giulio.benetti@benettiengineering.com> writes:

 > With Microblaze Gcc version <= 12.x the build fails due to gcc bug 68485:
 > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485. The bug show up when
 > building sox with optimization but not when building with -O0. To work
 > around this, if BR2_TOOLCHAIN_HAS_GCC_BUG_68458=y, we force using -O0.

 > Fixes:
 > http://autobuild.buildroot.net/results/ac4/ac4fbd55529ac7b4e635a11766f842cd25a833a1/

 > Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>

Committed to 2022.02.x, 2022.05.x and 2022.08.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-09-18 21:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-09 22:15 [Buildroot] [PATCH] package/sox: work around gcc bug 68485 Giulio Benetti
2022-09-10  7:05 ` Yann E. MORIN
2022-09-10 14:22   ` Giulio Benetti
2022-09-11 19:17 ` Yann E. MORIN
2022-09-11 19:19   ` Giulio Benetti
2022-09-18 21:12 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.