Add support PLATFORM_LDFLAGS to cmd_link_o_target
PATCH 1/2 Add support PLATFORM_LDFLAGS to cmd_link_o_target
Current cmd_link_o_target function in config.mk does not support the set of the endian.
Some architecture is bi-endian (e.g. mips and sh).
Therefore, there is case supporting big endian and little endian with one toolchain.
For example, when user builds target of big endian in host of little endian, they need set endian.
--- config.mk | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
config.mk +1 -1
@@ -262,7 +262,7 @@ $(obj)%.s: %.c # If the list of objects to link is empty, just create an empty built-in.o cmd_link_o_target = $(if $(strip $1),\ - $(LD) -r -o $@ $1 ,\ + $(LD) $(ENDIANNESS) -r -o $@ $1 ,\ rm -f $@; $(AR) rcs $@ ) #########################################################################
Signature · 1 line
1.7.2.3
PATCH 1/2 Add support PLATFORM_LDFLAGS to cmd_link_o_target
Oh, sorry.
I mistake subject...
This is not for 2010.12..
Nobuhiro
2010/12/26 Nobuhiro Iwamatsu <[email protected]>:
Quoted 31 lines
Current
cmd_link_o_targetfunction in config.mk does not support the set of the endian.Some architecture is bi-endian (e.g. mips and sh).
Therefore, there is case supporting big endian and little endian with one toolchain.
For example, when user builds target of big endian in host of little endian, they need set endian.Signed-off-by Nobuhiro Iwamatsu <[email protected]>---
?config.mk | ? ?2 +-
?1 files changed, 1 insertions(+), 1 deletions(-)config.mk +0
-0@@ -262,7 +262,7 @@ $(obj)%.s: ?%.c?# If the list of objects to link is empty, just create an empty built-in.o ?cmd_link_o_target = $(if $(strip $1),\
- ? ? ? ? ? ? ? ? ? ? $(LD) -r -o $@ $1 ,\
+ ? ? ? ? ? ? ? ? ? ? $(LD) $(ENDIANNESS) -r -o $@ $1 ,\
? ? ? ? ? ? ? ? ? ? ?rm -f $@; $(AR) rcs $@ )?######################################################################### --
1.7.2.3
Signature · 3 lines
Nobuhiro Iwamatsu
?? iwamatsu at {nigauri.org / debian.org}
?? GPG ID: 40AD1FA6PATCH 2/2 sh: Add ENDIANNESS to config.mk of sh2
In reply to Nobuhiro Iwamatsu--- arch/sh/cpu/sh2/config.mk | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
arch/sh/cpu/sh2/config.mk +2 -1
@@ -21,6 +21,7 @@ # MA 02111-1307 USA # # +ENDIANNESS = -EB PLATFORM_CPPFLAGS += -m3e -mb PLATFORM_RELFLAGS += -ffixed-r13 -PLATFORM_LDFLAGS += -EB +PLATFORM_LDFLAGS += $(ENDIANNESS)
Signature · 1 line
1.7.2.3
PATCH 1/2 Add support PLATFORM_LDFLAGS to cmd_link_o_target
In reply to Nobuhiro Iwamatsuconfig.mk $(obj)%.s: %.c · line 265
Quoted 13 lines · On Saturday, December 25, 2010 18:02:26 Nobuhiro Iwamatsu wrote:
Current
cmd_link_o_targetfunction in config.mk does not support the set of the endian.Some architecture is bi-endian (e.g. mips and sh). Therefore, there is case supporting big endian and little endian with one toolchain.
For example, when user builds target of big endian in host of little endian, they need set endian.# If the list of objects to link is empty, just create an empty built-in.o
cmd_link_o_target= $(if $(strip $1),\config.mk +1
-1- $(LD) -r -o $@ $1 ,\ + $(LD) $(ENDIANNESS) -r -o $@ $1 ,\
i dont think we should start declaring random new variables with specific purposes. better to split the "u-boot final" LDFLAGS out into their own variable (LDFLAGS_u-boot) and keep LDFLAGS as a "these are the flags that need to be used with $(LD)".
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20101226/ddb419ca/attachment.pgp
PATCH 1/2 Add support PLATFORM_LDFLAGS to cmd_link_o_target
Hi, mike.
2010/12/27 Mike Frysinger <[email protected]>:
Quoted 10 lines · On Saturday, December 25, 2010 18:02:26 Nobuhiro Iwamatsu wrote:
Quoted 9 lines
Current
cmd_link_o_targetfunction in config.mk does not support the set of the endian.Some architecture is bi-endian (e.g. mips and sh). Therefore, there is case supporting big endian and little endian with one toolchain.
For example, when user builds target of big endian in host of little endian, they need set endian.
Quoted 7 lines
Quoted 4 lines
?# If the list of objects to link is empty, just create an empty built-in.o ?cmd_link_o_target = $(if $(strip $1),\
- ? ? ? ? ? ? ? ? ? $(LD) -r -o $@ $1 ,\
+ ? ? ? ? ? ? ? ? ? $(LD) $(ENDIANNESS) -r -o $@ $1 ,\i dont think we should start declaring random new variables with specific purposes.
I agree. But....
Quoted 3 lines
better to split the "u-boot final" LDFLAGS out into their own variable (LDFLAGS_u-boot) and keep LDFLAGS as a "these are the flags that need to be used with $(LD)".
cmd_link_o_target is not used in the last of u-boot (u-boot final) . But this is used in the middle of build.
For example, when we make libstubs.o in examples/standalone/Makefile.
: examples/standalone/Makefile
-----
89
90 all: $(obj).depend $(OBJS) $(LIB) $(SREC) $(BIN) $(ELF)
91
92 ######################################################################### 93 $(LIB): $(obj).depend $(LIBOBJS)
94 $(call cmd_link_o_target, $(LIBOBJS))
95
96 $(ELF):
-----
Therefore, I think that we have to add a new variable to this.
Best regards,
Nobuhiro
Signature · 1 line
Nobuhiro Iwamatsu
PATCH 1/2 Add support PLATFORM_LDFLAGS to cmd_link_o_target
Quoted 19 lines · On Sunday, December 26, 2010 23:17:39 Nobuhiro Iwamatsu wrote:
2010/12/27 Mike Frysinger <[email protected]>:
Quoted 10 lines · On Saturday, December 25, 2010 18:02:26 Nobuhiro Iwamatsu wrote:
Quoted 9 lines
Current
cmd_link_o_targetfunction in config.mk does not support the set of the endian.Some architecture is bi-endian (e.g. mips and sh). Therefore, there is case supporting big endian and little endian with one toolchain.
For example, when user builds target of big endian in host of little endian, they need set endian.Quoted 7 lines
config.mk $(obj)%.s: %.c · line 265
Quoted 4 lines
# If the list of objects to link is empty, just create an empty
built-in.ocmd_link_o_target= $(if $(strip $1),\config.mk +1
-1- $(LD) -r -o $@ $1 ,\ + $(LD) $(ENDIANNESS) -r -o $@ $1 ,\i dont think we should start declaring random new variables with specific purposes.
Quoted 7 lines
I agree. But....
Quoted 3 lines
better to split the "u-boot final" LDFLAGS out into their own variable (LDFLAGS_u-boot) and keep LDFLAGS as a "these are the flags that need to be used with $(LD)".
cmd_link_o_targetis not used in the last of u-boot (u-boot final) .
this is irrelevant to what i suggested
Quoted 17 lines
But this is used in the middle of build.
For example, when we make libstubs.o in examples/standalone/Makefile.: examples/standalone/Makefile
-----
89
90 all: $(obj).depend $(OBJS) $(LIB) $(SREC) $(BIN) $(ELF)
91
92
#########################################################################
93 $(LIB): $(obj).depend $(LIBOBJS)
94 $(callcmd_link_o_target, $(LIBOBJS))
95
96 $(ELF):
-----
Quoted 1 line
Therefore, I think that we have to add a new variable to this.
no, we dont. do as i suggested:
- add $(LDFLAGS_$(@F)) to Makefile:GEN_UBOOT
- move -T/-B flags from Makefile:LDFLAGS to Makefile:LDFLAGS_u-boot
- move --gc-sections from LDFLAGS to LDFLAGS_u-boot in arch/*/config.mk
- add $(LDFLAGS) to cmd_link_o_target
your patch doesnt scale to address all problems
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20101226/0c790267/attachment.pgp
PATCH 1/2 Add support PLATFORM_LDFLAGS to cmd_link_o_target
2010/12/27 Mike Frysinger <[email protected]>:
Quoted 49 lines · On Sunday, December 26, 2010 23:17:39 Nobuhiro Iwamatsu wrote:
Quoted 19 lines
2010/12/27 Mike Frysinger <[email protected]>:
Quoted 10 lines · On Saturday, December 25, 2010 18:02:26 Nobuhiro Iwamatsu wrote:
Quoted 9 lines
Current
cmd_link_o_targetfunction in config.mk does not support the set of the endian.Some architecture is bi-endian (e.g. mips and sh). Therefore, there is case supporting big endian and little endian with one toolchain.
For example, when user builds target of big endian in host of little endian, they need set endian.Quoted 7 lines
Quoted 4 lines
?# If the list of objects to link is empty, just create an empty built-in.o
cmd_link_o_target= $(if $(strip $1),\
- ? ? ? ? ? ? ? ? ? $(LD) -r -o $@ $1 ,\
+ ? ? ? ? ? ? ? ? ? $(LD) $(ENDIANNESS) -r -o $@ $1 ,\i dont think we should start declaring random new variables with specific purposes.
Quoted 7 lines
I agree. But....
Quoted 3 lines
better to split the "u-boot final" LDFLAGS out into their own variable (LDFLAGS_u-boot) and keep LDFLAGS as a "these are the flags that need to be used with $(LD)".
cmd_link_o_targetis not used in the last of u-boot ?(u-boot final) .this is irrelevant to what i suggested
Quoted 17 lines
But this is used in the middle of build.
For example, when we make libstubs.o in examples/standalone/Makefile.: examples/standalone/Makefile
-----
?89
?90 all: ? ?$(obj).depend $(OBJS) $(LIB) $(SREC) $(BIN) $(ELF) ?91
?92
#########################################################################
93 $(LIB): $(obj).depend $(LIBOBJS)
?94 ? ? $(callcmd_link_o_target, $(LIBOBJS))
?95
?96 $(ELF):
-----Quoted 1 line
Therefore, I think that we have to add a new variable to this.
Quoted 7 lines
no, we dont. ?do as i suggested:
?- add $(LDFLAGS_$(@F)) to Makefile:GEN_UBOOT
?- move -T/-B flags from Makefile:LDFLAGS to Makefile:LDFLAGS_u-boot ?- move --gc-sections from LDFLAGS to LDFLAGS_u-boot inarch/*/config.mk?- add $(LDFLAGS) tocmd_link_o_targetyour patch doesnt scale to address all problems
OK, I understood your indication.
I will send new patch.
Thanks!
Nobuhiro
Signature · 1 line
Nobuhiro Iwamatsu