All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/alsa-lib: force -O2 on i386 with gcc >= 15.x
@ 2026-07-11 11:03 Bernd Kuhls
  2026-08-16 15:08 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Bernd Kuhls @ 2026-07-11 11:03 UTC (permalink / raw)
  To: buildroot

Fixes build error on i386:
pcm_dmix_i386.h: In function 'mix_areas_16':
pcm_dmix_i386.h:52:9: error: 'asm' operand has impossible constraints
 or there are not enough registers
   52 |         __asm__ __volatile__ (

Fixes:
https://autobuild.buildroot.net/results/fd9/fd9e6a6f9e2d37df3cfc1ed36707aef9a338f24d/

The oldest build error to be found dates back to Nov 2025:
https://autobuild.buildroot.net/results/3b6/3b606e0c6160563e410535d38a0e7bb09041f223/
so a backport to LTS branches should be considered.

The build error does not occur with gcc 14.4.0 and was reproduced with
gcc 16.1.0.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
Gitlab pipelines passed:
https://gitlab.com/bkuhls/buildroot/-/commits/d022d480a4556f21d86172a593a92288018ed116

 package/alsa-lib/alsa-lib.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/alsa-lib/alsa-lib.mk b/package/alsa-lib/alsa-lib.mk
index b6000b3cf3..40dbe0600d 100644
--- a/package/alsa-lib/alsa-lib.mk
+++ b/package/alsa-lib/alsa-lib.mk
@@ -18,6 +18,10 @@ ALSA_LIB_CONF_OPTS = \
 	--with-pcm-plugins="$(call qstrip,$(BR2_PACKAGE_ALSA_LIB_PCM_PLUGINS))" \
 	--with-ctl-plugins="$(call qstrip,$(BR2_PACKAGE_ALSA_LIB_CTL_PLUGINS))"
 
+ifeq ($(BR2_i386)$(BR2_TOOLCHAIN_GCC_AT_LEAST_15),yy)
+ALSA_LIB_CFLAGS += -O2
+endif
+
 ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),)
 ALSA_LIB_CONF_OPTS += --without-versioned
 endif
-- 
2.47.3

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

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

* Re: [Buildroot] [PATCH 1/1] package/alsa-lib: force -O2 on i386 with gcc >= 15.x
  2026-07-11 11:03 [Buildroot] [PATCH 1/1] package/alsa-lib: force -O2 on i386 with gcc >= 15.x Bernd Kuhls
@ 2026-08-16 15:08 ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-08-16 15:08 UTC (permalink / raw)
  To: Bernd Kuhls; +Cc: buildroot

On Sat, Jul 11, 2026 at 01:03:27PM +0200, Bernd Kuhls wrote:
> Fixes build error on i386:
> pcm_dmix_i386.h: In function 'mix_areas_16':
> pcm_dmix_i386.h:52:9: error: 'asm' operand has impossible constraints
>  or there are not enough registers
>    52 |         __asm__ __volatile__ (
> 
> Fixes:
> https://autobuild.buildroot.net/results/fd9/fd9e6a6f9e2d37df3cfc1ed36707aef9a338f24d/
> 
> The oldest build error to be found dates back to Nov 2025:
> https://autobuild.buildroot.net/results/3b6/3b606e0c6160563e410535d38a0e7bb09041f223/
> so a backport to LTS branches should be considered.
> 
> The build error does not occur with gcc 14.4.0 and was reproduced with
> gcc 16.1.0.

I have no doubt that passing -O2 works around the issue, but is this
the right fix? Especially since it didn't happen with gcc 14.x, it
does seem like a regression, no?

Could you make a bug report to GCC? Note that they want the
preprocessed source code to be able to easily reproduce.

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2026-08-16 15:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-11 11:03 [Buildroot] [PATCH 1/1] package/alsa-lib: force -O2 on i386 with gcc >= 15.x Bernd Kuhls
2026-08-16 15:08 ` Thomas Petazzoni via buildroot

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.