All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] kbuild: fix SPL link bug when USE_PRIVATE_LIBGCC is "yes"
@ 2014-02-24 11:44 Masahiro Yamada
  2014-02-24 18:02 ` Stephen Warren
  2014-02-25 13:58 ` [U-Boot] " Tom Rini
  0 siblings, 2 replies; 4+ messages in thread
From: Masahiro Yamada @ 2014-02-24 11:44 UTC (permalink / raw)
  To: u-boot

Commit 6825a95 (kbuild: use Linux Kernel build scripts)
changed the behavior of linkage when USE_PRIAVATE_LIBGCC
is defined as "yes".
(It dropped arch/arm/lib/eabi_compat.o from the
target library.)

Affected boards are all Tegra boards.

This commit gets back the same behavior as before Kbuild series.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Warren <twarren@nvidia.com>
Cc: Tom Rini <trini@ti.com>
---

Hello Tom(Rini),

I made a serious mistake in the Kbuild series. (Commit 6825a95)
Sorry.

This patch fixes the problem and gets back the originial
link behavior.

Please pick this.


 spl/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/spl/Makefile b/spl/Makefile
index da1c3c0..346d0aa 100644
--- a/spl/Makefile
+++ b/spl/Makefile
@@ -133,7 +133,8 @@ libs-y := $(patsubst %/, %/built-in.o, $(libs-y))
 
 # Add GCC lib
 ifeq ("$(USE_PRIVATE_LIBGCC)", "yes")
-PLATFORM_LIBS := $(SPLTREE)/arch/$(ARCH)/lib/lib.a
+PLATFORM_LIBGCC = $(SPLTREE)/arch/$(ARCH)/lib/lib.a
+PLATFORM_LIBS := $(filter-out %/lib.a, $(filter-out -lgcc, $(PLATFORM_LIBS))) $(PLATFORM_LIBGCC)
 endif
 
 u-boot-spl-init := $(head-y)
-- 
1.8.3.2

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

* [U-Boot] [PATCH] kbuild: fix SPL link bug when USE_PRIVATE_LIBGCC is "yes"
  2014-02-24 11:44 [U-Boot] [PATCH] kbuild: fix SPL link bug when USE_PRIVATE_LIBGCC is "yes" Masahiro Yamada
@ 2014-02-24 18:02 ` Stephen Warren
  2014-02-25  0:24   ` Masahiro Yamada
  2014-02-25 13:58 ` [U-Boot] " Tom Rini
  1 sibling, 1 reply; 4+ messages in thread
From: Stephen Warren @ 2014-02-24 18:02 UTC (permalink / raw)
  To: u-boot

On 02/24/2014 04:44 AM, Masahiro Yamada wrote:
> Commit 6825a95 (kbuild: use Linux Kernel build scripts)
> changed the behavior of linkage when USE_PRIAVATE_LIBGCC
> is defined as "yes".
> (It dropped arch/arm/lib/eabi_compat.o from the
> target library.)
> 
> Affected boards are all Tegra boards.
> 
> This commit gets back the same behavior as before Kbuild series.

Tested-by: Stephen Warren <swarren@nvidia.com>

... although interestingly, at least with the Ubuntu 12.10 ARM
cross-compiler, the resultant U-Boot works fine with or without this
patch. I'd have expected it to fail without this patch since it sounds
like USE_PRIVATE_LIBGCC might not be honored correctly, but perhaps the
linker cmdline order works out such that the custom libgcc happens to be
picked up anyway, just not in the way intended.

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

* [U-Boot] [PATCH] kbuild: fix SPL link bug when USE_PRIVATE_LIBGCC is "yes"
  2014-02-24 18:02 ` Stephen Warren
@ 2014-02-25  0:24   ` Masahiro Yamada
  0 siblings, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2014-02-25  0:24 UTC (permalink / raw)
  To: u-boot

Hello Stephen,

On Mon, 24 Feb 2014 11:02:25 -0700
Stephen Warren <swarren@wwwdotorg.org> wrote:

> On 02/24/2014 04:44 AM, Masahiro Yamada wrote:
> > Commit 6825a95 (kbuild: use Linux Kernel build scripts)
> > changed the behavior of linkage when USE_PRIAVATE_LIBGCC
> > is defined as "yes".
> > (It dropped arch/arm/lib/eabi_compat.o from the
> > target library.)
> > 
> > Affected boards are all Tegra boards.
> > 
> > This commit gets back the same behavior as before Kbuild series.
> 
> Tested-by: Stephen Warren <swarren@nvidia.com>
> 
> ... although interestingly, at least with the Ubuntu 12.10 ARM
> cross-compiler, the resultant U-Boot works fine with or without this
> patch. I'd have expected it to fail without this patch since it sounds
> like USE_PRIVATE_LIBGCC might not be honored correctly, but perhaps the
> linker cmdline order works out such that the custom libgcc happens to be
> picked up anyway, just not in the way intended.

Thanks for your test.
It's good to know your boards are already working.
(But I am not sure the build will pass with all sorts of cross tools.)

So it turned out it works with or without arch/arm/lib/eabi_compat.c.

I am not a compiler expert. Nor do I know what eabi_compat.o
is needed for.

Anyway, just in case, we'd better to keep the same link behavior
as before Kbuild.


Best Regards
Masahiro Yamada

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

* [U-Boot] kbuild: fix SPL link bug when USE_PRIVATE_LIBGCC is "yes"
  2014-02-24 11:44 [U-Boot] [PATCH] kbuild: fix SPL link bug when USE_PRIVATE_LIBGCC is "yes" Masahiro Yamada
  2014-02-24 18:02 ` Stephen Warren
@ 2014-02-25 13:58 ` Tom Rini
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2014-02-25 13:58 UTC (permalink / raw)
  To: u-boot

On Mon, Feb 24, 2014 at 08:44:14PM +0900, Masahiro Yamada wrote:

> Commit 6825a95 (kbuild: use Linux Kernel build scripts)
> changed the behavior of linkage when USE_PRIAVATE_LIBGCC
> is defined as "yes".
> (It dropped arch/arm/lib/eabi_compat.o from the
> target library.)
> 
> Affected boards are all Tegra boards.
> 
> This commit gets back the same behavior as before Kbuild series.
> 
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> Cc: Tom Warren <twarren@nvidia.com>
> Cc: Tom Rini <trini@ti.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140225/2ac052f6/attachment.pgp>

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

end of thread, other threads:[~2014-02-25 13:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-24 11:44 [U-Boot] [PATCH] kbuild: fix SPL link bug when USE_PRIVATE_LIBGCC is "yes" Masahiro Yamada
2014-02-24 18:02 ` Stephen Warren
2014-02-25  0:24   ` Masahiro Yamada
2014-02-25 13:58 ` [U-Boot] " Tom Rini

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.