* [Buildroot] [PATCH] toolchain-external: improve sysroot lookup with multilib
@ 2010-12-12 16:25 Mike Frysinger
2010-12-13 21:29 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Mike Frysinger @ 2010-12-12 16:25 UTC (permalink / raw)
To: buildroot
If the external toolchain we're using starts in a path other than /usr/lib,
the sysroot detection fails as it has /usr/lib hardcoded. Improve the code
to strip out any lib suffixes to handle the most common behavior.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
toolchain/toolchain-external/ext-tool.mk | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index a913162..646b8ea 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -65,7 +65,7 @@ endif # ! no threads
TARGET_CC_NO_SYSROOT=$(filter-out --sysroot=%,$(TARGET_CC_NOCCACHE))
SYSROOT_DIR=$(shell $(TARGET_CC_NO_SYSROOT) -print-sysroot 2>/dev/null)
ifeq ($(SYSROOT_DIR),)
-SYSROOT_DIR=$(shell readlink -f $$(LANG=C $(TARGET_CC_NO_SYSROOT) -print-file-name=libc.a) |sed -r -e 's:usr/lib/libc\.a::;')
+SYSROOT_DIR=$(shell readlink -f $$(LANG=C $(TARGET_CC_NO_SYSROOT) -print-file-name=libc.a) |sed -r -e 's:usr/lib[^/]*/libc\.a::;')
endif
# Now, find if the toolchain specifies a sub-directory for the
--
1.7.3.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] toolchain-external: improve sysroot lookup with multilib
2010-12-12 16:25 [Buildroot] [PATCH] toolchain-external: improve sysroot lookup with multilib Mike Frysinger
@ 2010-12-13 21:29 ` Thomas Petazzoni
2010-12-13 22:08 ` Mike Frysinger
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2010-12-13 21:29 UTC (permalink / raw)
To: buildroot
On Sun, 12 Dec 2010 11:25:25 -0500
Mike Frysinger <vapier@gentoo.org> wrote:
> If the external toolchain we're using starts in a path other than /usr/lib,
> the sysroot detection fails as it has /usr/lib hardcoded. Improve the code
> to strip out any lib suffixes to handle the most common behavior.
>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Could you point me to a specific toolchain for which the problem is
occuring ? Just to make it clear: I do believe that the problem exists
and that the patch is useful in that case, I just want to be sure to
understand it completely, and potentially add a new test case to my
testing stuff.
Thanks,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] toolchain-external: improve sysroot lookup with multilib
2010-12-13 21:29 ` Thomas Petazzoni
@ 2010-12-13 22:08 ` Mike Frysinger
0 siblings, 0 replies; 3+ messages in thread
From: Mike Frysinger @ 2010-12-13 22:08 UTC (permalink / raw)
To: buildroot
On Monday, December 13, 2010 16:29:03 Thomas Petazzoni wrote:
> On Sun, 12 Dec 2010 11:25:25 -0500 Mike Frysinger wrote:
> > If the external toolchain we're using starts in a path other than
> > /usr/lib, the sysroot detection fails as it has /usr/lib hardcoded.
> > Improve the code to strip out any lib suffixes to handle the most common
> > behavior.
>
> Could you point me to a specific toolchain for which the problem is
> occuring ? Just to make it clear: I do believe that the problem exists
> and that the patch is useful in that case, I just want to be sure to
> understand it completely, and potentially add a new test case to my
> testing stuff.
Gentoo defaults x86_64 to lib64
$ gcc -print-file-name=libc.a
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/../../../../lib64/libc.a
$ gcc -print-multi-os-directory
../lib64
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101213/fd51ed46/attachment.pgp>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-12-13 22:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-12 16:25 [Buildroot] [PATCH] toolchain-external: improve sysroot lookup with multilib Mike Frysinger
2010-12-13 21:29 ` Thomas Petazzoni
2010-12-13 22:08 ` Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox