From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] toolchain-external.mk: fix ARCH_SUBDIR for side-by-side sysroot toolchains
Date: Thu, 27 Oct 2016 19:47:07 +0200 [thread overview]
Message-ID: <20161027174707.GA3549@free.fr> (raw)
In-Reply-To: <20161027153342.27718-1-Vincent.Riera@imgtec.com>
Vicente, All,
On 2016-10-27 16:33 +0100, Vicente Olivert Riera spake thusly:
> ARCH_SUBDIR is computed based on the value of ARCH_SYSROOT_DIR and
> SYSROOT_DIR. For nested toolchains ARCH_SYSROOT_DIR is a subdir of
> SYSROOT_DIR, so a sed command like this one...
>
> sed -r -e "s:^${SYSROOT_DIR}(.*)/$:\1:"
>
> ...basically removes the leading SYSROOT_DIR part from ARCH_SYSROOT_DIR.
>
> But, for side-by-side sysroot toolchains ARCH_SYSROOT_DIR and
> SYSROOT_DIR are at the same level, so the above sed command doesn't
> make any effect. This patch detects that situation and uses an
> appropriate sed command for it.
As discussed on IRC, there was a previous patch of mine on the topic:
https://patchwork.ozlabs.org/patch/627505/
I did not yet send v2 of that patch:
https://git.buildroot.org/~ymorin/git/buildroot/commit/?h=yem/ext-toolchain-fixes&id=30ab28ce467b7d7dea5e181cae69ae882f936e98
I'll send it shortly so we can compare the two and decide which is
best.
Regards,
Yann E. MORIN.
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> ---
> toolchain/toolchain-external/toolchain-external.mk | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> 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 ; \
> $(call MESSAGE,"Copying external toolchain sysroot to staging...") ; \
> $(call copy_toolchain_sysroot,$${SYSROOT_DIR},$${ARCH_SYSROOT_DIR},$${ARCH_SUBDIR},$${ARCH_LIB_DIR},$${SUPPORT_LIB_DIR})
> endef
> --
> 2.10.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2016-10-27 17:47 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 [this message]
2016-10-28 12:42 ` Thomas Petazzoni
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=20161027174707.GA3549@free.fr \
--to=yann.morin.1998@free.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