diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-11-02 13:40:32 -0400 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-11-13 08:58:18 -0500 |
commit | 859fd5860cd1bbbd0370ba4f20725999681b66c8 (patch) | |
tree | d60a437263aec8bbd091e8f7a413e0dd0b9f3e6a /arch/sh/Makefile | |
parent | 86a9df597cdd564d2d29c65897bcad42519e3678 (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/Makefile | 8 |
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 |
16 | endif | 16 | endif |
17 | 17 | ||
18 | ifeq ($(ARCH),sh) | ||
19 | KBUILD_DEFCONFIG := shx3_defconfig | ||
20 | else | ||
21 | KBUILD_DEFCONFIG := cayman_defconfig | ||
22 | endif | ||
23 | |||
18 | isa-y := any | 24 | isa-y := any |
19 | isa-$(CONFIG_SH_DSP) := sh | 25 | isa-$(CONFIG_SH_DSP) := sh |
20 | isa-$(CONFIG_CPU_SH2) := sh2 | 26 | isa-$(CONFIG_CPU_SH2) := sh2 |
@@ -105,14 +111,12 @@ ifdef CONFIG_SUPERH32 | |||
105 | UTS_MACHINE := sh | 111 | UTS_MACHINE := sh |
106 | BITS := 32 | 112 | BITS := 32 |
107 | LDFLAGS_vmlinux += -e _stext | 113 | LDFLAGS_vmlinux += -e _stext |
108 | KBUILD_DEFCONFIG := shx3_defconfig | ||
109 | else | 114 | else |
110 | UTS_MACHINE := sh64 | 115 | UTS_MACHINE := sh64 |
111 | BITS := 64 | 116 | BITS := 64 |
112 | LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_PAGE_OFFSET) \ | 117 | LDFLAGS_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 |
115 | KBUILD_DEFCONFIG := cayman_defconfig | ||
116 | endif | 120 | endif |
117 | 121 | ||
118 | ifdef CONFIG_CPU_LITTLE_ENDIAN | 122 | ifdef CONFIG_CPU_LITTLE_ENDIAN |