[U-Boot] [PATCH] Makefile: prevent libgcc to be linked twice
Nicolas Ferre
nicolas.ferre at atmel.com
Mon Oct 17 15:41:15 CEST 2011
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 at 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
More information about the U-Boot
mailing list