From 0577f6f321d7dd1585cf5f3a0a14960b8bc01ad1 Mon Sep 17 00:00:00 2001 From: Sujit Konapur Date: Mon, 9 Mar 2026 23:26:45 -0700 Subject: [PATCH] fix: use strip() when comparing PLATFORM_DEFS to avoid spurious rebuilds PLATFORM_DEFS is built with += on an initially empty variable, which produces a leading space in GNU make. The cached value written to .Makefile.options.cache has no leading space, so the ifneq comparison always evaluates to true, causing PLATFORM_CHANGED=true on every invocation and triggering a clean of bootrom/armsrc/recovery after every build. --- common_arm/Makefile.hal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common_arm/Makefile.hal b/common_arm/Makefile.hal index 429fc1717..2e10ccd3d 100644 --- a/common_arm/Makefile.hal +++ b/common_arm/Makefile.hal @@ -306,7 +306,7 @@ ifneq ($(PLATFORM), $(CACHED_PLATFORM)) PLATFORM_CHANGED=true else ifneq ($(PLATFORM_EXTRAS), $(CACHED_PLATFORM_EXTRAS)) PLATFORM_CHANGED=true -else ifneq ($(PLATFORM_DEFS), $(CACHED_PLATFORM_DEFS)) +else ifneq ($(strip $(PLATFORM_DEFS)), $(strip $(CACHED_PLATFORM_DEFS))) PLATFORM_CHANGED=true endif