[PATCH] Makefile: Do not call useless command 'true'
Tom Rini
trini at konsulko.com
Fri Jan 29 00:56:34 CET 2021
On Wed, Nov 04, 2020 at 03:33:44PM +0100, Pali Rohár wrote:
> Macro 'cmd_objcopy_uboot' currently does not work with passed empty command
> expanded from 'cmd_static_rela' and therefore dummy command 'true' is set
> in 'cmd_static_rela' to workaround this issue.
>
> Eliminate it now by fixing 'cmd_objcopy_uboot' macro to work also with
> empty 'cmd_static_rela' macro and remove useless invocation of command
> 'true'.
>
> Signed-off-by: Pali Rohár <pali at kernel.org>
> Reviewed-by: Simon Glass <sjg at chromium.org>
> ---
> Makefile | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index b90fe8b865..aeb2c17a9b 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -885,7 +885,7 @@ cmd_static_rela = \
> tools/relocate-rela $(3) $(4) $$start $$end
> else
> quiet_cmd_static_rela =
> -cmd_static_rela = true
> +cmd_static_rela =
> endif
>
> # Always append INPUTS so that arch config.mk's can add custom ones
> @@ -1312,7 +1312,11 @@ endif
> shell_cmd = { $(call echo-cmd,$(1)) $(cmd_$(1)); }
>
> quiet_cmd_objcopy_uboot = OBJCOPY $@
> +ifdef cmd_static_rela
> cmd_objcopy_uboot = $(cmd_objcopy) && $(call shell_cmd,static_rela,$<,$@,$(CONFIG_SYS_TEXT_BASE)) || { rm -f $@; false; }
> +else
> +cmd_objcopy_uboot = $(cmd_objcopy)
> +endif
>
> u-boot-nodtb.bin: u-boot FORCE
> $(call if_changed,objcopy_uboot)
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210128/cbabbcf9/attachment.sig>
More information about the U-Boot
mailing list