From be4fb117bc7dc078c2097fe0eae6bbbfab0c465b Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Sat, 11 Oct 2025 22:18:03 +0200 Subject: [PATCH] package/micropython: use append-assignment in conditional code Since its inception in 9646e80fca28 (micropython: new package), the ppc-specific CFLAGS are simply assigned, and since 9fd9f4e6752f (package/micropython: define MICROPY_NLR_SETJMP for xtensa), the same goes for the xtensa CFLAGS. Although they are mutually exclusive (different archs) and that there is no prior assignment, the customs are to use append assignment in conditional blocks, to avoid accidentally overwriting a valure set previously. Signed-off-by: Yann E. MORIN Cc: Chris Packham Signed-off-by: Julien Olivain --- package/micropython/micropython.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/micropython/micropython.mk b/package/micropython/micropython.mk index e1e1f88d51..826247069e 100644 --- a/package/micropython/micropython.mk +++ b/package/micropython/micropython.mk @@ -21,12 +21,12 @@ MICROPYTHON_IGNORE_CVES += CVE-2024-8947 # Use fallback implementation for exception handling on architectures that don't # have explicit support. ifeq ($(BR2_i386)$(BR2_x86_64)$(BR2_arm)$(BR2_armeb),) -MICROPYTHON_CFLAGS = -DMICROPY_GCREGS_SETJMP=1 +MICROPYTHON_CFLAGS += -DMICROPY_GCREGS_SETJMP=1 endif # xtensa has problems with nlr_push, use setjmp based implementation instead ifeq ($(BR2_xtensa),y) -MICROPYTHON_CFLAGS = -DMICROPY_NLR_SETJMP=1 +MICROPYTHON_CFLAGS += -DMICROPY_NLR_SETJMP=1 endif # https://github.com/micropython/micropython/issues/14115