With gnu make (4.1), I wasn't able to override CC value with CROSS_COMPILE.
To find out what's really going on, I've added this temporary build target to dump variables
print-% : ; @echo $* = $($*)
Whenever I pass CONFIG_CROSS_COMPILE via environment, it was getting assigned to CROSS_COMPILE but make was not changing the default value of CC due to ?= operator:
$ CONFIG_CROSS_COMPILE=arm-linux-gnueabihf- make print-CROSS_COMPILE print-CC
CROSS_COMPILE = arm-linux-gnueabihf-
CC = cc
So I've replaced the ?= operator with =. (This will prevent CC=compiler make definitions from working properly but that can be resolved by CC=compiler make -e, if needed.)
Hello,
With gnu make (4.1), I wasn't able to override
CC
value withCROSS_COMPILE
. To find out what's really going on, I've added this temporary build target to dump variablesWhenever I pass
CONFIG_CROSS_COMPILE
via environment, it was getting assigned toCROSS_COMPILE
butmake
was not changing the default value ofCC
due to?=
operator:So I've replaced the
?=
operator with=
. (This will preventCC=compiler make
definitions from working properly but that can be resolved byCC=compiler make -e
, if needed.)