Brad Bishop | d7189fd | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | OE needs to be able to change the default compiler. If we pass in HOSTCC |
| 2 | through the make command, it overwrites not only this setting but also the |
| 3 | setting in tools/Makefile wrapped in ifneq ($(CROSS_BUILD_TOOLS),) which |
| 4 | breaks the build. |
| 5 | |
| 6 | We therefore use override to ensure the value of HOSTCC is overwritten when |
| 7 | needed. |
| 8 | |
| 9 | RP: Updated the patch to the version being submitted to upstream u-boot |
| 10 | |
| 11 | Upstream-Status: Submitted [emailed to Masahiro Yamada for discussion] |
| 12 | RP 2017/3/11 |
| 13 | |
| 14 | Index: 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 $@ |
| 27 | Index: 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))) \ |