targets: derive ARM ISA features from CPU_TYPE

arm_v6 and arm_v7 are taken from the merged kernel config, which
describes the kernel and can differ from the userspace ISA:
sunxi/arm926ejs inherits CONFIG_CPU_V7=y from its target config and is
advertised as ARMv7 although it builds for arm926ej-s, and a promptless
symbol such as CPU_V7 cannot be unset in a subtarget config in a way
that survives kernel_oldconfig. Derive arm_v6, arm_v6k and arm_v7 from
CPU_TYPE, the core the toolchain targets, and keep ARMv6K, which has
ldrexd/strexd, apart from plain ARMv6.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
Daniel Golle committed 2026-09-13 20:46:35 +01:00
1 parent 1560c75fa2
commit d223c88f57
2 files changed
+12 -9

No files matched your search

+9 -9
View File
@@ -238,6 +238,15 @@ ifeq ($(DUMP),1)
endif
ifneq ($(findstring arm,$(ARCH)),)
CPU_TYPE ?= xscale
ifneq ($(filter arm1136j-s arm1136jf-s arm1156t2-s,$(CPU_TYPE)),)
FEATURES += arm_v6
endif
ifneq ($(filter arm1176jz-s arm1176jzf-s mpcore mpcorenovfp,$(CPU_TYPE)),)
FEATURES += arm_v6k
endif
ifneq ($(filter cortex-a% generic-armv7-a marvell-pj4,$(CPU_TYPE)),)
FEATURES += arm_v7
endif
endif
ifeq ($(ARCH),powerpc)
CPU_CFLAGS_603e:=-mcpu=603e
@@ -330,15 +339,6 @@ ifeq ($(DUMP),1)
ifneq ($(CONFIG_CPU_MIPS32_R2),)
FEATURES += mips16
endif
ifneq ($(CONFIG_CPU_V6),)
FEATURES += arm_v6
endif
ifneq ($(CONFIG_CPU_V6K),)
FEATURES += arm_v6
endif
ifneq ($(CONFIG_CPU_V7),)
FEATURES += arm_v7
endif
# remove duplicates
FEATURES:=$(sort $(FEATURES))
+3
View File
@@ -152,6 +152,9 @@ config armeb
config arm_v6
bool
config arm_v6k
bool
config arm_v7
bool