Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Eric Bénard" <eric@eukrea.com>
To: Mark Hatle <mark.hatle@windriver.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: dylan: meta-toolchain and u-boot : "cannot find -lgcc"
Date: Fri, 26 Apr 2013 17:11:03 +0200	[thread overview]
Message-ID: <20130426171103.2412f8c5@e6520eb> (raw)
In-Reply-To: <517A933C.4020507@windriver.com>

Hi Mark,

Le Fri, 26 Apr 2013 09:46:20 -0500,
Mark Hatle <mark.hatle@windriver.com> a écrit :
> I see, it's using ld instead of gcc for linking.  AFAIK though, you really 
> shouldn't be using -lgcc in either uboot or linux for any platform.  That seems 
> suspicious to me.
> 
u-boot is using libgcc in its makefile (Linux doesn't).

I've found the problem root cause in the u-boot's Makefile :
PLATFORM_LIBGCC := -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
(but CC and CFLAGS are set in the Makefiles thus the ones of the
environment are not used

$ arm-oe-linux-gnueabi-gcc  -print-libgcc-file-name
libgcc.a
but :
$ arm-oe-linux-gnueabi-gcc --sysroot=/path_to/oecore-x86_64/sysroots/armv5te-oe-linux-gnueabi -print-libgcc-file-name 
returns :
/path_to/oecore-x86_64/sysroots/armv5te-oe-linux-gnueabi/usr/lib/arm-oe-linux-gnueabi/4.7.2/libgcc.a

so if I manage to pass
--sysroot=/path_to/oecore-x86_64/sysroots/armv5te-oe-linux-gnueabi
when PLATFORM_LIBGCC is computed, I get a working build.

so that's not a problem in the SDK : thanks for driving me
to the right track to investigate on this issue ;-)

Eric



      reply	other threads:[~2013-04-26 15:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-26  7:26 dylan: meta-toolchain and u-boot : "cannot find -lgcc" Eric Bénard
2013-04-26 13:51 ` Mark Hatle
2013-04-26 14:41   ` Eric Bénard
2013-04-26 14:46     ` Mark Hatle
2013-04-26 15:11       ` Eric Bénard [this message]

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=20130426171103.2412f8c5@e6520eb \
    --to=eric@eukrea.com \
    --cc=mark.hatle@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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