linux-mips
[Top] [All Lists]

Re: [RFC] Get rid of SUBARCH

To: Rob Landley <rob@landley.net>, Richard Weinberger <richard@nod.at>
Subject: Re: [RFC] Get rid of SUBARCH
From: David Daney <ddaney.cavm@gmail.com>
Date: Thu, 22 Aug 2013 13:55:20 -0700
Cc: Geert Uytterhoeven <geert@linux-m68k.org>, Sam Ravnborg <sam@ravnborg.org>, Linux-Arch <linux-arch@vger.kernel.org>, Michal Marek <mmarek@suse.cz>, Ralf Baechle <ralf@linux-mips.org>, Paul Mundt <lethal@linux-sh.org>, Jeff Dike <jdike@addtoit.com>, Guan Xuetao <gxt@mprc.pku.edu.cn>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>, the arch/x86 maintainers <x86@kernel.org>, linux-kbuild <linux-kbuild@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, linux-m68k <linux-m68k@lists.linux-m68k.org>, Linux MIPS Mailing List <linux-mips@linux-mips.org>, Linux-sh list <linux-sh@vger.kernel.org>, uml-devel <user-mode-linux-devel@lists.sourceforge.net>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=KnhN6jVTfBh15tGqs3VVEHUPdCxgHMF/Vfm52t7+1jk=; b=k91e7ySU6KDxw9nYWhu4nmNqCbTWgICsK+ltLMV0Q03rLNx28C/DKXR9kgsfQiswv1 If5W+pj6Lyp+d21cQlRJwEKuv/AJ6b37XUpqOnVgazXtYpRZLukmroH+QfsgEsurBsYD +T2P8XGSfbqKmKhqUhhmiMVLenkdaHsufh2C7TP9leWDSyNftkCcAy9fVYXPmnQLSZPU SbpkDlIeZdyi+7hAisk7asTa0hH6at/aYxhk+axtdk/CNReUhBtFkFrP33gW7IJmACmZ 8FBgEoriwzk2srtQWNOZZVJxlvSvhRu74P/HSSaY7qMaPPAysUHfwJJij2tWoL6xkzR1 +wbQ==
In-reply-to: <1377204069.2737.108@driftwood>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1377073172-3662-1-git-send-email-richard@nod.at> <CAMuHMdWk-EPTNmPB1O1+F7YVQLjhQsFJznYwA3t6UCGUU1T9PQ@mail.gmail.com> <20130821195157.GA18191@merkur.ravnborg.org> <CAMuHMdWqwQxxky7UDnh-oxN13C-sxfnxKVBuBz1GU_RtJvbf3A@mail.gmail.com> <1377204069.2737.108@driftwood>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7
On 08/22/2013 01:41 PM, Rob Landley wrote:
On 08/22/2013 07:58:26 AM, Geert Uytterhoeven wrote:
On Wed, Aug 21, 2013 at 9:51 PM, Sam Ravnborg <sam@ravnborg.org> wrote:
>> > The series touches also m68k, sh, mips and unicore32.
>> > These architectures magically select a cross compiler if ARCH !=
SUBARCH.
>> > Do really need that behavior?
>>
>> This does remove functionality.
>> It allows to build a kernel using e.g. "make ARCH=m68k".
>>
>> Perhaps this can be moved to generic code? Most (not all!)
cross-toolchains
>> are called $ARCH-{unknown-,}linux{,-gnu}.
>> Exceptions are e.g. am33_2.0-linux and bfin-uclinux.
>
> Today you can specify CROSS_COMPILE in Kconfig.
> With this we should be able to remove these hacks.

The correct CROSS_COMPILE value depends on the host environment, not
on the target configuration.

Actually it depends on _both_.


I think the important issue is not the exact dependencies of the value of CROSS_COMPILE, but rather that it varies enough that automatically choosing a value based on SUBARCH often gives the wrong result.

Removing SUBARCH and setting CROSS_COMPILE either from the make command line (or environment) or the config file, is a good idea because it simplifies the build system, makes things clearer, and yields more predictable results.

David Daney


<Prev in Thread] Current Thread [Next in Thread>