diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-03-13 17:43:16 +0900 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-03-14 20:40:22 -0400 |
commit | 3b0825296aeba69c2cbfd3e179db2e9cbe5e70d7 (patch) | |
tree | 123dc8add6316cfcc1f5d4cb28efeda09a7ceb19 /tools/env | |
parent | 433cbfb3b37404d6150a1aba94309bc0ed661689 (diff) | |
download | u-boot-3b0825296aeba69c2cbfd3e179db2e9cbe5e70d7.zip u-boot-3b0825296aeba69c2cbfd3e179db2e9cbe5e70d7.tar.gz u-boot-3b0825296aeba69c2cbfd3e179db2e9cbe5e70d7.tar.bz2 |
tools: fix cross-compiling tools when HOSTCC is overridden
Richard reported U-Boot tools issues in OpenEmbedded/Yocto project.
OE needs to be able to change the default compiler. If we pass in
HOSTCC through the make command, it overwrites all HOSTCC instances,
including ones in tools/Makefile and tools/env/Makefile, which breaks
"make cross_tools" and "make env", respectively.
Add "override" directives to avoid overriding HOSTCC instances that
really need to point to the cross-compiler.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reported-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/env')
-rw-r--r-- | tools/env/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/env/Makefile b/tools/env/Makefile index 38ad118..95b28c0 100644 --- a/tools/env/Makefile +++ b/tools/env/Makefile @@ -8,7 +8,7 @@ # fw_printenv is supposed to run on the target system, which means it should be # built with cross tools. Although it may look weird, we only replace "HOSTCC" # with "CC" here for the maximum code reuse of scripts/Makefile.host. -HOSTCC = $(CC) +override HOSTCC = $(CC) # Compile for a hosted environment on the target HOST_EXTRACFLAGS = $(patsubst -I%,-idirafter%, $(filter -I%, $(UBOOTINCLUDE))) \ |