[PATCH v2 3/4] kbuild: Remove MFS flags from Propeller profile generate builds
From: xur
Date: Tue Oct 14 2025 - 15:12:05 EST
From: Rong Xu <xur@xxxxxxxxxx>
Propeller profile generation requires Machine Function Splitter (MFS)
to be disabled.
Change-Id: I12579e6f2cfaecefbed0ce85f1904f79783562a1
Signed-off-by: Rong Xu <xur@xxxxxxxxxx>
---
scripts/Makefile.propeller | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/scripts/Makefile.propeller b/scripts/Makefile.propeller
index fa018098506b8..8c3e514dbcc04 100644
--- a/scripts/Makefile.propeller
+++ b/scripts/Makefile.propeller
@@ -13,8 +13,14 @@ else
else
CFLAGS_PROPELLER_CLANG := -fbasic-block-sections=labels
endif
+ # Disable Machine Function Splitter for Propeller.
+ # Propeller profile generation requires Machine Function Splitter to be disabled.
+ # We use -fno-split-machine-functions to override any prior AutoFDO/PGO flags
+ #(in Makefile.lib), assuming Propeller options are applied afterward.
+ CFLAGS_PROPELLER_CLANG += -fno-split-machine-functions
endif
+
# Propeller requires debug information to embed module names in the profiles.
# If CONFIG_DEBUG_INFO is not enabled, set -gmlt option. Skip this for AutoFDO,
# as the option should already be set.
@@ -33,6 +39,8 @@ ifdef CONFIG_LTO_CLANG_THIN
else
_ldflags_propeller += --lto-basic-block-sections=labels
endif
+ # Again, we need to disable Machine Function Splitter.
+ LDFLAGS_vmlinux := $(filter-out -plugin-opt=-split-machine-functions, $(LDFLAGS_vmlinux))
endif
endif
--
2.51.0.788.g6d19910ace-goog