Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/make: fix build with musl and gcc-15.x
@ 2026-05-03 23:56 Daniel Houck
  2026-05-04 13:17 ` Marcus Hoffmann via buildroot
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Daniel Houck @ 2026-05-03 23:56 UTC (permalink / raw)
  To: buildroot; +Cc: Daniel Houck

It builds fine with glibc and gcc-15.x but conditionally includes code
with musl that fails.  See eg. commit 999fb19d4b.

Fixes #176.  See also https://savannah.gnu.org/bugs/index.php?68302

Signed-off-by: Daniel Houck <Software@DRHouck.me>
---
 package/make/make.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/package/make/make.mk b/package/make/make.mk
index 1d1a976eb4..7120548bcc 100644
--- a/package/make/make.mk
+++ b/package/make/make.mk
@@ -14,6 +14,14 @@ MAKE_CPE_ID_VENDOR = gnu
 
 MAKE_CONF_OPTS = --without-guile
 
+# Make doesn't build with C23 in some configurations; see upstream #68302
+# gcc-15 defaults to -std=gnu23, so we force "-std=gnu17" for gcc version
+# supporting it. Earlier gcc versions will work, since they are using the
+# older standard.
+ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_8),y)
+MAKE_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -std=gnu17"
+endif
+
 # Disable the 'load' operation for static builds since it needs dlopen
 ifeq ($(BR2_STATIC_LIBS),y)
 MAKE_CONF_OPTS += --disable-load
-- 
2.54.0

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

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

end of thread, other threads:[~2026-05-15 17:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-03 23:56 [Buildroot] [PATCH 1/1] package/make: fix build with musl and gcc-15.x Daniel Houck
2026-05-04 13:17 ` Marcus Hoffmann via buildroot
2026-05-04 19:59   ` Daniel Houck
2026-05-04 23:06 ` [Buildroot] [PATCH v2] " Daniel Houck
2026-05-05  1:11   ` [Buildroot] [PATCH v3] " Daniel Houck
2026-05-05  8:59     ` Marcus Hoffmann via buildroot
2026-05-15 17:45 ` [Buildroot] [PATCH 1/1] " Thomas Perale via buildroot

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