From: Mark Hatle <mark.hatle@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: Re: dylan: meta-toolchain and u-boot : "cannot find -lgcc"
Date: Fri, 26 Apr 2013 08:51:58 -0500 [thread overview]
Message-ID: <517A867E.3030708@windriver.com> (raw)
In-Reply-To: <20130426092655.1d0ffdb2@e6520eb>
On 4/26/13 2:26 AM, Eric Bénard wrote:
> Hi,
>
> here is a problem I met while trying to build u-boot with a toolchain
> generated using dylan.
>
> steps to reproduce :
> - bitbake meta-toolchain for an armv5t target
>
> - install the sdk to a custom path ($HOME/oecore-x86_64/ for example
> instead of /usr/local/oecore-x86_64/
>
> - get u-boot :
> git clone git://git.denx.de/u-boot.git
> source ~/oecore-x86_64/environment-setup-armv5te-oe-linux-gnueabi
> make LDFLAGS="" ARCH=arm CROSS_COMPILE=arm-oe-linux-gnueabi-
> da850evm_config
> make LDFLAGS="" ARCH=arm CROSS_COMPILE=arm-oe-linux-gnueabi-
>
> you will get :
> arm-oe-linux-gnueabi-gcc -E -g -Os -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -ffunction-sections -fdata-sections -DCONFIG_SYS_TEXT_BASE=0xc1080000 -DCONFIG_SPL_TEXT_BASE=0x80000000 -DCONFIG_SPL_PAD_TO=0 -DCONFIG_SPL_BUILD -I/data/testdylan/tmp/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /data/testdylan/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/bin/armv5te-oe-linux-gnueabi/../../lib/armv5te-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.7.2/include -pipe -DCONFIG_ARM -D__ARM__ -marm -mno-thumb-interwork -mabi=aapcs-linux -march=armv5te -include /data/testdylan/tmp/u-boot/include/u-boot/u-boot.lds.h -include /data/testdylan/tmp/u-boot/include/config.h -DCPUDIR=arch/arm/cpu/arm926ejs -I/data/testdylan/tmp/u-boot/spl/. -ansi -D__ASSEMBLY__ -P - < /data/testdylan/tmp/u-boot/board/davinci/da8xxevm/u-boot-spl-da850evm.lds > /data/testdylan/tmp/u-boot/spl/u-boot-spl.lds
> cd /data/testdylan/tmp/u-boot/spl/ && arm-oe-linux-gnueabi-ld.bfd -T /data/testdylan/tmp/u-boot/spl/u-boot-spl.lds --gc-sections -Bstatic -Ttext 0x80000000 arch/arm/cpu/arm926ejs/start.o --start-group arch/arm/cpu/arm926ejs/davinci/libdavinci.o arch/arm/cpu/arm926ejs/libarm926ejs.o arch/arm/lib/libarm.o board/davinci/da8xxevm/libda8xxevm.o common/libcommon.o common/spl/libspl.o drivers/mtd/spi/libspi_flash.o drivers/serial/libserial.o drivers/spi/libspi.o lib/libgeneric.o --end-group /data/testdylan/tmp/u-boot/spl/arch/arm/lib/eabi_compat.o -L . -lgcc -Map u-boot-spl.map -o u-boot-spl
> arm-oe-linux-gnueabi-ld.bfd: cannot find -lgcc
>
> this can be fixed by installing the sdk to it's standard path
> (/usr/local/oecore-x86_64/ in the present case).
>
> Is that an expected behaviour (as the sdk is primarly designed to build
> applications) or can that be fixed during the sdk relocation ?
When you use the SDK, you need to be sure to source the SDK environment setup.
Once you do that, pass to the compiler/linker the included CFLAGS and LDFLAGS as
specified in that environment file.
They should end up passing at some point a --sysroot=... and that will tell gcc
where the libraries and headers are for linking. Without the --sysroot= option,
the compiler has no choice but to look for it's original compilation directory.
--Mark
> Thanks,
> Eric
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
next prev parent reply other threads:[~2013-04-26 14:09 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 [this message]
2013-04-26 14:41 ` Eric Bénard
2013-04-26 14:46 ` Mark Hatle
2013-04-26 15:11 ` Eric Bénard
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=517A867E.3030708@windriver.com \
--to=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.