Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 0/3] toolchain: Add support for Sourcery Codebench Standard
Date: Sun, 12 Oct 2014 16:53:32 +0200	[thread overview]
Message-ID: <20141012165332.07ee1277@free-electrons.com> (raw)
In-Reply-To: <1405277160-4686-1-git-send-email-romain.naour@openwide.fr>

Dear Romain Naour,

On Sun, 13 Jul 2014 20:45:57 +0200, Romain Naour wrote:

> The purpose of this series is to provide support for Sourcery Codebench
> Standard (licenced) edition in Buildroot.
> 
> Since these toolchain can't be downloaded, we need to use the custom toolchain
> backend to import them into Buildroot.

Thanks for this patch series. As we discussed today during the meeting,
the currently proposed implementation is a bit fragile because:

 * SYSROOT_DIR is empty/invalid in your situation, while most of the
   code assumes SYSROOT_DIR exists. While your patches make sure every
   time SYSROOT_DIR is used, we fallback to ARCH_SYSROOT_DIR if
   SYSROOT_DIR doesn't exist, this may break in the future, especially
   as we don't have access to this proprietary Sourcery Codebench
   toolchain to test and check that future changes will keep this
   toolchain working.

 * the dance with faking a SYSROOT_DIR being different from
   ARCH_SYSROOT_DIR by one path component is really highly specific to
   this toolchain, and will not work in other situations.

Consequently, the proposal is to:

 * Change the SYSROOT_DIR/ARCH_SYSROOT_DIR detection logic so that if
   SYSROOT_DIR is empty/bogus, then the same value as ARCH_SYSROOT_DIR
   is used. This ensures that both SYSROOT_DIR and ARCH_SYSROOT_DIR
   point to valid directories (which would the same in the case of this
   toolchain, which brings us back to the non-multilib toolchain case).

 * Adjust the symlink logic to handle a new case: when SYSROOT_DIR ==
   ARCH_SYSROOT_DIR, look again at the real sysroot directory, and if
   it's bogus, then it means we in fact have a multilib toolchain that
   may need a symbolic link. If that's the case, then using
   -print-sysroot with no flags, -print-sysroot with flags, and
   computing the common part of both paths, we get the "base sysroot".

Thinking about it, we might also think of using the strategy described
above to find the "base sysroot" and use this value in SYSROOT_DIR, no?

In the mean time, I'll mark the three patches as Changes Requested in
patchwork.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

      parent reply	other threads:[~2014-10-12 14:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-13 18:45 [Buildroot] [PATCH 0/3] toolchain: Add support for Sourcery Codebench Standard Romain Naour
2014-07-13 18:45 ` [Buildroot] [PATCH 1/3] toolchain-external: handle a special case where kernel headers check needs TOOLCHAIN_EXTERNAL_CFLAGS Romain Naour
2014-07-13 18:45 ` [Buildroot] [PATCH 2/3] toolchain-external: handle a special case where glibc " Romain Naour
2014-07-13 18:46 ` [Buildroot] [PATCH 3/3] toolchain-external: fix Sourcery Codebench symlink Romain Naour
2014-10-12 14:53 ` Thomas Petazzoni [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=20141012165332.07ee1277@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --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