Makefile: Do not call useless command 'true'
PATCH 1/1 Makefile: Do not call useless command 'true'
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'.
--- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
Makefile +5 -1
@@ -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)
Signature · 1 line
2.20.1
PATCH 1/1 Makefile: Do not call useless command 'true'
Hello! Could you please review this patch?
Quoted 41 lines · 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 <[email protected]>--- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)Makefile +5
-1@@ -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)Signature · 1 line
2.20.1
PATCH 1/1 Makefile: Do not call useless command 'true'
Hi Pali,
Quoted 40 lines · Pali Roh?r
Hello! Could you please review this patch?
Quoted 36 lines · 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 <[email protected]>--- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)Makefile +5
-1@@ -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
Quoted 5 lines
Quoted 5 lines
Makefile +0
-1u-boot-nodtb.bin: u-boot FORCE $(call if_changed,objcopy_uboot) --2.20.1
I don't know much about that and your patch looks reasonable, but what is the motivation? Is it a code clean-up or a bug?
Regards,
Simon
PATCH 1/1 Makefile: Do not call useless command 'true'
Quoted 43 lines · On Tuesday 19 January 2021 11:06:12 Simon Glass wrote:
Hi Pali,
Quoted 40 lines · Pali Roh?r
Hello! Could you please review this patch?
Quoted 36 lines · 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 <[email protected]>--- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)Makefile +5
-1@@ -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
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
Makefile +0
-1u-boot-nodtb.bin: u-boot FORCE $(call if_changed,objcopy_uboot) --2.20.1
I don't know much about that and your patch looks reasonable, but what is the motivation? Is it a code clean-up or a bug?
Hello! I do not know about any bugs here, so it is just code clean-up.
PATCH 1/1 Makefile: Do not call useless command 'true'
Quoted 54 lines · Pali Roh?r
Quoted 43 lines · On Tuesday 19 January 2021 11:06:12 Simon Glass wrote:
Hi Pali,
Quoted 40 lines · Pali Roh?r
Hello! Could you please review this patch?
Quoted 36 lines · 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 <[email protected]>--- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)Makefile +5
-1@@ -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) +endifQuoted 8 lines
Quoted 5 lines
Quoted 5 lines
Makefile +0
-1u-boot-nodtb.bin: u-boot FORCE $(call if_changed,objcopy_uboot) --2.20.1
I don't know much about that and your patch looks reasonable, but what is the motivation? Is it a code clean-up or a bug?
Quoted 1 line
Hello! I do not know about any bugs here, so it is just code clean-up.
PATCH 1/1 Makefile: Do not call useless command 'true'
In reply to Pali RohárQuoted 29 lines · Pali Roh?r
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 <[email protected]>Reviewed-by Simon Glass <[email protected]>--- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)Makefile +1
-1@@ -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)); }
Makefile endif · line 1322
Quoted 10 lines
Makefile +4
-0quiet_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!
Signature · 8 lines
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>