* [U-Boot] [PATCH] config: Always use GNU ld
@ 2012-08-02 16:19 Otavio Salvador
2012-08-02 17:49 ` Mike Frysinger
2012-08-10 20:48 ` Anatolij Gustschin
0 siblings, 2 replies; 5+ messages in thread
From: Otavio Salvador @ 2012-08-02 16:19 UTC (permalink / raw)
To: u-boot
From: Khem Raj <raj.khem@gmail.com>
This patch makes sure that we always use the GNU ld. U-Boot uses certain
construct e.g. OVERLAY which are not implemented in gold therefore it
always needs GNU ld for linking.
It works well if default linker in toolchain is GNU ld but in some
cases we can have gold to be the default linker and also ship GNU ld
but not as default in such cases its called $(PREFIX)ld.bfd, with this
patch we make sure that if $(PREFIX)ld.bfd exists than we use that for
our ld.
This way it does not matter what the default ld is.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
config.mk | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/config.mk b/config.mk
index 3dcea6a..c3822a2 100644
--- a/config.mk
+++ b/config.mk
@@ -133,7 +133,11 @@ cc-version = $(shell $(SHELL) $(SRCTREE)/tools/gcc-version.sh $(CC))
# Include the make variables (CC, etc...)
#
AS = $(CROSS_COMPILE)as
-LD = $(CROSS_COMPILE)ld
+
+# Always use GNU ld
+LD = $(shell if $(CROSS_COMPILE)ld.bfd -v > /dev/null 2>&1; \
+ then echo "$(CROSS_COMPILE)ld.bfd"; else echo "$(CROSS_COMPILE)ld"; fi;)
+
CC = $(CROSS_COMPILE)gcc
CPP = $(CC) -E
AR = $(CROSS_COMPILE)ar
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] config: Always use GNU ld
2012-08-02 16:19 [U-Boot] [PATCH] config: Always use GNU ld Otavio Salvador
@ 2012-08-02 17:49 ` Mike Frysinger
2012-08-04 22:31 ` Otavio Salvador
2012-08-10 20:48 ` Anatolij Gustschin
1 sibling, 1 reply; 5+ messages in thread
From: Mike Frysinger @ 2012-08-02 17:49 UTC (permalink / raw)
To: u-boot
On Thursday 02 August 2012 12:19:34 Otavio Salvador wrote:
> This patch makes sure that we always use the GNU ld. U-Boot uses certain
> construct e.g. OVERLAY which are not implemented in gold therefore it
> always needs GNU ld for linking.
>
> It works well if default linker in toolchain is GNU ld but in some
> cases we can have gold to be the default linker and also ship GNU ld
> but not as default in such cases its called $(PREFIX)ld.bfd, with this
> patch we make sure that if $(PREFIX)ld.bfd exists than we use that for
> our ld.
>
> This way it does not matter what the default ld is.
Acked-by: Mike Frysinger <vapier@gentoo.org>
-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/20120802/d3d9c3a3/attachment.pgp>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] config: Always use GNU ld
2012-08-02 17:49 ` Mike Frysinger
@ 2012-08-04 22:31 ` Otavio Salvador
2012-08-09 19:49 ` Otavio Salvador
0 siblings, 1 reply; 5+ messages in thread
From: Otavio Salvador @ 2012-08-04 22:31 UTC (permalink / raw)
To: u-boot
On Thu, Aug 2, 2012 at 2:49 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Thursday 02 August 2012 12:19:34 Otavio Salvador wrote:
>> This patch makes sure that we always use the GNU ld. U-Boot uses certain
>> construct e.g. OVERLAY which are not implemented in gold therefore it
>> always needs GNU ld for linking.
>>
>> It works well if default linker in toolchain is GNU ld but in some
>> cases we can have gold to be the default linker and also ship GNU ld
>> but not as default in such cases its called $(PREFIX)ld.bfd, with this
>> patch we make sure that if $(PREFIX)ld.bfd exists than we use that for
>> our ld.
>>
>> This way it does not matter what the default ld is.
>
> Acked-by: Mike Frysinger <vapier@gentoo.org>
> -mike
Wolfgang, I ended not putting you on CC but I think you're the one who
would take this patch, aren't you?
--
Otavio Salvador O.S. Systems
E-mail: otavio at ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] config: Always use GNU ld
2012-08-04 22:31 ` Otavio Salvador
@ 2012-08-09 19:49 ` Otavio Salvador
0 siblings, 0 replies; 5+ messages in thread
From: Otavio Salvador @ 2012-08-09 19:49 UTC (permalink / raw)
To: u-boot
On Sat, Aug 4, 2012 at 7:31 PM, Otavio Salvador <otavio@ossystems.com.br> wrote:
> On Thu, Aug 2, 2012 at 2:49 PM, Mike Frysinger <vapier@gentoo.org> wrote:
>> On Thursday 02 August 2012 12:19:34 Otavio Salvador wrote:
>>> This patch makes sure that we always use the GNU ld. U-Boot uses certain
>>> construct e.g. OVERLAY which are not implemented in gold therefore it
>>> always needs GNU ld for linking.
>>>
>>> It works well if default linker in toolchain is GNU ld but in some
>>> cases we can have gold to be the default linker and also ship GNU ld
>>> but not as default in such cases its called $(PREFIX)ld.bfd, with this
>>> patch we make sure that if $(PREFIX)ld.bfd exists than we use that for
>>> our ld.
>>>
>>> This way it does not matter what the default ld is.
>>
>> Acked-by: Mike Frysinger <vapier@gentoo.org>
>> -mike
>
> Wolfgang, I ended not putting you on CC but I think you're the one who
> would take this patch, aren't you?
Ping?
--
Otavio Salvador O.S. Systems
E-mail: otavio at ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] config: Always use GNU ld
2012-08-02 16:19 [U-Boot] [PATCH] config: Always use GNU ld Otavio Salvador
2012-08-02 17:49 ` Mike Frysinger
@ 2012-08-10 20:48 ` Anatolij Gustschin
1 sibling, 0 replies; 5+ messages in thread
From: Anatolij Gustschin @ 2012-08-10 20:48 UTC (permalink / raw)
To: u-boot
Hi,
On Thu, 2 Aug 2012 13:19:34 -0300
Otavio Salvador <otavio@ossystems.com.br> wrote:
> From: Khem Raj <raj.khem@gmail.com>
>
> This patch makes sure that we always use the GNU ld. U-Boot uses certain
> construct e.g. OVERLAY which are not implemented in gold therefore it
> always needs GNU ld for linking.
>
> It works well if default linker in toolchain is GNU ld but in some
> cases we can have gold to be the default linker and also ship GNU ld
> but not as default in such cases its called $(PREFIX)ld.bfd, with this
> patch we make sure that if $(PREFIX)ld.bfd exists than we use that for
> our ld.
>
> This way it does not matter what the default ld is.
>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> config.mk | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
applied to my staging branch, thanks!
Anatolij
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-08-10 20:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-02 16:19 [U-Boot] [PATCH] config: Always use GNU ld Otavio Salvador
2012-08-02 17:49 ` Mike Frysinger
2012-08-04 22:31 ` Otavio Salvador
2012-08-09 19:49 ` Otavio Salvador
2012-08-10 20:48 ` Anatolij Gustschin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox