All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/bash: fix build with gcc 15
@ 2025-08-11 15:32 Yann E. MORIN via buildroot
  2025-08-12 22:24 ` Florian Larysch
  2025-08-16 21:06 ` Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 4+ messages in thread
From: Yann E. MORIN via buildroot @ 2025-08-11 15:32 UTC (permalink / raw)
  To: buildroot; +Cc: Yann E. MORIN, Adam Duskett, Florian Larysch, Julien Olivain

Commit 6d09b25d08fe (package/bash: fix build with host GCC 15) did
apply a workaround for when the host gcc is gcc-15 (or later), but
missed the fact that the target compiler also exhibits build issues.

For the same reasons as explained in 6d09b25d08fe, don't try and fix
those issues, but just paper over the problem by using an older C
standard.

Fixes: b7882d024ae484c52473955fbbcbf3b5f0717c2f

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Adam Duskett <adam.duskett@amarulasolutions.com>
Cc: Florian Larysch <fl@n621.de>
Cc: Julien Olivain <ju.o@free.fr>
---
 package/bash/bash.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/bash/bash.mk b/package/bash/bash.mk
index 2747802592..1e356e8631 100644
--- a/package/bash/bash.mk
+++ b/package/bash/bash.mk
@@ -26,6 +26,10 @@ BASH_CONF_ENV = \
 	bash_cv_func_sigsetjmp=present \
 	bash_cv_printf_a_format=yes
 
+ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_15),y)
+BASH_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -std=gnu17"
+endif
+
 ifeq ($(BR2_HOST_GCC_AT_LEAST_15),y)
 BASH_CONF_ENV += CFLAGS_FOR_BUILD="$(HOST_CFLAGS) -std=gnu17"
 endif
-- 
2.47.0

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

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

* Re: [Buildroot] [PATCH] package/bash: fix build with gcc 15
  2025-08-11 15:32 [Buildroot] [PATCH] package/bash: fix build with gcc 15 Yann E. MORIN via buildroot
@ 2025-08-12 22:24 ` Florian Larysch
  2025-08-13 15:45   ` Yann E. MORIN via buildroot
  2025-08-16 21:06 ` Thomas Petazzoni via buildroot
  1 sibling, 1 reply; 4+ messages in thread
From: Florian Larysch @ 2025-08-12 22:24 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: buildroot, Adam Duskett, Julien Olivain

Hi Yann,

On Mon, Aug 11, 2025 at 05:32:57PM +0200, Yann E. MORIN via buildroot wrote:
> Commit 6d09b25d08fe (package/bash: fix build with host GCC 15) did
> apply a workaround for when the host gcc is gcc-15 (or later), but
> missed the fact that the target compiler also exhibits build issues.

At that point in time, the patch that introduced
BR2_TOOLCHAIN_GCC_AT_LEAST_15 hadn't been merged yet and I honestly
just forgot about handling it afterwards. Thanks for fixing it!
 
> For the same reasons as explained in 6d09b25d08fe, don't try and fix
> those issues, but just paper over the problem by using an older C
> standard.

It seems that bash 5.3 (released last month) fixes these issues[1]. I've
just build-tested this with GCC 15 on my machine and it indeed sems to
be working fine now, so this is probably worth a version bump soon. But
for the old version it makes sense to fix it like this for now.

Reviewed-by: Florian Larysch <fl@n621.de>

Florian

[1] https://lwn.net/Articles/1029079/
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] package/bash: fix build with gcc 15
  2025-08-12 22:24 ` Florian Larysch
@ 2025-08-13 15:45   ` Yann E. MORIN via buildroot
  0 siblings, 0 replies; 4+ messages in thread
From: Yann E. MORIN via buildroot @ 2025-08-13 15:45 UTC (permalink / raw)
  To: Florian Larysch; +Cc: buildroot, Adam Duskett, Julien Olivain

Florian, All,

On 2025-08-13 00:24 +0200, Florian Larysch spake thusly:
> On Mon, Aug 11, 2025 at 05:32:57PM +0200, Yann E. MORIN via buildroot wrote:
> > Commit 6d09b25d08fe (package/bash: fix build with host GCC 15) did
> > apply a workaround for when the host gcc is gcc-15 (or later), but
> > missed the fact that the target compiler also exhibits build issues.
> At that point in time, the patch that introduced
> BR2_TOOLCHAIN_GCC_AT_LEAST_15 hadn't been merged yet

Ah, that indeed explains it, then. 👍

> It seems that bash 5.3 (released last month) fixes these issues[1]. I've
> just build-tested this with GCC 15 on my machine and it indeed sems to
> be working fine now, so this is probably worth a version bump soon. But
> for the old version it makes sense to fix it like this for now.

Even if the bump fixes the build issues, we want the fix so that it can
be backported to maintenance branches, I think.

> Reviewed-by: Florian Larysch <fl@n621.de>

Thanks! :-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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] 4+ messages in thread

* Re: [Buildroot] [PATCH] package/bash: fix build with gcc 15
  2025-08-11 15:32 [Buildroot] [PATCH] package/bash: fix build with gcc 15 Yann E. MORIN via buildroot
  2025-08-12 22:24 ` Florian Larysch
@ 2025-08-16 21:06 ` Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2025-08-16 21:06 UTC (permalink / raw)
  To: Yann E. MORIN via buildroot
  Cc: Yann E. MORIN, Adam Duskett, Florian Larysch, Julien Olivain

Hello Yann,

Thanks for the patch!

On Mon, 11 Aug 2025 17:32:57 +0200
"Yann E. MORIN via buildroot" <buildroot@buildroot.org> wrote:

> Commit 6d09b25d08fe (package/bash: fix build with host GCC 15) did
> apply a workaround for when the host gcc is gcc-15 (or later), but
> missed the fact that the target compiler also exhibits build issues.
> 
> For the same reasons as explained in 6d09b25d08fe, don't try and fix
> those issues, but just paper over the problem by using an older C
> standard.
> 
> Fixes: b7882d024ae484c52473955fbbcbf3b5f0717c2f

This "Fixes" didn't make much sense. You're not really fixing a
previous commit here. Rather you're fixing an autobuilder issue, so
I've added a reference to the autobuilder issue being fixed instead.

> +ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_15),y)
> +BASH_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -std=gnu17"
> +endif

Added a comment above this indicating that it can be dropped when
bumping to bash 5.3.

Applied to master with those fixes. Thanks again!

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] 4+ messages in thread

end of thread, other threads:[~2025-08-16 21:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-11 15:32 [Buildroot] [PATCH] package/bash: fix build with gcc 15 Yann E. MORIN via buildroot
2025-08-12 22:24 ` Florian Larysch
2025-08-13 15:45   ` Yann E. MORIN via buildroot
2025-08-16 21:06 ` 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.