All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/am33x-cm3: fix build with gcc >= 15
@ 2026-10-14  7:37 Dario Binacchi
  2026-10-14  7:37 ` [Buildroot] [PATCH 2/2] configs/beaglebone: bump Linux to 6.18.56 and U-Boot to 2026.10 Dario Binacchi
  2026-10-20 10:18 ` [Buildroot] [PATCH 1/2] package/am33x-cm3: fix build with gcc >= 15 Peter Korsgaard
  0 siblings, 2 replies; 4+ messages in thread
From: Dario Binacchi @ 2026-10-14  7:37 UTC (permalink / raw)
  To: buildroot; +Cc: Dario Binacchi, Lothar Felten

gcc 15 defaults to the C23 standard, where bool, true and false are
keywords. The am33x-cm3 code base defines them in its own stddef.h,
so the build fails with:

src/include/stddef.h:18:15: error: 'bool' cannot be defined via 'typedef'
   18 | typedef _Bool bool;
      |               ^~~~
src/include/stddef.h:19:8: error: cannot use keyword 'false' as enumeration constant
   19 | enum { false, true };
      |        ^~~~~

The upstream project has not received any commit since 2018 and none
of its branches fix this issue, so rather than carrying a patch that
cannot be submitted to an active upstream, force the GNU C11 standard
in the .mk file.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 package/am33x-cm3/am33x-cm3.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/package/am33x-cm3/am33x-cm3.mk b/package/am33x-cm3/am33x-cm3.mk
index 8c890a75fc3c..f753e46134b3 100644
--- a/package/am33x-cm3/am33x-cm3.mk
+++ b/package/am33x-cm3/am33x-cm3.mk
@@ -13,8 +13,10 @@ AM33X_CM3_LICENSE_FILES = License.txt
 
 # The build command below will use the standard cross-compiler (normally
 # build for Cortex-A8, to build the FW for the Cortex-M3.
+# The code base predates C23 and defines its own bool/true/false, so
+# force an older C standard to build with gcc >= 15.
 define AM33X_CM3_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D) all
+	$(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC) -std=gnu11" CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D) all
 endef
 
 define AM33X_CM3_INSTALL_TARGET_CMDS
-- 
2.43.0

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

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

end of thread, other threads:[~2026-10-20 10:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-14  7:37 [Buildroot] [PATCH 1/2] package/am33x-cm3: fix build with gcc >= 15 Dario Binacchi
2026-10-14  7:37 ` [Buildroot] [PATCH 2/2] configs/beaglebone: bump Linux to 6.18.56 and U-Boot to 2026.10 Dario Binacchi
2026-10-20 10:18   ` Peter Korsgaard
2026-10-20 10:18 ` [Buildroot] [PATCH 1/2] package/am33x-cm3: fix build with gcc >= 15 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.