public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] Makefile: prevent libgcc to be linked twice
@ 2011-10-17 13:41 Nicolas Ferre
  2011-10-17 17:25 ` Mike Frysinger
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Ferre @ 2011-10-17 13:41 UTC (permalink / raw)
  To: u-boot

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.ferre@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

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

end of thread, other threads:[~2011-10-20  8:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-17 13:41 [U-Boot] [PATCH] Makefile: prevent libgcc to be linked twice Nicolas Ferre
2011-10-17 17:25 ` Mike Frysinger
2011-10-18  8:30   ` Nicolas Ferre
2011-10-18 16:06     ` Mike Frysinger
2011-10-20  8:26       ` Nicolas Ferre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox