Patchwork [U-Boot,v10,15/16] spl: fix SPL build of private libgcc

mail settings
Submitter Allen Martin
Date Aug. 29, 2012, 12:07 a.m.
Message ID <>
Download mbox | patch
Permalink /patch/180598/
State Superseded
Delegated to: Marek Vasut
Headers show


Allen Martin - Aug. 29, 2012, 12:07 a.m.
This fixes the SPL build to link with the SPL version of libgcc if
USE_PRIVATE_LIBGCC is set to "yes".  Previously it was linking with
the libgcc from the normal u-boot build because it gets set in
PLATFORM_LIBS and passed down the to the SPL build.

Signed-off-by: Allen Martin <>
Acked-by: Stephen Warren <>
Tested-by: Thierry Reding <>
Signed-off-by: Tom Warren <>
 spl/Makefile |    6 ++++++
 1 file changed, 6 insertions(+)


diff --git a/spl/Makefile b/spl/Makefile
index d04d2f2..c82e9de 100644
--- a/spl/Makefile
+++ b/spl/Makefile
@@ -66,6 +66,12 @@  ifeq ($(SOC),tegra20)
 LIBS-y += arch/$(ARCH)/cpu/$(SOC)-common/lib$(SOC)-common.o
+# Add GCC lib
+ifeq ("$(USE_PRIVATE_LIBGCC)", "yes")
+PLATFORM_LIBGCC = $(SPLTREE)/arch/$(ARCH)/lib/libgcc.o
+PLATFORM_LIBS := $(filter-out %/libgcc.o, $(filter-out -lgcc, $(PLATFORM_LIBS))) $(PLATFORM_LIBGCC)
 START := $(addprefix $(SPLTREE)/,$(START))
 LIBS := $(addprefix $(SPLTREE)/,$(sort $(LIBS-y)))