summaryrefslogtreecommitdiffstats
path: root/arch/sh/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2017-11-02 13:40:32 -0400
committerMasahiro Yamada <yamada.masahiro@socionext.com>2017-11-13 08:58:18 -0500
commit859fd5860cd1bbbd0370ba4f20725999681b66c8 (patch)
treed60a437263aec8bbd091e8f7a413e0dd0b9f3e6a /arch/sh/Makefile
parent86a9df597cdd564d2d29c65897bcad42519e3678 (diff)
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 <yamada.masahiro@socionext.com>
Diffstat (limited to 'arch/sh/Makefile')
-rw-r--r--arch/sh/Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index 280bbff12102..65300193b99f 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -15,6 +15,12 @@ ifneq ($(SUBARCH),$(ARCH))
15 endif 15 endif
16endif 16endif
17 17
18ifeq ($(ARCH),sh)
19KBUILD_DEFCONFIG := shx3_defconfig
20else
21KBUILD_DEFCONFIG := cayman_defconfig
22endif
23
18isa-y := any 24isa-y := any
19isa-$(CONFIG_SH_DSP) := sh 25isa-$(CONFIG_SH_DSP) := sh
20isa-$(CONFIG_CPU_SH2) := sh2 26isa-$(CONFIG_CPU_SH2) := sh2
@@ -105,14 +111,12 @@ ifdef CONFIG_SUPERH32
105UTS_MACHINE := sh 111UTS_MACHINE := sh
106BITS := 32 112BITS := 32
107LDFLAGS_vmlinux += -e _stext 113LDFLAGS_vmlinux += -e _stext
108KBUILD_DEFCONFIG := shx3_defconfig
109else 114else
110UTS_MACHINE := sh64 115UTS_MACHINE := sh64
111BITS := 64 116BITS := 64
112LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_PAGE_OFFSET) \ 117LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_PAGE_OFFSET) \
113 --defsym phys_stext_shmedia=phys_stext+1 \ 118 --defsym phys_stext_shmedia=phys_stext+1 \
114 -e phys_stext_shmedia 119 -e phys_stext_shmedia
115KBUILD_DEFCONFIG := cayman_defconfig
116endif 120endif
117 121
118ifdef CONFIG_CPU_LITTLE_ENDIAN 122ifdef CONFIG_CPU_LITTLE_ENDIAN