From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Makefile: Introduce ARCH_PLATFORM_LIBGCC variable
Date: Mon, 14 Oct 2013 11:16:37 -0400 [thread overview]
Message-ID: <20131014151637.GA5843@oliver-linux> (raw)
In-Reply-To: <20131012094333.422274df@lilith>
On Sat, Oct 12, 2013 at 09:43:33AM +0200, Albert ARIBAUD wrote:
> Hi Tom,
>
> On Fri, 11 Oct 2013 16:13:03 -0400, Tom Rini <trini@ti.com> wrote:
>
> > In some cases, such as arm multi-lib hardfloat (hf) toolchains, we will
> > have multiple libgcc.a's available, and the arch needs to provide
> > additional logic to determine the right file to use
> > (-print-libgcc-file-name contains no CFLAG parsing logic).
> >
> > Cc: Albert Aribaud <albert.u.boot@aribaud.net>
> > Signed-off-by: Tom Rini <trini@ti.com>
> > ---
> > Makefile | 4 ++++
> > arch/arm/config.mk | 11 +++++++++++
> > 2 files changed, 15 insertions(+)
> >
> > diff --git a/Makefile b/Makefile
> > index b09bfcc..13b396f 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -357,8 +357,12 @@ else
> > PLATFORM_LIBGCC = -L $(USE_PRIVATE_LIBGCC) -lgcc
> > endif
> > else
> > +ifneq ("$(ARCH_PLATFORM_LIBGCC)","")
> > +PLATFORM_LIBGCC := -L $(shell dirname $(ARCH_PLATFORM_LIBGCC)) -lgcc
> > +else
> > PLATFORM_LIBGCC := -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
> > endif
> > +endif
> > PLATFORM_LIBS += $(PLATFORM_LIBGCC)
> > export PLATFORM_LIBS
> >
> > diff --git a/arch/arm/config.mk b/arch/arm/config.mk
> > index d0cf43f..e1d0dec 100644
> > --- a/arch/arm/config.mk
> > +++ b/arch/arm/config.mk
> > @@ -19,6 +19,17 @@ LDFLAGS_FINAL += --gc-sections
> > PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections \
> > -fno-common -ffixed-r9 -msoft-float
> >
> > +#
> > +# When we use a hardfp toolchain if there are both 'libgcc.a' (hardfp) and
> > +# 'arm-linux-gnueabi/libgcc.a' (softfp) we need to use the latter. We
> > +# cannot always build with a hardfp-only toolchain.
>
> What does this last sentence mean exactly?
What it says. If a hardfp only toolchain is used certain targets shall
not link. I had Marek confirm this as well. I don't have the exact
logs handy, but today there's a few targets that will fail, and the nand
flash patchset introduces another because we enforce -msoft-float on
U-Boot, and rely on libgcc from the toolchain for certain functions
(__udivdi3 for example).
I don't know how you weren't making this fail on ELDK 5.x armv7a-fp, but
I was and the Linaro 2013.03 toolchain also will show this problem.
Once I push the nand PR (shortly), building for am3517_crane for example
will fail without this patch.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131014/7071935f/attachment.pgp>
next prev parent reply other threads:[~2013-10-14 15:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-11 20:13 [U-Boot] [PATCH] Makefile: Introduce ARCH_PLATFORM_LIBGCC variable Tom Rini
2013-10-11 21:01 ` Tom Rini
2013-10-12 7:43 ` Albert ARIBAUD
2013-10-14 15:16 ` Tom Rini [this message]
2013-10-14 17:06 ` Albert ARIBAUD
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131014151637.GA5843@oliver-linux \
--to=trini@ti.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox