You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
arm64 toolchain: -mcpu=cortex-* branches are unreachable in both Toolchain.defs and cmake/Toolchain.cmake #20400
In arch/arm64/src/Toolchain.defs and arch/arm64/src/cmake/Toolchain.cmake the per-core -mcpu branches sit behind the CONFIG_ARCH_ARMV8A test, which always matches first because every ARCH_CORTEX_A5x config selects ARCH_ARMV8A (arch/arm64/Kconfig :332, :343, :354, :365):
Toolchain.defs — ARCH_ARMV8A tested at :35, -mcpu=cortex-* branches at :51-58
cmake/Toolchain.cmake — ARCH_ARMV8A tested at :28, same branches at :36-41
As a result the -mcpu=cortex-a53/a55/a57/a72 branches are unreachable in both build systems: every Cortex-A target builds with plain -march=armv8-a and loses per-core scheduling/tuning. The dead branches are also a trap for anyone adding a new core — a -mcpu entry appended at the end of the chain silently never takes effect.
Either move the -mcpu branches ahead of the CONFIG_ARCH_ARMV8A test so per-core flags win, or drop the dead branches. Happy to open a PR.
Activity