From patchwork Thu Nov 2 17:40:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 10039087 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E210A603B5 for ; Thu, 2 Nov 2017 17:42:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 386D929034 for ; Thu, 2 Nov 2017 17:41:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2D1E7291E0; Thu, 2 Nov 2017 17:41:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C4F829034 for ; Thu, 2 Nov 2017 17:41:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755149AbdKBRlY (ORCPT ); Thu, 2 Nov 2017 13:41:24 -0400 Received: from conuserg-08.nifty.com ([210.131.2.75]:55234 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752777AbdKBRlX (ORCPT ); Thu, 2 Nov 2017 13:41:23 -0400 Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-08.nifty.com with ESMTP id vA2HednF030971; Fri, 3 Nov 2017 02:40:39 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com vA2HednF030971 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1509644439; bh=QOQSixAsyUjgVXTYlk2M/sOCNxlptlCxuxqDT87IgnI=; h=From:To:Cc:Subject:Date:From; b=LvptRH+o70lX6TphXpOGotoR3xOIlxV6MlPkqgy5XcGh2oYeqFMabE0ZbmmF25/As PKscJI6pO/GW92C/lEh2H8eGAkQJT2/uNma3Cda8yGTx0j18l4LV6/4J3j7O/OOz4V wv/SENqJ/OnZsQpOUafZsrVtyy+ateJ+wo2+VmeItf7E/0gTjtou/5yBFMXpdD7D8y GxBkNOmpdQn99D39y5tSsF24/nvS6Z4qK5nkEF1KpWSkMCK4gjGCwSeF/+o8tt0RX4 DmvAcpmkeFza0GlWZOignMzeB0Zj1cX1MPfk/Wxr0P5uXcnF8SAN+1TvnlSlcDJkio +IBxcK58NeNWw== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org, linux-kbuild@vger.kernel.org Cc: Geert Uytterhoeven , Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH] sh: select KBUILD_DEFCONFIG depending on ARCH Date: Fri, 3 Nov 2017 02:40:32 +0900 Message-Id: <1509644432-21252-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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