blob: 04184df8b34203398a9024a91132777aa6045066 [file] [log] [blame]
Brad Bishopd7189fd2018-02-01 10:27:11 -05001OE needs to be able to change the default compiler. If we pass in HOSTCC
2through the make command, it overwrites not only this setting but also the
3setting in tools/Makefile wrapped in ifneq ($(CROSS_BUILD_TOOLS),) which
4breaks the build.
5
6We therefore use override to ensure the value of HOSTCC is overwritten when
7needed.
8
9RP: Updated the patch to the version being submitted to upstream u-boot
10
11Upstream-Status: Submitted [emailed to Masahiro Yamada for discussion]
12RP 2017/3/11
13
14Index: git/tools/Makefile
15===================================================================
16--- git.orig/tools/Makefile
17+++ git/tools/Makefile
18@@ -262,7 +262,7 @@ $(LICENSE_H): $(obj)/bin2header $(srctre
19 subdir- += env
20
21 ifneq ($(CROSS_BUILD_TOOLS),)
22-HOSTCC = $(CC)
23+override HOSTCC = $(CC)
24
25 quiet_cmd_crosstools_strip = STRIP $^
26 cmd_crosstools_strip = $(STRIP) $^; touch $@
27Index: git/tools/env/Makefile
28===================================================================
29--- git.orig/tools/env/Makefile
30+++ git/tools/env/Makefile
31@@ -8,7 +8,7 @@
32 # fw_printenv is supposed to run on the target system, which means it should be
33 # built with cross tools. Although it may look weird, we only replace "HOSTCC"
34 # with "CC" here for the maximum code reuse of scripts/Makefile.host.
35-HOSTCC = $(CC)
36+override HOSTCC = $(CC)
37
38 # Compile for a hosted environment on the target
39 HOST_EXTRACFLAGS = $(patsubst -I%,-idirafter%, $(filter -I%, $(UBOOTINCLUDE))) \