All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2] u-boot_2011.09: Always use gnu ld for LD
@ 2011-12-21 16:59 Khem Raj
  2012-01-04 18:47 ` Tom Rini
  2012-01-09  9:47 ` Koen Kooi
  0 siblings, 2 replies; 4+ messages in thread
From: Khem Raj @ 2011-12-21 16:59 UTC (permalink / raw)
  To: meta-ti; +Cc: Khem Raj

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>
---
 .../u-boot/0001-config-Always-use-GNU-ld.patch     |   43 ++++++++++++++++++++
 recipes-bsp/u-boot/u-boot_2011.09.bb               |    3 +-
 2 files changed, 45 insertions(+), 1 deletions(-)
 create mode 100644 recipes-bsp/u-boot/u-boot/0001-config-Always-use-GNU-ld.patch

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 0000000..2564d1d
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0001-config-Always-use-GNU-ld.patch
@@ -0,0 +1,43 @@
+From dff01fc9346e6f4e3386536df309d2e78f03f3ee Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 21 Dec 2011 08:53:02 -0800
+Subject: [PATCH] config: Always use GNU ld
+
+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.
+
+Upstream-status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ config.mk |    4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/config.mk b/config.mk
+index ddaa477..59b3e71 100644
+--- a/config.mk
++++ b/config.mk
+@@ -126,11 +126,13 @@ cc-option = $(strip $(if $(findstring $1,$(CC_OPTIONS)),$1,\
+ 		$(if $(call cc-option-sys,$1),$1,$2)))
+ endif
+ 
++exists_bfd_ld = $(shell if $(CROSS_COMPILE)ld.bfd -v >& /dev/null; \
++		then echo "$(1)"; else echo "$(2)"; fi; )
+ #
+ # Include the make variables (CC, etc...)
+ #
+ AS	= $(CROSS_COMPILE)as
+-LD	= $(CROSS_COMPILE)ld
++LD	= $(call exists_bfd_ld, "$(CROSS_COMPILE)ld.bfd", "$(CROSS_COMPILE)ld")
+ CC	= $(CROSS_COMPILE)gcc
+ CPP	= $(CC) -E
+ AR	= $(CROSS_COMPILE)ar
+-- 
+1.7.5.4
+
diff --git a/recipes-bsp/u-boot/u-boot_2011.09.bb b/recipes-bsp/u-boot/u-boot_2011.09.bb
index 74c8518..4a9d3cb 100644
--- a/recipes-bsp/u-boot/u-boot_2011.09.bb
+++ b/recipes-bsp/u-boot/u-boot_2011.09.bb
@@ -1,6 +1,6 @@
 require u-boot.inc
 
-PR = "r5"
+PR = "r6"
 
 # SPL build
 UBOOT_BINARY = "u-boot.img"
@@ -32,6 +32,7 @@ SRC_URI = "git://www.denx.de/git/u-boot.git;protocol=git \
            file://2011.09/0019-BeagleBoard-config-Really-switch-to-ttyO2.patch \
            file://2011.09/0020-beagleboard-add-support-for-TCT-Beacon-board.patch \
            file://2011.09/0021-beagleboard-add-support-for-scanning-loop-through-ex.patch \
+           file://0001-config-Always-use-GNU-ld.patch \
            file://fw_env.config \
           "
 
-- 
1.7.5.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH V2] u-boot_2011.09: Always use gnu ld for LD
  2011-12-21 16:59 [PATCH V2] u-boot_2011.09: Always use gnu ld for LD Khem Raj
@ 2012-01-04 18:47 ` Tom Rini
  2012-01-09  9:47 ` Koen Kooi
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2012-01-04 18:47 UTC (permalink / raw)
  To: Khem Raj; +Cc: meta-ti

On Wed, Dec 21, 2011 at 9:59 AM, Khem Raj <raj.khem@gmail.com> wrote:
> 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>

Acked-by: Tom Rini <trini@ti.com>

> ---
>  .../u-boot/0001-config-Always-use-GNU-ld.patch     |   43 ++++++++++++++++++++
>  recipes-bsp/u-boot/u-boot_2011.09.bb               |    3 +-
>  2 files changed, 45 insertions(+), 1 deletions(-)
>  create mode 100644 recipes-bsp/u-boot/u-boot/0001-config-Always-use-GNU-ld.patch
>
> 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 0000000..2564d1d
> --- /dev/null
> +++ b/recipes-bsp/u-boot/u-boot/0001-config-Always-use-GNU-ld.patch
> @@ -0,0 +1,43 @@
> +From dff01fc9346e6f4e3386536df309d2e78f03f3ee Mon Sep 17 00:00:00 2001
> +From: Khem Raj <raj.khem@gmail.com>
> +Date: Wed, 21 Dec 2011 08:53:02 -0800
> +Subject: [PATCH] config: Always use GNU ld
> +
> +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.
> +
> +Upstream-status: Pending
> +
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +---
> + config.mk |    4 +++-
> + 1 files changed, 3 insertions(+), 1 deletions(-)
> +
> +diff --git a/config.mk b/config.mk
> +index ddaa477..59b3e71 100644
> +--- a/config.mk
> ++++ b/config.mk
> +@@ -126,11 +126,13 @@ cc-option = $(strip $(if $(findstring $1,$(CC_OPTIONS)),$1,\
> +               $(if $(call cc-option-sys,$1),$1,$2)))
> + endif
> +
> ++exists_bfd_ld = $(shell if $(CROSS_COMPILE)ld.bfd -v >& /dev/null; \
> ++              then echo "$(1)"; else echo "$(2)"; fi; )
> + #
> + # Include the make variables (CC, etc...)
> + #
> + AS    = $(CROSS_COMPILE)as
> +-LD    = $(CROSS_COMPILE)ld
> ++LD    = $(call exists_bfd_ld, "$(CROSS_COMPILE)ld.bfd", "$(CROSS_COMPILE)ld")
> + CC    = $(CROSS_COMPILE)gcc
> + CPP   = $(CC) -E
> + AR    = $(CROSS_COMPILE)ar
> +--
> +1.7.5.4
> +
> diff --git a/recipes-bsp/u-boot/u-boot_2011.09.bb b/recipes-bsp/u-boot/u-boot_2011.09.bb
> index 74c8518..4a9d3cb 100644
> --- a/recipes-bsp/u-boot/u-boot_2011.09.bb
> +++ b/recipes-bsp/u-boot/u-boot_2011.09.bb
> @@ -1,6 +1,6 @@
>  require u-boot.inc
>
> -PR = "r5"
> +PR = "r6"
>
>  # SPL build
>  UBOOT_BINARY = "u-boot.img"
> @@ -32,6 +32,7 @@ SRC_URI = "git://www.denx.de/git/u-boot.git;protocol=git \
>            file://2011.09/0019-BeagleBoard-config-Really-switch-to-ttyO2.patch \
>            file://2011.09/0020-beagleboard-add-support-for-TCT-Beacon-board.patch \
>            file://2011.09/0021-beagleboard-add-support-for-scanning-loop-through-ex.patch \
> +           file://0001-config-Always-use-GNU-ld.patch \
>            file://fw_env.config \
>           "
>
> --
> 1.7.5.4
>
> _______________________________________________
> meta-ti mailing list
> meta-ti@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-ti



-- 
Tom


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH V2] u-boot_2011.09: Always use gnu ld for LD
  2011-12-21 16:59 [PATCH V2] u-boot_2011.09: Always use gnu ld for LD Khem Raj
  2012-01-04 18:47 ` Tom Rini
@ 2012-01-09  9:47 ` Koen Kooi
  2012-01-09 16:14   ` Khem Raj
  1 sibling, 1 reply; 4+ messages in thread
From: Koen Kooi @ 2012-01-09  9:47 UTC (permalink / raw)
  To: Khem Raj; +Cc: meta-ti

I suspect you did this for the beagleboard machine, which isn't using 2011.09 anymore. Do you still want this patch in?

Op 21 dec. 2011, om 17:59 heeft Khem Raj het volgende geschreven:

> 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>
> ---
> .../u-boot/0001-config-Always-use-GNU-ld.patch     |   43 ++++++++++++++++++++
> recipes-bsp/u-boot/u-boot_2011.09.bb               |    3 +-
> 2 files changed, 45 insertions(+), 1 deletions(-)
> create mode 100644 recipes-bsp/u-boot/u-boot/0001-config-Always-use-GNU-ld.patch
> 
> 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 0000000..2564d1d
> --- /dev/null
> +++ b/recipes-bsp/u-boot/u-boot/0001-config-Always-use-GNU-ld.patch
> @@ -0,0 +1,43 @@
> +From dff01fc9346e6f4e3386536df309d2e78f03f3ee Mon Sep 17 00:00:00 2001
> +From: Khem Raj <raj.khem@gmail.com>
> +Date: Wed, 21 Dec 2011 08:53:02 -0800
> +Subject: [PATCH] config: Always use GNU ld
> +
> +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.
> +
> +Upstream-status: Pending
> +
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +---
> + config.mk |    4 +++-
> + 1 files changed, 3 insertions(+), 1 deletions(-)
> +
> +diff --git a/config.mk b/config.mk
> +index ddaa477..59b3e71 100644
> +--- a/config.mk
> ++++ b/config.mk
> +@@ -126,11 +126,13 @@ cc-option = $(strip $(if $(findstring $1,$(CC_OPTIONS)),$1,\
> + 		$(if $(call cc-option-sys,$1),$1,$2)))
> + endif
> + 
> ++exists_bfd_ld = $(shell if $(CROSS_COMPILE)ld.bfd -v >& /dev/null; \
> ++		then echo "$(1)"; else echo "$(2)"; fi; )
> + #
> + # Include the make variables (CC, etc...)
> + #
> + AS	= $(CROSS_COMPILE)as
> +-LD	= $(CROSS_COMPILE)ld
> ++LD	= $(call exists_bfd_ld, "$(CROSS_COMPILE)ld.bfd", "$(CROSS_COMPILE)ld")
> + CC	= $(CROSS_COMPILE)gcc
> + CPP	= $(CC) -E
> + AR	= $(CROSS_COMPILE)ar
> +-- 
> +1.7.5.4
> +
> diff --git a/recipes-bsp/u-boot/u-boot_2011.09.bb b/recipes-bsp/u-boot/u-boot_2011.09.bb
> index 74c8518..4a9d3cb 100644
> --- a/recipes-bsp/u-boot/u-boot_2011.09.bb
> +++ b/recipes-bsp/u-boot/u-boot_2011.09.bb
> @@ -1,6 +1,6 @@
> require u-boot.inc
> 
> -PR = "r5"
> +PR = "r6"
> 
> # SPL build
> UBOOT_BINARY = "u-boot.img"
> @@ -32,6 +32,7 @@ SRC_URI = "git://www.denx.de/git/u-boot.git;protocol=git \
>            file://2011.09/0019-BeagleBoard-config-Really-switch-to-ttyO2.patch \
>            file://2011.09/0020-beagleboard-add-support-for-TCT-Beacon-board.patch \
>            file://2011.09/0021-beagleboard-add-support-for-scanning-loop-through-ex.patch \
> +           file://0001-config-Always-use-GNU-ld.patch \
>            file://fw_env.config \
>           "
> 
> -- 
> 1.7.5.4
> 
> _______________________________________________
> meta-ti mailing list
> meta-ti@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-ti



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH V2] u-boot_2011.09: Always use gnu ld for LD
  2012-01-09  9:47 ` Koen Kooi
@ 2012-01-09 16:14   ` Khem Raj
  0 siblings, 0 replies; 4+ messages in thread
From: Khem Raj @ 2012-01-09 16:14 UTC (permalink / raw)
  To: Koen Kooi; +Cc: meta-ti

On Mon, Jan 9, 2012 at 1:47 AM, Koen Kooi <koen@dominion.thruhere.net> wrote:
> I suspect you did this for the beagleboard machine, which isn't using 2011.09 anymore. Do you still want this patch in?

I did it for beagleboard however the patch was done on u-boot git
master. So the patch has to be in u-boot sources
whichever beagle uses.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-01-09 16:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-21 16:59 [PATCH V2] u-boot_2011.09: Always use gnu ld for LD Khem Raj
2012-01-04 18:47 ` Tom Rini
2012-01-09  9:47 ` Koen Kooi
2012-01-09 16:14   ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.