package/micropython: fix passing multiple CFLAGS

Before commit 50bc5aa17b (package/micropython: fix segfault at exit()
with gcc >= 14), only architecture-specific CFLAGS were passed, and only
one per arch. But 50bc5aa17b 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: 50bc5aa17b

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Chris Packham <judge.packham@gmail.com>
Cc: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
(cherry picked from commit ab906018c9)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
Yann E. MORIN
2025-10-11 22:17:47 +02:00
committed by Arnout Vandecappelle
parent ac4b335544
commit 9efd1a9ea8

View File

@@ -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=