* [PATCH] sh: select KBUILD_DEFCONFIG depending on ARCH
@ 2017-11-02 17:40 Masahiro Yamada
2017-11-13 15:26 ` Masahiro Yamada
0 siblings, 1 reply; 3+ messages in thread
From: Masahiro Yamada @ 2017-11-02 17:40 UTC (permalink / raw)
To: Yoshinori Sato, Rich Felker, linux-sh, linux-kbuild
Cc: Geert Uytterhoeven, Masahiro Yamada, linux-kernel
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,
and cayman_defconfig is 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>
---
arch/sh/Makefile | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index 280bbff..65300193 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -15,6 +15,12 @@ ifneq ($(SUBARCH),$(ARCH))
endif
endif
+ifeq ($(ARCH),sh)
+KBUILD_DEFCONFIG := shx3_defconfig
+else
+KBUILD_DEFCONFIG := cayman_defconfig
+endif
+
isa-y := any
isa-$(CONFIG_SH_DSP) := sh
isa-$(CONFIG_CPU_SH2) := sh2
@@ -105,14 +111,12 @@ ifdef CONFIG_SUPERH32
UTS_MACHINE := sh
BITS := 32
LDFLAGS_vmlinux += -e _stext
-KBUILD_DEFCONFIG := shx3_defconfig
else
UTS_MACHINE := sh64
BITS := 64
LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_PAGE_OFFSET) \
--defsym phys_stext_shmedia=phys_stext+1 \
-e phys_stext_shmedia
-KBUILD_DEFCONFIG := cayman_defconfig
endif
ifdef CONFIG_CPU_LITTLE_ENDIAN
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] sh: select KBUILD_DEFCONFIG depending on ARCH
2017-11-02 17:40 [PATCH] sh: select KBUILD_DEFCONFIG depending on ARCH Masahiro Yamada
@ 2017-11-13 15:26 ` Masahiro Yamada
2017-11-13 15:57 ` John Paul Adrian Glaubitz
0 siblings, 1 reply; 3+ messages in thread
From: Masahiro Yamada @ 2017-11-13 15:26 UTC (permalink / raw)
To: Yoshinori Sato, Rich Felker, Linux-sh list, Linux Kbuild mailing list
Cc: Geert Uytterhoeven, Masahiro Yamada, Linux Kernel Mailing List
2017-11-03 2:40 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
> 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,
> and cayman_defconfig is 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>
Applied to linux-kbuild/kbuild.
> ---
>
> arch/sh/Makefile | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/arch/sh/Makefile b/arch/sh/Makefile
> index 280bbff..65300193 100644
> --- a/arch/sh/Makefile
> +++ b/arch/sh/Makefile
> @@ -15,6 +15,12 @@ ifneq ($(SUBARCH),$(ARCH))
> endif
> endif
>
> +ifeq ($(ARCH),sh)
> +KBUILD_DEFCONFIG := shx3_defconfig
> +else
> +KBUILD_DEFCONFIG := cayman_defconfig
> +endif
> +
> isa-y := any
> isa-$(CONFIG_SH_DSP) := sh
> isa-$(CONFIG_CPU_SH2) := sh2
> @@ -105,14 +111,12 @@ ifdef CONFIG_SUPERH32
> UTS_MACHINE := sh
> BITS := 32
> LDFLAGS_vmlinux += -e _stext
> -KBUILD_DEFCONFIG := shx3_defconfig
> else
> UTS_MACHINE := sh64
> BITS := 64
> LDFLAGS_vmlinux += --defsym phys_stext=_stext-$(CONFIG_PAGE_OFFSET) \
> --defsym phys_stext_shmedia=phys_stext+1 \
> -e phys_stext_shmedia
> -KBUILD_DEFCONFIG := cayman_defconfig
> endif
>
> ifdef CONFIG_CPU_LITTLE_ENDIAN
> --
> 2.7.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] sh: select KBUILD_DEFCONFIG depending on ARCH
2017-11-13 15:26 ` Masahiro Yamada
@ 2017-11-13 15:57 ` John Paul Adrian Glaubitz
0 siblings, 0 replies; 3+ messages in thread
From: John Paul Adrian Glaubitz @ 2017-11-13 15:57 UTC (permalink / raw)
To: Masahiro Yamada, Yoshinori Sato, Rich Felker, Linux-sh list,
Linux Kbuild mailing list
Cc: Geert Uytterhoeven, Linux Kernel Mailing List
On 11/13/2017 04:26 PM, Masahiro Yamada wrote:
>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>
>
> Applied to linux-kbuild/kbuild.
Thanks for this. The linux-sh maintainers are currently falling behind
a bit, so I'm glad someone still takes care of these updates.
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - glaubitz@debian.org
`. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-11-13 15:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-02 17:40 [PATCH] sh: select KBUILD_DEFCONFIG depending on ARCH Masahiro Yamada
2017-11-13 15:26 ` Masahiro Yamada
2017-11-13 15:57 ` John Paul Adrian Glaubitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).