From patchwork Mon Oct 17 13:41:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Ferre X-Patchwork-Id: 120213 X-Patchwork-Delegate: vapier@gentoo.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 7BBF8B6F99 for ; Tue, 18 Oct 2011 01:08:56 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BC73A286E6; Mon, 17 Oct 2011 16:08:52 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SbVzVwNG7RmN; Mon, 17 Oct 2011 16:08:52 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 864A4286D8; Mon, 17 Oct 2011 16:08:49 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 83B38286D8 for ; Mon, 17 Oct 2011 16:08:47 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CGPt6s3gsagt for ; Mon, 17 Oct 2011 16:08:45 +0200 (CEST) X-Greylist: delayed 1643 seconds by postgrey-1.27 at theia; Mon, 17 Oct 2011 16:08:43 CEST X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from sjogate2.atmel.com (newsmtp5.atmel.com [204.2.163.5]) by theia.denx.de (Postfix) with ESMTP id 20D81286D7 for ; Mon, 17 Oct 2011 16:08:43 +0200 (CEST) Received: from meyreuil.atmel.fr ([10.159.254.132]) by sjogate2.atmel.com (8.13.6/8.13.6) with ESMTP id p9HDbinw018114 for ; Mon, 17 Oct 2011 06:37:47 -0700 (PDT) Received: from ness..rfo.atmel.com ([10.159.245.112]) by meyreuil.atmel.fr (8.11.7p1+Sun/8.11.7) with ESMTP id p9HDfFe26768; Mon, 17 Oct 2011 15:41:15 +0200 (MEST) From: Nicolas Ferre To: U-Boot@lists.denx.de Date: Mon, 17 Oct 2011 15:41:15 +0200 Message-Id: <1318858875-14201-1-git-send-email-nicolas.ferre@atmel.com> X-Mailer: git-send-email 1.7.5.4 Subject: [U-Boot] [PATCH] Makefile: prevent libgcc to be linked twice X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 --- 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.