summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/u-boot/u-boot
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2012-01-12 12:15:05 -0800
committerKoen Kooi <koen@dominion.thruhere.net>2012-01-13 12:30:50 +0100
commitbc98f6f230dc8d3457e809b75f421ed732e21143 (patch)
tree138663841109e674cfb9f0440c2e700dd640576f /recipes-bsp/u-boot/u-boot
parentd0076873ee3e66ee59a5a29a11e594fcef9d25ea (diff)
downloadmeta-ti-bc98f6f230dc8d3457e809b75f421ed732e21143.tar.gz
u-boot_2011.09, u-boot_2011.12: Always use gnu ld for LD
u-boot wants GNU ld and cant link with gold so when default linker is gold we make sure that it still uses good old GNU ld Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'recipes-bsp/u-boot/u-boot')
-rw-r--r--recipes-bsp/u-boot/u-boot/0001-config-Always-use-GNU-ld.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/u-boot/0001-config-Always-use-GNU-ld.patch b/recipes-bsp/u-boot/u-boot/0001-config-Always-use-GNU-ld.patch
new file mode 100644
index 00000000..2564d1d4
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0001-config-Always-use-GNU-ld.patch
@@ -0,0 +1,43 @@
1From dff01fc9346e6f4e3386536df309d2e78f03f3ee Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 21 Dec 2011 08:53:02 -0800
4Subject: [PATCH] config: Always use GNU ld
5
6This patch makes sure that we always use the GNU ld. u-boot uses certain
7construct e.g. OVERLAY which are not implemented in gold therefore it
8always needs GNU ld for linking. It works well if default linker in
9toolchain is GNU ld but in some cases we can have gold to be the
10default linker and also ship GNU ld but not as default in such cases
11its called $(PREFIX)ld.bfd, with this patch we make sure that if
12$(PREFIX)ld.bfd exists than we use that for our ld. This way it
13does not matter what the default ld is.
14
15Upstream-status: Pending
16
17Signed-off-by: Khem Raj <raj.khem@gmail.com>
18---
19 config.mk | 4 +++-
20 1 files changed, 3 insertions(+), 1 deletions(-)
21
22diff --git a/config.mk b/config.mk
23index ddaa477..59b3e71 100644
24--- a/config.mk
25+++ b/config.mk
26@@ -126,11 +126,13 @@ cc-option = $(strip $(if $(findstring $1,$(CC_OPTIONS)),$1,\
27 $(if $(call cc-option-sys,$1),$1,$2)))
28 endif
29
30+exists_bfd_ld = $(shell if $(CROSS_COMPILE)ld.bfd -v >& /dev/null; \
31+ then echo "$(1)"; else echo "$(2)"; fi; )
32 #
33 # Include the make variables (CC, etc...)
34 #
35 AS = $(CROSS_COMPILE)as
36-LD = $(CROSS_COMPILE)ld
37+LD = $(call exists_bfd_ld, "$(CROSS_COMPILE)ld.bfd", "$(CROSS_COMPILE)ld")
38 CC = $(CROSS_COMPILE)gcc
39 CPP = $(CC) -E
40 AR = $(CROSS_COMPILE)ar
41--
421.7.5.4
43