Commit 2e5ede82 authored by Anup Patel's avatar Anup Patel Committed by Anup Patel
Browse files

Makefile: Use '=' instead of '?=' for make variables



The '?=' will not assign value if the target make variable is
overriden via command-line or is set in environment variable.
On other hand, '=' will not assign value only if variable is
overriden via command-line parameter.

It is quite common to have CC, AS, CPP, LD, etc to be set as
environment variables pointing to native compiler and binutils.
If '-rR' option is not set in MAKEFLAGS then this results in
compile error because '?=' will use the native compiler and
binutils. If '-rR' option is set in MAKEFLAGS then this again
results in compile error because CC, AS, CPP, etc are set to
empty strings which causes '?=' to use empty string as compiler
and binutils.

To handle this, we use '?=' only when CROSS_COMPILE is not
defined and we use '=' when CROSS_COMPILE is defined.

Signed-off-by: default avatarAnup Patel <anup.patel@wdc.com>
parent 45c9e14a
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment