From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 22 Aug 2013 16:32:55 -0500 From: Rob Landley In-Reply-To: <52167AB8.4060206@gmail.com> (from ddaney.cavm@gmail.com on Thu Aug 22 15:55:20 2013) Message-Id: <1377207175.2737.113@driftwood> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; DelSp=Yes; Format=Flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [RFC] Get rid of SUBARCH To: David Daney Cc: Richard Weinberger , Geert Uytterhoeven , Sam Ravnborg , Linux-Arch , Michal Marek , Ralf Baechle , Paul Mundt , Jeff Dike , Guan Xuetao , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , the arch/x86 maintainers , linux-kbuild , "linux-kernel@vger.kernel.org" , linux-m68k , Linux MIPS Mailing List , Linux-sh list , uml-devel List-ID: On 08/22/2013 03:55:20 PM, David Daney wrote: > 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 =20 >>> wrote: >>> >> > The series touches also m68k, sh, mips and unicore32. >>> >> > These architectures magically select a cross compiler if ARCH =20 >>> !=3D >>> SUBARCH. >>> >> > Do really need that behavior? >>> >> >>> >> This does remove functionality. >>> >> It allows to build a kernel using e.g. "make ARCH=3Dm68k". >>> >> >>> >> 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. >>>=20 >>> The correct CROSS_COMPILE value depends on the host environment, not >>> on the target configuration. >>=20 >> Actually it depends on _both_. >>=20 >=20 > I think the important issue is not the exact dependencies of the =20 > value of CROSS_COMPILE, but rather that it varies enough that =20 > automatically choosing a value based on SUBARCH often gives the wrong =20 > result. >=20 > Removing SUBARCH and setting CROSS_COMPILE either from the make =20 > command line (or environment) or the config file, is a good idea =20 > because it simplifies the build system, makes things clearer, and =20 > yields more predictable results. >=20 > David Daney Agreed. Expecting the build to guess the right $CROSS_COMPILE is like =20 expecting it to guess the right $PATH. It should be specified, not =20 heuristically probed. Rob=