From: Mike Frysinger Date: Tue, 18 Oct 2011 12:06:21 -0400 Subject: [U-Boot] [PATCH] Makefile: prevent libgcc to be linked twice In-Reply-To: <4E9D3923.1050005@atmel.com> References: <1318858875-14201-1-git-send-email-nicolas.ferre@atmel.com> <201110171325.40585.vapier@gentoo.org> <4E9D3923.1050005@atmel.com> Message-ID: <201110181206.22465.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tuesday 18 October 2011 04:30:27 Nicolas Ferre wrote: > On 10/17/2011 07:25 PM, Mike Frysinger : > > On Monday 17 October 2011 09:41:15 Nicolas Ferre wrote: > >> 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. > > > > could you please provide more details ? libgcc should not be listed > > twice. > > I compile current u-boot with the flowing command line: > make -j5 CROSS_COMPILE=arm-linux-gnueabi- USE_PRIVATE_LIBGCC=yes > at91sam9m10g45ek_nandflash the issue shows up when using the board shortcut, and only when your tree is already configured. if you use at91sam9m10g45ek_nandflash_config and then another make, it works fine. if you start from a clean tree (git clean -x -d), it works fine. this is due to PLATFORM_LIBS appending PLATFORM_LIBGCC when the tree has been configured, then exporting PLATFORM_LIBS, then the board shortcut running $(MAKE). the exported PLATFORM_LIBS gets LIBGCC appended a second time. this issue will show up with any value that gets appended to PLATFORM_LIBS and not just libgcc. the arm code already hits this and deals with it locally. seems like we should instead unify this logic, or redo PLATFORM_LIBS so that it isn't an issue in the first place. -mike