From: Wolfgang Denk Date: Fri, 16 May 2014 09:36:16 +0200 Subject: [U-Boot] [PATCH v2] examples: select libgcc for non-default architecture In-Reply-To: <20140516160556.E1A8.AA925319@jp.panasonic.com> References: <1400222167-22402-1-git-send-email-abrodkin@synopsys.com> <20140516160556.E1A8.AA925319@jp.panasonic.com> Message-ID: <20140516073616.5B2A338554C@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Masahiro, In message <20140516160556.E1A8.AA925319@jp.panasonic.com> you wrote: > > > +# Add GCC lib > > +ifdef CONFIG_USE_PRIVATE_LIBGCC > > +ifeq ($(CONFIG_USE_PRIVATE_LIBGCC),y) > > +PLATFORM_LIBGCC = arch/$(ARCH)/lib/lib.a > > +else > > +PLATFORM_LIBGCC = -L $(CONFIG_USE_PRIVATE_LIBGCC) -lgcc > > +endif > > +else > > +PLATFORM_LIBGCC := -L $(shell dirname `$(CC) $(PLATFORM_CPPFLAGS) \ > > + -print-libgcc-file-name`) -lgcc > > +endif > > This is duplicating the code. > > I think you should export PLATFORM_LIBGCC from the top Makefile > and use it. Yes, this is what I head in mind, too. we already have this setting, so there should be no need to redo it. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Your own mileage may vary.