linux-mips
[Top] [All Lists]

Re: MIPS Makefile not picking up CROSS_COMPILE from environment setting

To: Ralf Baechle <ralf@linux-mips.org>
Subject: Re: MIPS Makefile not picking up CROSS_COMPILE from environment setting
From: "Maciej W. Rozycki" <macro@linux-mips.org>
Date: Fri, 19 Oct 2007 13:39:14 +0100 (BST)
Cc: Wolfgang Denk <wd@denx.de>, linux-mips@linux-mips.org
In-reply-to: <20071019111823.GB30767@linux-mips.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20071018184636.48637242E9@gemini.denx.de> <20071019111823.GB30767@linux-mips.org>
Sender: linux-mips-bounce@linux-mips.org
On Fri, 19 Oct 2007, Ralf Baechle wrote:

> The idea of passing CROSS_COMPILE from the environment always seemed to
> be wrong to me - I keep jumping between all sorts of weird different
> kernel configurations so no single setting of an environment variable
> would cut it.

 Yes, picking stuff from the environment tends to lead to surprising 
behaviour some time later when one has already forgotten they have got 
that setting put there.  However, for the insistent, it is always possible 
to override the variable at the make's command line, so you can say e.g.:

$ make "CROSS_COMPILE=mips64el-linux-" vmlinux

which is what I actually do, or, for the hard-liners:

$ make "CROSS_COMPILE=$CROSS_COMPILE" vmlinux

;-)

> What I'd really like to see is a properly working CONFIG_MYARCH option
> selectable in Kconfig.  Then the makefiles should figure out if it's a
> native or crosscompile and add the right tool prefix.  The user should
> not need to know that sort of stuff unless he wants to.

 Well, the tool prefix cannot be figured out automatically anyway, as, 
assuming 32-bit little-endian MIPS for example, it can be one of:

mipsel-linux-
mipsel-unknown-linux-gnu-
mipsel-dec-linux-
...

-- essentially any remotely sane setting that whoever configured the 
toolchain considered would suit them best.

 Also at one point I plan to implement that long-standing (and 
long-ago-agreed-upon) idea of encoding the default ABI in the canonical 
system name, which will help people with a 64-bit kernel getting their 
userland builds pick the right ABI of their choice with just `./configure; 
make', but which will make the choice of tool prefixes yet richer.

  Maciej

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