Skip to content

Commit 859fd58

Browse files
committed
sh: select KBUILD_DEFCONFIG depending on ARCH
You can not select KBUILD_DEFCONFIG depending on any CONFIG option because include/config/auto.conf is not included when building config targets. So, CONFIG_SUPERH32 is never set during the configuration, then cayman_defconfig is always chosen. This commit provides a sensible way to choose shx3/cayman_defconfig. arch/sh/Kconfig sets either SUPERH32 or SUPERH64 depending on ARCH environment, like follows: config SUPERH32 def_bool ARCH = "sh" ... config SUPERH64 def_bool ARCH = "sh64" It should make sense to choose the default defconfig by ARCH, like arch/sparc/Makefile. Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 86a9df5 commit 859fd58

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

arch/sh/Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ ifneq ($(SUBARCH),$(ARCH))
1515
endif
1616
endif
1717

18+
ifeq ($(ARCH),sh)
19+
KBUILD_DEFCONFIG := shx3_defconfig
20+
else
21+
KBUILD_DEFCONFIG := cayman_defconfig
22+
endif
23+
1824
isa-y := any
1925
isa-$(CONFIG_SH_DSP) := sh
2026
isa-$(CONFIG_CPU_SH2) := sh2
@@ -105,14 +111,12 @@ ifdef CONFIG_SUPERH32
105111
UTS_MACHINE := sh
106112
BITS := 32
107113
LDFLAGS_vmlinux += -e _stext
108-
KBUILD_DEFCONFIG := shx3_defconfig
109114
else
110115
UTS_MACHINE := sh64
111116
BITS := 64
112117
LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_PAGE_OFFSET) \
113118
--defsym phys_stext_shmedia=phys_stext+1 \
114119
-e phys_stext_shmedia
115-
KBUILD_DEFCONFIG := cayman_defconfig
116120
endif
117121

118122
ifdef CONFIG_CPU_LITTLE_ENDIAN

0 commit comments

Comments
 (0)