From: "Pali Rohár" <pali@kernel.org>
To: u-boot@lists.denx.de
Subject: [PATCH] Makefile: Do not call useless command 'true'
Date: Sat, 16 Jan 2021 01:21:22 +0100 [thread overview]
Message-ID: <20210116002122.dhc3b23jw7m2lai2@pali> (raw)
In-Reply-To: <20201104143344.2279-1-pali@kernel.org>
Hello! Could you please review this patch?
On Wednesday 04 November 2020 15:33:44 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@kernel.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)
> --
> 2.20.1
>
next prev parent reply other threads:[~2021-01-16 0:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-04 14:33 [PATCH] Makefile: Do not call useless command 'true' Pali Rohár
2021-01-16 0:21 ` Pali Rohár [this message]
2021-01-19 18:06 ` Simon Glass
2021-01-19 18:39 ` Pali Rohár
2021-01-20 0:19 ` Simon Glass
2021-01-28 23:56 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210116002122.dhc3b23jw7m2lai2@pali \
--to=pali@kernel.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.