All of lore.kernel.org
 help / color / mirror / Atom feed
From: Romain Naour <romain.naour@openwide.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] toolchain: Add support for Sourcery Codebench Standard
Date: Fri, 20 Jun 2014 00:38:11 +0200	[thread overview]
Message-ID: <53A36653.3070901@openwide.fr> (raw)
In-Reply-To: <20140619082704.5cda9923@free-electrons.com>

Hi Thomas,

Le 19/06/2014 08:27, Thomas Petazzoni a ?crit :
> Dear Romain Naour,
> 
> On Thu, 19 Jun 2014 01:22:28 +0200, Romain Naour wrote:
>> Signed-off-by: Romain Naour <romain.naour@openwide.fr>
> 
> Thanks. Could you improve a bit the commit log to explain *why* those
> changes are needed? I don't have access to the Sourcery Codebench
> Standard toolchains (though I'm trying to arrange that), so I can't
> review the patch since I have no idea what are the differences between
> the Standard toolchains and the Lite toolchains.
> 
> Thanks,
> 
> Thomas
> 

See my reply in this thread for some explanations:
http://lists.busybox.net/pipermail/buildroot/2014-June/099767.html

The main difference (for the toolchain wrapper) is that standard edition has two
sysroot sub-directories:

$./i686-pc-linux-gnu-gcc -msgxx-glibc -print-sysroot
"i686-pc-linux-gnu/libc/sgxx-glibc": Intel Pentium Pro - Included Glibc 32bits

The command used to find the ARCH_SYSROOT_DIR works.
$./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

$./i686-pc-linux-gnu-gcc -print-sysroot
i686-pc-linux-gnu/libc/system32: use native system libraries (host)

The "i686-pc-linux-gnu/libc/system32" directory does not exist, there is only
"i686-pc-linux-gnu/libc/sgxx-glibc"

Here is the problem, the command used to find the SYSROOT_DIR don't work.
$./i686-pc-linux-gnu-gcc -print-file-name=libc.a
libc.a
it is normal since i686-pc-linux-gnu/libc/system32/usr/lib/libc.a is missing.

The toolchain wrapper does not handle the case where SYSROOT_DIR is not null and
it's not a directory.

That why we need to check if SYSROOT_DIR is a directory, if not ARCH_SYSROOT_DIR
is used to find it (using sed).

In the copy_toolchain_sysroot, we need to "Create a symbolic link that matches
the name of the subdirectory for the architecture variant in the original
sysroot". For that, SYSROOT_DIR and ARCH_SUBDIR must be different.

After that, toolchain_find_sysroot need the -msgxx-glibc flag to work.

Maybe check_glibc need to use ARCH_SYSROOT_DIR instead of SYSROOT_DIR ?
For now, I added ARCH_SYSROOT_DIR as second argument, but it's only used for
that case...

Tell me if you need more details, I know it's not easy for you to review
this patch without reproducing the issue.
It would be nice if you get a license too ;-)

Ok, the commit log need to be *very* more verbose.
I don't expect that this patch to be commited as is without any review since it
may break the toolchain wrapper...

PS: I'm using Sourcery CodeBench 2014.05

Best regards,
Romain

      reply	other threads:[~2014-06-19 22:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-18 23:22 [Buildroot] [PATCH 1/1] toolchain: Add support for Sourcery Codebench Standard Romain Naour
2014-06-19  6:27 ` Thomas Petazzoni
2014-06-19 22:38   ` Romain Naour [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=53A36653.3070901@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 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.