From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: sdk path problem
Date: Thu, 20 Oct 2011 23:08:14 +0100 [thread overview]
Message-ID: <1319148494.2410.100.camel@ted> (raw)
In-Reply-To: <CA+M6bXm9zigRMzMQSdwntHAUYD+vBAmuLbAdNA7RPkBM=wwFNA@mail.gmail.com>
On Thu, 2011-10-20 at 13:24 -0700, Tom Rini wrote:
> On Thu, Oct 20, 2011 at 9:54 AM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > On Thu, 2011-10-20 at 08:22 +0000, James Limbouris wrote:
> >> Hi,
> >>
> >> I have been using meta-toolchain-qte in the past to cross compile a Qt app, and the Linux kernel.
> >> Recently I replaced my old SDK image with a fresh one, and found that I could not link vmlinux anymore.
> >>
> >> When building the kernel, I use the following ('rica' is the distribution name):
> >> export PATH=$PATH:/usr/local/rica-eglibc-i686-armv5te/sysroots/i686-ricasdk-linux/usr/bin/armv5te-rica-linux-gnueabi/
> >> make ARCH=arm CROSS_COMPILE=arm-rica-linux-gnueabi- zImage
> >>
> >> The new error message is:
> >>
> >> Kernel: arch/arm/boot/Image is ready
> >> AS arch/arm/boot/compressed/head.o
> >> GZIP arch/arm/boot/compressed/piggy.gz
> >> CC arch/arm/boot/compressed/misc.o
> >> AS arch/arm/boot/compressed/piggy.o
> >> LD arch/arm/boot/compressed/vmlinux
> >> arm-rica-linux-gnueabi-ld: cannot find libgcc.a: No such file or directory
> >>
> >> Comparing the build with the old sdk to the build with the new one, I find that the command line for linking has changed from:
> >>
> >> arm-rica-linux-gnueabi-ld -EL --defsym zreladdr=0x80008000 --defsym initrd_phys=0x80800000 --defsym params_phys=0x80000100 -p --no-undefined -X /usr/local/rica-eglibc-i686-armv5te/sysroots/arm-rica-linux-gnueabi/usr/lib/arm-rica-linux-gnueabi/4.5.4/libgcc.a -T arch/arm/boot/compressed/vmlinux.lds arch/arm/boot/compressed/head.o arch/arm/boot/compressed/piggy.o arch/arm/boot/compressed/misc.o -o arch/arm/boot/compressed/vmlinux
> >>
> >> to:
> >>
> >> arm-rica-linux-gnueabi-ld -EL --defsym zreladdr=0x80008000 --defsym initrd_phys=0x80800000 --defsym params_phys=0x80000100 -p --no-undefined -X libgcc.a -T arch/arm/boot/compressed/vmlinux.lds arch/arm/boot/compressed/head.o arch/arm/boot/compressed/piggy.o arch/arm/boot/compressed/misc.o -o arch/arm/boot/compressed/vmlinux
> >>
> >> So libgcc.a has lost its path qualification.
> >> I also straced the two linker commands, and found that they differed in one sequence.
> >>
> >> Old:
> >> lstat64("/usr/local/rica-eglibc-i686-armv5te", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> >> lstat64("/usr/local/rica-eglibc-i686-armv5te/sysroots", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> >> lstat64("/usr/local/rica-eglibc-i686-armv5te/sysroots/arm-rica-linux-gnueabi", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> >>
> >> New:
> >> lstat64("/usr/local/rica-eglibc-i686-armv5te", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> >> lstat64("/usr/local/rica-eglibc-i686-armv5te/sysroots", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> >> lstat64("/usr/local/rica-eglibc-i686-armv5te/sysroots/arm-rica-linux-gnueabi", 0xbffe67cc) = -1 ENOENT (No such file or directory)
> >>
> >> Both toolchains are looking for a sysroot at 'arm-rica-linux-gnueabi', but the new toolchain should be looking at 'armv5te-rica-linux-gnueabi', as the names have changed.
> >> I'm not yet acquainted with the darker arts of toolchain generation. Can anyone help with this?
> >
> > There should be a --sysroot option being passed to the compiler/linker
> > to tell which sysroot to look at. We did recently change the sysroot
> > location to reflect the target architecture it was optimized for but
> > this does mean the compiler and other tools need the correct sysroot
> > path to be specified. The environment script that ships with the
> > toolchain should do this?
>
> At least not for things like u-boot and the kernel, no, this isn't
> enough. Just re-confirmed.
The place I'd start looking is how to ensure the tools get called with
the right flags.
The end result may be we need to create separate cross bin directories
for each target sysroot with wrapper scripts for the tools to ensure the
right flags get passed. Rather nasty and I'd prefer not to but I don't
see easy alternatives if getting the flags to the tools is a problem.
Cheers,
Richard
next prev parent reply other threads:[~2011-10-20 22:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <AcyO/XTRcrseDRejRsCNTp7OP0osCQ==>
2011-10-20 8:22 ` sdk path problem James Limbouris
2011-10-20 16:27 ` Khem Raj
2011-10-20 16:38 ` Tom Rini
2011-10-20 16:54 ` Richard Purdie
2011-10-20 20:24 ` Tom Rini
2011-10-20 22:08 ` Richard Purdie [this message]
2011-10-20 22:49 ` Khem Raj
2011-10-21 1:57 ` James Limbouris
2011-10-21 2:27 ` Khem Raj
2011-10-21 4:38 ` James Limbouris
2011-10-21 4:49 ` Khem Raj
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=1319148494.2410.100.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--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