* [Buildroot] SYSROOT_DIR issue with external toolchains
@ 2009-12-14 19:13 Bjørn Forsman
2009-12-14 22:43 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Bjørn Forsman @ 2009-12-14 19:13 UTC (permalink / raw)
To: buildroot
Hi,
I'm setting up Buildroot with the CodeSourcery GCC ARM toolchain and I've
run into a small issue with the toolchain SYSROOT_DIR being incorrect.
First I configured BR for external toolchain and ran make:
$ make
...
Checking external toolchain settings
Incorrect selection of the C library
make: *** [/home/bjornfor/raid/forks/buildroot/output/stamps/ext-toolchain-installed]
Error 255
So I've got an "Incorrect selection of the C library". Running with more
printouts:
$ make V=1
...
SYSROOT_DIR="/opt/codesourcery/arm-none-linux-gnueabi/libc"; if ! test
-f ${SYSROOT_DIR}/lib/ld-linux.so.* ; then echo "Incorrect selection
of the C library"
So it looks for libraries in
SYSROOT_DIR="/opt/codesourcery/arm-none-linux-gnueabi/libc" but the actual
sysroot is here:
$ arm-none-linux-gnueabi-gcc -print-sysroot
/opt/arm-2009q3/bin/../arm-none-linux-gnueabi/libc
Currently BR assings SYSROOT_DIR like this (in
toolchain/external-toolchain/ext-tool.mk):
SYSROOT_DIR=$(shell LANG=C $(TARGET_CC) -v 2>&1 | grep ^Configured |
tr " " "\n" | grep -- "--with-sysroot" | cut -f2 -d=)
Apparently this does not work for CodeSourcery GCC ARM toolchains.
How about doing it like this:
SYSROOT_DIR=$(shell $(TARGET_CC) -print-sysroot)
Is there any problem with this change? (I also tried the -print-sysroot flag on
my native gcc but it didn't print anything. Shouldn't it?)
Best regards,
Bj?rn Forsman
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-12-15 8:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-14 19:13 [Buildroot] SYSROOT_DIR issue with external toolchains Bjørn Forsman
2009-12-14 22:43 ` Thomas Petazzoni
2009-12-15 8:31 ` Bjørn Forsman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox