Received: by 2002:ac0:a874:0:0:0:0:0 with SMTP id c49csp542345ima; Fri, 15 Mar 2019 08:28:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqytWqqNTk9v7N5DgxG3uP+S0PcZzbt3g/ZvZl+HPdyu+oLgmo8ISAoam5t0n6OGUfZCt4zz X-Received: by 2002:a63:4f61:: with SMTP id p33mr3977036pgl.303.1552663694629; Fri, 15 Mar 2019 08:28:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552663694; cv=none; d=google.com; s=arc-20160816; b=wjVZnR2IRU+fXVdEFlTPCEwb4Hp0QvMoWmkIkxQ2Oa1Gq/fXfAJKSWMHiuj3HczbJC 3IzMHNgNQ7DxId+biZWD9mS+zxCmCxH2Uy6cpV+oSNz/Zge219eI72ItYBXNpMvmM/Pw Gis3A86WxpRIVrH0blKEBT1oqYpxjP7hp+wIa8Ui4djcUJTAkhs59jqolE/wv/cgIyzw eWXCw8pfPtvh4B6AJnBnI7ligKeOSH0UB0+N7x8AJiuXzQYtU/kGmMjvpA3J9e3qEiWP GOhJmHTXATird8nzZPZS1Af2wxbk9X3j+Ohg3tSeJmqnTSOMcNU9MZCpVxG8+tv67igG OlEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature:dkim-filter; bh=F1xXciikqYB8cmJ49LUR/BkfpBtjwYwmxJsa/dIlFGI=; b=haaC9uk5Ux3q64+dzHksnOrv4DqbPusNrfqcgtQsDvtwk6Epu+ZvtYmUS7vdZcPAm4 MkRVmOqYHStQB38Lw3n+x4sWyOcZjKpuKWLRn2IAXMIklCO79Ek463IocWLsfXNjnXN+ yPYgh8DgrvQlkHvGfBYiCGzA8R8TO5h07mKUOpzAQtv+DdoApFnkrILODlUY55pU4D20 cVAv+fCT7fn3jcFhh3bico3GUZQJcOjaA30ZLb8dzgHb26OS6+k2aUC+2XczpOQevHav 2lHS5+MtQ5NaJJ4O1qd70YHBmvtummS3YxhZowHYX4xfqD6eiU+HYGpErvcU1//60EDe 7g1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=MbRMqiQd; 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 42si2127126pld.383.2019.03.15.08.27.59; Fri, 15 Mar 2019 08:28:14 -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=MbRMqiQd; 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 S1729331AbfCOP0F (ORCPT + 99 others); Fri, 15 Mar 2019 11:26:05 -0400 Received: from conssluserg-04.nifty.com ([210.131.2.83]:60688 "EHLO conssluserg-04.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726792AbfCOP0F (ORCPT ); Fri, 15 Mar 2019 11:26:05 -0400 Received: from mail-vs1-f53.google.com (mail-vs1-f53.google.com [209.85.217.53]) (authenticated) by conssluserg-04.nifty.com with ESMTP id x2FFPrRu015887 for ; Sat, 16 Mar 2019 00:25:54 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com x2FFPrRu015887 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1552663554; bh=F1xXciikqYB8cmJ49LUR/BkfpBtjwYwmxJsa/dIlFGI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=MbRMqiQdv3FG+Yj08b5/4lrhQiMpbZXdvMTBz1GuzXDUg94e/8qUPLJQSWvu1hyVN kzQYvpeVWejCitMH8XioNvWHd82hwKLx4WPC6KkknC8k/25MBRlrvyLjwMDwKZX4cJ d38fI8yJ0kfDIV6MoQTEapBLMZW/GUoKcepyGJpqZQivLIY3TYGS9lVJp8ZHC7+fF5 pp88WIQRsJ7yEJtLeeA8rBkJxRvlGFxXgi95yJol+NpVfDBXnaUlwKLIyjvb++cndV etHd80Zf9X7BqNxB83Or+6VO82rq178R02fIpzJKyBbqYCl7p30lNmyBig3yPx1Tcz pvdaK4gNa2XIQ== X-Nifty-SrcIP: [209.85.217.53] Received: by mail-vs1-f53.google.com with SMTP id c189so5600049vsd.9 for ; Fri, 15 Mar 2019 08:25:54 -0700 (PDT) X-Gm-Message-State: APjAAAXtc9Fg1xYajUpY2HNWmWrnQfilX33vttFK5JB3SI1G0JV3Hcu6 DBUO9yaRgQjRIvch8Y2OJQHzcHl9F5tur/kqh6A= X-Received: by 2002:a67:ea05:: with SMTP id g5mr2262322vso.179.1552663553032; Fri, 15 Mar 2019 08:25:53 -0700 (PDT) MIME-Version: 1.0 References: <1550223519-18290-1-git-send-email-yamada.masahiro@socionext.com> <87y35i9osc.fsf@concordia.ellerman.id.au> In-Reply-To: <87y35i9osc.fsf@concordia.ellerman.id.au> From: Masahiro Yamada Date: Sat, 16 Mar 2019 00:25:17 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] powerpc: use $(origin ARCH) to select KBUILD_DEFCONFIG To: Michael Ellerman Cc: Mathieu Malaterre , linuxppc-dev , Paul Mackerras , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 14, 2019 at 11:27 AM Michael Ellerman wrote: > > Mathieu Malaterre writes: > > On Sat, Feb 16, 2019 at 3:26 AM Masahiro Yamada > > wrote: > >> > >> On Sat, Feb 16, 2019 at 1:11 AM Mathieu Malaterre wrote: > >> > > >> > On Fri, Feb 15, 2019 at 10:41 AM Masahiro Yamada > >> > wrote: > >> > > > >> > > I often test all Kconfig commands for all architectures. To ease my > >> > > workflow, I want 'make defconfig' at least working without any cross > >> > > compiler. > >> > > > >> > > Currently, arch/powerpc/Makefile checks CROSS_COMPILE to decide the > >> > > default defconfig source. > >> > > > >> > > If CROSS_COMPILE is unset, it is likely to be the native build, so > >> > > 'uname -m' is useful to choose the defconfig. If CROSS_COMPILE is set, > >> > > the user is cross-building (i.e. 'uname -m' is probably x86_64), so > >> > > it falls back to ppc64_defconfig. Yup, make sense. > >> > > > >> > > However, I want to run 'make ARCH=* defconfig' without setting > >> > > CROSS_COMPILE for each architecture. > >> > > > >> > > My suggestion is to check $(origin ARCH). > >> > > > >> > > When you cross-compile the kernel, you need to set ARCH from your > >> > > environment or from the command line. > >> > > > >> > > For the native build, you do not need to set ARCH. The default in > >> > > the top Makefile is used: > >> > > > >> > > ARCH ?= $(SUBARCH) > >> > > > >> > > Hence, $(origin ARCH) returns 'file'. > >> > > > >> > > Before this commit, 'make ARCH=powerpc defconfig' failed: > >> > > >> > In case you have not seen it, please check: > >> > > >> > http://patchwork.ozlabs.org/patch/1037835/ > >> > >> I did not know that because I do not subscribe to ppc ML. > >> > >> Michael's patch looks good to me. > > > > OK > > > >> > >> If you mimic x86, the following will work: > >> > > > > Nice! Michael do you have a preference ? > > Yeah I don't like playing games with ARCH. Doing so means auto builders > and other build scripts need to learn about the special rules for ARCH, > which is a pain. > > So I'll merge my patch, which I think will also work for Masahiro's > case. > > cheers Yes, works for me. Thanks! -- Best Regards Masahiro Yamada