From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] toolchain-external.mk: fix ARCH_SUBDIR for side-by-side sysroot toolchains
Date: Fri, 28 Oct 2016 14:42:17 +0200 [thread overview]
Message-ID: <20161028144217.46ac552d@free-electrons.com> (raw)
In-Reply-To: <20161027153342.27718-1-Vincent.Riera@imgtec.com>
Hello,
On Thu, 27 Oct 2016 16:33:42 +0100, Vicente Olivert Riera wrote:
> diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
> index f7c6a19..a25c102 100644
> --- a/toolchain/toolchain-external/toolchain-external.mk
> +++ b/toolchain/toolchain-external/toolchain-external.mk
> @@ -665,7 +665,12 @@ define TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS
> SUPPORT_LIB_DIR=`readlink -f $${LIBSTDCPP_A_LOCATION} | sed -r -e 's:libstdc\+\+\.a::'` ; \
> fi ; \
> fi ; \
> - ARCH_SUBDIR=`echo $${ARCH_SYSROOT_DIR} | sed -r -e "s:^$${SYSROOT_DIR}(.*)/$$:\1:"` ; \
> + if [ "`dirname $${ARCH_SYSROOT_DIR}`" = "`dirname $${SYSROOT_DIR}`" ] ; then \
> + SYSROOT_DIR_DIRNAME=`dirname $${SYSROOT_DIR}`/ ; \
> + ARCH_SUBDIR=`echo $${ARCH_SYSROOT_DIR} | sed -r -e "s:^$${SYSROOT_DIR_DIRNAME}(.*)/$$:\1:"` ; \
> + else \
> + ARCH_SUBDIR=`echo $${ARCH_SYSROOT_DIR} | sed -r -e "s:^$${SYSROOT_DIR}(.*)/$$:\1:"` ; \
> + fi ; \
I've applied your patch, which I have slightly improved to handle the
SYSROOT_DIR == ARCH_SYSROOT_DIR case, where ARCH_SUBDIR should be
empty. This way, I believe we handle all three cases:
1. SYSROOT_DIR == ARCH_SYSROOT_DIR
2. SYSROOT_DIR and ARCH_SYSROOT_DIR are side-by-side
3. ARCH_SYSROOT_DIR is nested in SYSROOT_DIR
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
prev parent reply other threads:[~2016-10-28 12:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-27 15:33 [Buildroot] [PATCH] toolchain-external.mk: fix ARCH_SUBDIR for side-by-side sysroot toolchains Vicente Olivert Riera
2016-10-27 17:47 ` Yann E. MORIN
2016-10-28 12:42 ` 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=20161028144217.46ac552d@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 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.