From 9efd1a9ea89fdc56243146f1cdf9dfab16514dee Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Sat, 11 Oct 2025 22:17:47 +0200 Subject: [PATCH] package/micropython: fix passing multiple CFLAGS Before commit 50bc5aa17b32 (package/micropython: fix segfault at exit() with gcc >= 14), only architecture-specific CFLAGS were passed, and only one per arch. But 50bc5aa17b32 introduced a non-arch CFLAGS, for gcc versions, so when the build happens for an architecture for which there is a CFLAGS, and when gcc is 14 or newer, there are two CFLAGS added, causing build failures: [...] /usr/bin/make [...] CFLAGS_EXTRA=-DMICROPY_GCREGS_SETJMP=1 -DMICROPY_NLR_SETJMP=1 [...] /usr/bin/make: invalid option -- 'D' /usr/bin/make: invalid option -- 'M' Usage: make [options] [target] ... The fix is simple enough: just quote the CFLAGS. Fixes: https://autobuild.buildroot.org/results/b18/b18d6fa9938c1267a771fdbcd8b4c3df812cd6b9/ Fixes: 50bc5aa17b320d91809048d5ef6a110f8c0b9157 Signed-off-by: Yann E. MORIN Cc: Chris Packham Cc: Romain Naour Signed-off-by: Julien Olivain (cherry picked from commit ab906018c98e5f0838b023fa886c6c52a1cc5cf6) Signed-off-by: Thomas Perale --- package/micropython/micropython.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/micropython/micropython.mk b/package/micropython/micropython.mk index 32b361db16..e1e1f88d51 100644 --- a/package/micropython/micropython.mk +++ b/package/micropython/micropython.mk @@ -42,7 +42,7 @@ MICROPYTHON_MAKE_OPTS += \ MICROPY_PY_BTREE=0 \ MICROPY_PY_USSL=0 \ CROSS_COMPILE=$(TARGET_CROSS) \ - CFLAGS_EXTRA=$(MICROPYTHON_CFLAGS) \ + CFLAGS_EXTRA="$(MICROPYTHON_CFLAGS)" \ LDFLAGS_EXTRA="$(TARGET_LDFLAGS)" \ CWARN=