From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] More external toolchain fixes
Date: Fri, 31 Oct 2008 14:18:23 +0100 [thread overview]
Message-ID: <20081031131823.GC27517@mx.loc> (raw)
In-Reply-To: <20081030100247.423cf5c1@surf>
On Thu, Oct 30, 2008 at 10:02:47AM +0100, Thomas Petazzoni wrote:
>Fix issues with binary external toolchains
>
>Fix two problems encountered while using an external binary toolchain
>generated by crosstool-ng:
>
> - Don't remove the ending / in LIB_DIR, otherwise find $LIB_DIR
> -maxdepth 1 doesn't find any file in the case LIB_DIR is a symbolic
> link and not a directory.
>
> For some reason, find -maxdepth 1 doesn't have the same behaviour
> on directories and symbolic links. Demonstration:
>
> $ mkdir foobar
> $ touch foobar/t1
> $ touch foobar/t2
> $ ln -s foobar barfoo
> $ find foobar -maxdepth 1 -name 't*'
> foobar/t1
> foobar/t2
> $ find barfoo -maxdepth 1 -name 't*'
> $ find barfoo/ -maxdepth 1 -name 't*'
> barfoo/t1
> barfoo/t2
>
> * Make sure the libraries are writable, otherwise the strip operation
> might fail. The library files may not be writable if the toolchain
> is not writable (which may happen if one wants to prevent anyone
> from overwriting the toolchain, which is done by crosstool-ng, for
> example).
>
>Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>---
> toolchain/external-toolchain/ext-tool.mk | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>Index: buildroot/toolchain/external-toolchain/ext-tool.mk
>===================================================================
>--- buildroot.orig/toolchain/external-toolchain/ext-tool.mk
>+++ buildroot/toolchain/external-toolchain/ext-tool.mk
>@@ -10,7 +10,7 @@
> DST="$(strip $2)"; \
> STRIP="$(strip $3)"; \
> \
>- LIB_DIR=`$(TARGET_CC) -print-file-name=$${LIB} | sed -e "s,/$${LIB}\$$,,"`; \
>+ LIB_DIR=`$(TARGET_CC) -print-file-name=$${LIB} | sed -e "s,$${LIB}\$$,,"`; \
ok.
> \
> if test -z "$${LIB_DIR}"; then \
> echo "copy_toolchain_lib_root: lib=$${LIB} not found"; \
>@@ -28,6 +28,7 @@
> cp -d $${LIB_DIR}/$${LIB} $(TARGET_DIR)$${DST}/; \
> elif test -f $${LIB_DIR}/$${LIB}; then \
> cp $${LIB_DIR}/$${LIB} $(TARGET_DIR)$${DST}/$${LIB}; \
>+ chmod u+w $(TARGET_DIR)$${DST}/$${LIB}; \
just use $(INSTALL) -D -m0755 instead of those 2 commands.
> case "$${STRIP}" in \
> (0 | n | no) \
> ;; \
next prev parent reply other threads:[~2008-10-31 13:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-30 9:02 [Buildroot] [PATCH] More external toolchain fixes Thomas Petazzoni
2008-10-31 13:18 ` Bernhard Reutner-Fischer [this message]
2008-10-31 18:38 ` hartleys
2008-11-03 8:27 ` Thomas Petazzoni
2008-11-03 10:20 ` Peter Korsgaard
2008-11-03 10:33 ` Peter Korsgaard
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=20081031131823.GC27517@mx.loc \
--to=rep.dot.nop@gmail.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.