diff mbox series

[U-Boot,2/3] Kbuild: standalone: do not ignore platform-specific OBJCOPYFLAGS

Message ID 20180923171517.21363-3-daniel.schwierzeck@gmail.com
State Accepted
Commit d3a9ba7f959fac65815e3308510afd4b79f47dc0
Delegated to: Daniel Schwierzeck
Headers show
Series MIPS: fix building and linking of standalone programs | expand

Commit Message

Daniel Schwierzeck Sept. 23, 2018, 5:15 p.m. UTC
Currently the OBJCOPYFLAGS are cleared when assigning "-O srec"
or "-O binary" for standalone programs. All flags set by arch-specific
Makefiles are lost. This is bad if an arch demands arch-specific
flags for the objcopy step.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
---

 examples/standalone/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Daniel Schwierzeck Oct. 28, 2018, 8:13 p.m. UTC | #1
Am 23.09.18 um 19:15 schrieb Daniel Schwierzeck:
> Currently the OBJCOPYFLAGS are cleared when assigning "-O srec"
> or "-O binary" for standalone programs. All flags set by arch-specific
> Makefiles are lost. This is bad if an arch demands arch-specific
> flags for the objcopy step.

are there any objections or can I apply this to u-boot-mips/next? Thanks.

> 
> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
> ---
> 
>  examples/standalone/Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile
> index abe1bf1883..f01816f24f 100644
> --- a/examples/standalone/Makefile
> +++ b/examples/standalone/Makefile
> @@ -62,11 +62,11 @@ quiet_cmd_link_elf = LD      $@
>  $(ELF): $(obj)/%: $(obj)/%.o $(LIB) FORCE
>  	$(call if_changed,link_elf)
>  
> -$(obj)/%.srec: OBJCOPYFLAGS := -O srec
> +$(obj)/%.srec: OBJCOPYFLAGS += -O srec
>  $(obj)/%.srec: $(obj)/% FORCE
>  	$(call if_changed,objcopy)
>  
> -$(obj)/%.bin: OBJCOPYFLAGS := -O binary
> +$(obj)/%.bin: OBJCOPYFLAGS += -O binary
>  $(obj)/%.bin: $(obj)/% FORCE
>  	$(call if_changed,objcopy)
>  
>
Tom Rini Oct. 29, 2018, 1:34 p.m. UTC | #2
On Sun, Oct 28, 2018 at 09:13:04PM +0100, Daniel Schwierzeck wrote:
> 
> 
> Am 23.09.18 um 19:15 schrieb Daniel Schwierzeck:
> > Currently the OBJCOPYFLAGS are cleared when assigning "-O srec"
> > or "-O binary" for standalone programs. All flags set by arch-specific
> > Makefiles are lost. This is bad if an arch demands arch-specific
> > flags for the objcopy step.
> 
> are there any objections or can I apply this to u-boot-mips/next? Thanks.

Go ahead:

Reviewed-by: Tom Rini <trini@konsulko.com>
Daniel Schwierzeck Nov. 2, 2018, 10:29 p.m. UTC | #3
Am 23.09.18 um 19:15 schrieb Daniel Schwierzeck:
> Currently the OBJCOPYFLAGS are cleared when assigning "-O srec"
> or "-O binary" for standalone programs. All flags set by arch-specific
> Makefiles are lost. This is bad if an arch demands arch-specific
> flags for the objcopy step.
> 
> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
> ---
> 
>  examples/standalone/Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

applied to u-boot-mips/next
diff mbox series

Patch

diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile
index abe1bf1883..f01816f24f 100644
--- a/examples/standalone/Makefile
+++ b/examples/standalone/Makefile
@@ -62,11 +62,11 @@  quiet_cmd_link_elf = LD      $@
 $(ELF): $(obj)/%: $(obj)/%.o $(LIB) FORCE
 	$(call if_changed,link_elf)
 
-$(obj)/%.srec: OBJCOPYFLAGS := -O srec
+$(obj)/%.srec: OBJCOPYFLAGS += -O srec
 $(obj)/%.srec: $(obj)/% FORCE
 	$(call if_changed,objcopy)
 
-$(obj)/%.bin: OBJCOPYFLAGS := -O binary
+$(obj)/%.bin: OBJCOPYFLAGS += -O binary
 $(obj)/%.bin: $(obj)/% FORCE
 	$(call if_changed,objcopy)