diff options
author | Khem Raj <raj.khem@gmail.com> | 2012-01-12 12:15:05 -0800 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2012-01-13 12:30:50 +0100 |
commit | bc98f6f230dc8d3457e809b75f421ed732e21143 (patch) | |
tree | 138663841109e674cfb9f0440c2e700dd640576f /recipes-bsp/u-boot/u-boot | |
parent | d0076873ee3e66ee59a5a29a11e594fcef9d25ea (diff) | |
download | meta-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.patch | 43 |
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 @@ | |||
1 | From dff01fc9346e6f4e3386536df309d2e78f03f3ee Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 21 Dec 2011 08:53:02 -0800 | ||
4 | Subject: [PATCH] config: Always use GNU ld | ||
5 | |||
6 | This patch makes sure that we always use the GNU ld. u-boot uses certain | ||
7 | construct e.g. OVERLAY which are not implemented in gold therefore it | ||
8 | always needs GNU ld for linking. It works well if default linker in | ||
9 | toolchain is GNU ld but in some cases we can have gold to be the | ||
10 | default linker and also ship GNU ld but not as default in such cases | ||
11 | its 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 | ||
13 | does not matter what the default ld is. | ||
14 | |||
15 | Upstream-status: Pending | ||
16 | |||
17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
18 | --- | ||
19 | config.mk | 4 +++- | ||
20 | 1 files changed, 3 insertions(+), 1 deletions(-) | ||
21 | |||
22 | diff --git a/config.mk b/config.mk | ||
23 | index 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 | -- | ||
42 | 1.7.5.4 | ||
43 | |||