Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/bash: fix build with host GCC 15
@ 2025-05-07 18:53 Florian Larysch
  2025-05-07 18:59 ` Florian Larysch
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Florian Larysch @ 2025-05-07 18:53 UTC (permalink / raw)
  To: buildroot; +Cc: Florian Larysch

bash uses K&R function declarations which have been removed in C23.

Since part of the build process (like the mkbuiltins helper) is written
in C, building bash now fails on hosts with GCC 15 (which defaults to
C23).

Since properly fixing this on the source code level is a larger
endeavor, just set the C standard to an old enough version for now.

Signed-off-by: Florian Larysch <fl@n621.de>
---
 package/bash/bash.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/bash/bash.mk b/package/bash/bash.mk
index 81f698f166..84f581da79 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_HOST_GCC_AT_LEAST_15),y)
+BASH_CONF_ENV += CFLAGS_FOR_BUILD="$(HOST_CFLAGS) -std=gnu17"
+endif
+
 # The static build needs some trickery
 ifeq ($(BR2_STATIC_LIBS),y)
 BASH_CONF_OPTS += --enable-static-link
-- 
2.49.0

_______________________________________________
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 1/1] package/bash: fix build with host GCC 15
  2025-05-07 18:53 [Buildroot] [PATCH 1/1] package/bash: fix build with host GCC 15 Florian Larysch
@ 2025-05-07 18:59 ` Florian Larysch
  2025-05-07 20:28   ` Thomas Petazzoni via buildroot
  2025-05-08 17:11 ` Julien Olivain
  2025-05-16 11:06 ` Arnout Vandecappelle via buildroot
  2 siblings, 1 reply; 6+ messages in thread
From: Florian Larysch @ 2025-05-07 18:59 UTC (permalink / raw)
  To: buildroot

Note that this is also going to cause issues for the target build once
toolchains start picking up GCC 15, but since this also requires
touching the toolchain infrastructure to make Buildroot aware of GCC 15
and I'm not too familiar with that I wanted to keep the patch for the
acute issue separate.

Florian
_______________________________________________
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 1/1] package/bash: fix build with host GCC 15
  2025-05-07 18:59 ` Florian Larysch
@ 2025-05-07 20:28   ` Thomas Petazzoni via buildroot
  2025-05-07 20:45     ` Florian Larysch
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2025-05-07 20:28 UTC (permalink / raw)
  To: Florian Larysch; +Cc: buildroot

Hello Florian,

On Wed, 7 May 2025 20:59:30 +0200
Florian Larysch <fl@n621.de> wrote:

> Note that this is also going to cause issues for the target build once
> toolchains start picking up GCC 15, but since this also requires
> touching the toolchain infrastructure to make Buildroot aware of GCC 15
> and I'm not too familiar with that I wanted to keep the patch for the
> acute issue separate.

I already posted patches to add GCC 15.x support in Buildroot:

	https://patchwork.ozlabs.org/project/buildroot/list/?series=454269

however, we haven't merged this series for now precisely because we
know there are a LOT of packages that are failing to build with GCC
15.x. We expect to merge the GCC 15.x support after Buildroot 2025.05
has been released.

Best regards,

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

* Re: [Buildroot] [PATCH 1/1] package/bash: fix build with host GCC 15
  2025-05-07 20:28   ` Thomas Petazzoni via buildroot
@ 2025-05-07 20:45     ` Florian Larysch
  0 siblings, 0 replies; 6+ messages in thread
From: Florian Larysch @ 2025-05-07 20:45 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: buildroot

Hello Thomas,

On Wed, May 07, 2025 at 10:28:29PM +0200, Thomas Petazzoni via buildroot wrote:
> I already posted patches to add GCC 15.x support in Buildroot:

Ah, thanks for pointing that out. I was focused on getting my firmware
building again and hadn't checked yet.

> We expect to merge the GCC 15.x support after Buildroot 2025.05
> has been released.

Okay, that is probably the wisest option.

Florian
_______________________________________________
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 1/1] package/bash: fix build with host GCC 15
  2025-05-07 18:53 [Buildroot] [PATCH 1/1] package/bash: fix build with host GCC 15 Florian Larysch
  2025-05-07 18:59 ` Florian Larysch
@ 2025-05-08 17:11 ` Julien Olivain
  2025-05-16 11:06 ` Arnout Vandecappelle via buildroot
  2 siblings, 0 replies; 6+ messages in thread
From: Julien Olivain @ 2025-05-08 17:11 UTC (permalink / raw)
  To: Florian Larysch; +Cc: buildroot

On 07/05/2025 20:53, Florian Larysch wrote:
> bash uses K&R function declarations which have been removed in C23.
> 
> Since part of the build process (like the mkbuiltins helper) is written
> in C, building bash now fails on hosts with GCC 15 (which defaults to
> C23).
> 
> Since properly fixing this on the source code level is a larger
> endeavor, just set the C standard to an old enough version for now.
> 
> Signed-off-by: Florian Larysch <fl@n621.de>

Applied to master, thanks.
_______________________________________________
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 1/1] package/bash: fix build with host GCC 15
  2025-05-07 18:53 [Buildroot] [PATCH 1/1] package/bash: fix build with host GCC 15 Florian Larysch
  2025-05-07 18:59 ` Florian Larysch
  2025-05-08 17:11 ` Julien Olivain
@ 2025-05-16 11:06 ` Arnout Vandecappelle via buildroot
  2 siblings, 0 replies; 6+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2025-05-16 11:06 UTC (permalink / raw)
  To: Florian Larysch, buildroot



On 07/05/2025 20:53, Florian Larysch wrote:
> bash uses K&R function declarations which have been removed in C23.
> 
> Since part of the build process (like the mkbuiltins helper) is written
> in C, building bash now fails on hosts with GCC 15 (which defaults to
> C23).
> 
> Since properly fixing this on the source code level is a larger
> endeavor, just set the C standard to an old enough version for now.
> 
> Signed-off-by: Florian Larysch <fl@n621.de>

  Applied to 2025.02.x, thanks.

  Regards,
  Arnout

> ---
>   package/bash/bash.mk | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/package/bash/bash.mk b/package/bash/bash.mk
> index 81f698f166..84f581da79 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_HOST_GCC_AT_LEAST_15),y)
> +BASH_CONF_ENV += CFLAGS_FOR_BUILD="$(HOST_CFLAGS) -std=gnu17"
> +endif
> +
>   # The static build needs some trickery
>   ifeq ($(BR2_STATIC_LIBS),y)
>   BASH_CONF_OPTS += --enable-static-link

_______________________________________________
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:[~2025-05-16 17:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-07 18:53 [Buildroot] [PATCH 1/1] package/bash: fix build with host GCC 15 Florian Larysch
2025-05-07 18:59 ` Florian Larysch
2025-05-07 20:28   ` Thomas Petazzoni via buildroot
2025-05-07 20:45     ` Florian Larysch
2025-05-08 17:11 ` Julien Olivain
2025-05-16 11:06 ` Arnout Vandecappelle via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox