[U-Boot] [PATCH] tools/Makefile: fix HOSTCFLAGS with CROSS_BUILD_TOOLS

Jan Kiszka jan.kiszka at web.de
Sun Aug 25 11:44:29 UTC 2019


On 01.05.19 15:08, Fabrice Fontaine wrote:
> When CROSS_BUILD_TOOLS is set, set HOSTCFLAGS to CFLAGS otherwise CC
> will be used with HOSTCFLAGS which seems wrong
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
> ---
>   tools/Makefile | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/tools/Makefile b/tools/Makefile
> index 12a3027e23..eadeba417d 100644
> --- a/tools/Makefile
> +++ b/tools/Makefile
> @@ -272,6 +272,7 @@ subdir- += env
>
>   ifneq ($(CROSS_BUILD_TOOLS),)
>   override HOSTCC = $(CC)
> +override HOSTCFLAGS = $(CFLAGS)
>
>   quiet_cmd_crosstools_strip = STRIP   $^
>         cmd_crosstools_strip = $(STRIP) $^; touch $@
>

This eats - among other things - -O2, normally set in /Makefile. And that breaks
CROSS_BUILD_TOOLS=y with CONFIG_FIT but without CONFIG_FIT_SIGNATURE because "if
(!IMAGE_ENABLE_SIGN)" is no longer optimized. I tend to believe this should
simply be reverted (which is what I'm doing locally in order to fix my builds).

Jan


More information about the U-Boot mailing list