If we define USE_PRIVATE_LIBGCC, PLATFORM_LIBS is used during
link. During this last link editing, libgcc may be listed twice
and fail.
Prevent this using "filter-out" in top Makefile.

Signed-off-by: Nicolas Ferre <nicolas.fe...@atmel.com>
---
 Makefile |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 5db2e0e..4bdfe11 100644
--- a/Makefile
+++ b/Makefile
@@ -311,7 +311,8 @@ endif
 else
 PLATFORM_LIBGCC = -L $(shell dirname `$(CC) $(CFLAGS) 
-print-libgcc-file-name`) -lgcc
 endif
-PLATFORM_LIBS += $(PLATFORM_LIBGCC)
+PLATFORM_LIBS := $(PLATFORM_LIBGCC) \
+       $(filter-out %$(PLATFORM_LIBGCC), $(PLATFORM_LIBS))
 export PLATFORM_LIBS
 
 # Special flags for CPP when processing the linker script.
-- 
1.7.5.4

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to