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: 117838 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2454757qgn; Thu, 2 Nov 2017 10:41:27 -0700 (PDT) X-Google-Smtp-Source: ABhQp+THRlIslIJ0wvztR1bJcMhPizbVoqgp2iV/A61Y4Dzmdii+YwIl3aq8FmswiMkSw13J7hqC X-Received: by 10.101.87.139 with SMTP id b11mr4485009pgr.314.1509644487862; Thu, 02 Nov 2017 10:41:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509644487; cv=none; d=google.com; s=arc-20160816; b=WrMCpHZyxj/ycrcjrm6AV/KjZD6S9URl8ODnXmyrmtKxCu+V55hJ7YFWwmArWCdZHh /4BhOHorRMW5/qzjnY4mP6h1BQjhaPCUIDyRHqDNegEqUEAsuWHlO90x8G5pPZ4vP/JH S0erjpV0ikdu5FcfW7O8DveQfwLuRLuVGHInkQq/lZRoPFTMmP+AzsIyy3lKXVYVpkeQ xmRZUc2RLTho56o1Wjtlz8yzRy2YSgJq1JLjZVeo2WfjF6HlATbTjoROTUyURcWx2v4s bMclafoMe5AJpPkeGOsjw+eRk3vYmaBHajjVCnC2fHAzZd72Ob96hmw3t1VNeKK63sI6 /WQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter:arc-authentication-results; bh=QOQSixAsyUjgVXTYlk2M/sOCNxlptlCxuxqDT87IgnI=; b=TdbUNBNIYBPCkG3R9+opCCCwRgpVmAXbTVtMXSidose5yA/zYDEbAICFywpP5lIhe/ ZkMW0+nFs1D5hlvmh4M0lbjTbI2t1CajTBKCiz1oH8BSysIDYc6/B8YdfFllY9xCEEw7 dJrZpHbQh9M0lucDMVIt0Ze+a71VO0o9Kg+0I8KgFmQ2cTTbyBUz/5ABm/oVseYF9Lkl /u9vnev0o5LnAdvu/v+rFm2Wuz2WpTYZrGSFD8SpjXGKNsp73iy/ZIyUWsu51oGIoH9l 9aWfULwGjQIzUbXMAzYTNtACP8Xb2UNv61r7Z6xC0RK1ZjLaLJ2QpcQ35xS/q4vQ6Ww1 Cj5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=LvptRH+o; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f7si2981767plm.2.2017.11.02.10.41.27; Thu, 02 Nov 2017 10:41:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=LvptRH+o; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755573AbdKBRlZ (ORCPT + 26 others); Thu, 2 Nov 2017 13:41:25 -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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.7.4 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