linux-mips
[Top] [All Lists]

CROSS_COMPILE in environment variable

To: linux-mips@linux-mips.org
Subject: CROSS_COMPILE in environment variable
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Tue, 25 Apr 2006 13:39:44 +0900 (JST)
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
In the toplevel Makefile, CROSS_COMPILE is described as:

# CROSS_COMPILE can be set on the command line
# make CROSS_COMPILE=ia64-linux-
# Alternatively CROSS_COMPILE can be set in the environment.
# Default value for CROSS_COMPILE is not to prefix executables
# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile

And currently, arch/mips/Makefile assigns CROSS_COMPILE as:

CROSS_COMPILE           := $(tool-prefix)

This overrides environment variable's settings unconditionaly so we
can no do the 'alternative' method described above (specify
CROSS_COMPILE by shell environment variable).

If arch/mips/Makefile used "?=" assigment instead of ":=", we can
specify CROSS_COMPILE by shell environment variable.

Is there any reason to using ":=" ?  If no, shouldn't we change
arch/mips/Makefile corresponding to the description?

---
Atsushi Nemoto

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