Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Romain Naour <romain.naour@openwide.fr>
To: buildroot@busybox.net
Subject: [Buildroot] Sourcery Codebench standard edition
Date: Thu, 19 Jun 2014 01:22:23 +0200	[thread overview]
Message-ID: <53A21F2F.8010603@openwide.fr> (raw)

Hi all,

Le 16/06/2014 17:19, Romain Naour a ?crit :
> Hi all,
> 
> Someone has already tried to use Sourcery CodeBench standard edition with Buildroot ?
> (I guess not since it don't work as is ;-) )
> I'm using buildroot 2013.08, but I think problems remain in the latest version.
> 
> I had several issue with the external-toolchain wrapper, since this toolchain need the -msgxx-glibc flag in CFLAGS.

Ok, I can use the Sourcery Codebench standard but I did some hack in
toolchain-external.mk and helper.mk

The first problem is that the main sysroot can't be found with this toolchain
because "-print-file-name=libc.a" don't work as expected:
$./i686-pc-linux-gnu-gcc -print-file-name=libc.a
libc.a
The path to libc.a is not returned, we have only the file name (which is useless...)
So the toolchain check fail because $PWD/libc.a is used as SYSROOT_DIR

Compared to light version (and all other toolchain):
$./i686-pc-linux-gnu-gcc -print-file-name=libc.a
Full/path/to/i686-pc-linux-gnu/libc/usr/lib/libc.a

Here is what we need to do:
$./i686-pc-linux-gnu-gcc -msgxx-glibc -print-file-name=libc.a
Full/path/to/i686-pc-linux-gnu/libc/sgxx-glibc/usr/lib/libc.a

(The flag "-msgxx-glibc" is given by BR2_TARGET_OPTIMIZATION as config option)

But we have only the "ARCH_SYSROOT_DIR" not the "SYSROOT_DIR"...
To find the main sysroot, I added a test on SYSROOT_DIR (if is a directory) then
I filterout the path to remove the last element.

Then the check "check_glibc" fail because ld-linux*.so.* or ld.so.* are not
found since maxdepth = 2. It is fixed with maxdepth = 3.

Sourcery toolchain support rpc feature but the check_glibc_rpc_feature fail
because it look at the main sysroot.
We need to look at the ARCH_SYSROOT_DIR to find rpc.h
It is fixed by adding a second argument which is used to pass the
ARCH_SYSROOT_DIR to check_glibc_rpc_feature.

I'will send a patch to show all the trick,
Any comments are welcome :)

Best regards,
Romain Naour

             reply	other threads:[~2014-06-18 23:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-18 23:22 Romain Naour [this message]
     [not found] <1111022260.18094075.1402928168412.JavaMail.root@openwide.fr>
2014-06-16 15:19 ` [Buildroot] Sourcery Codebench standard edition Romain Naour

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=53A21F2F.8010603@openwide.fr \
    --to=romain.naour@openwide.fr \
    --cc=buildroot@busybox.net \
    /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