* [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
* [Buildroot] SYSROOT_DIR issue with external toolchains
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
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2009-12-14 22:43 UTC (permalink / raw)
To: buildroot
Le Mon, 14 Dec 2009 20:13:44 +0100,
Bj?rn Forsman <bjorn.forsman@gmail.com> a ?crit :
> SYSROOT_DIR=$(shell $(TARGET_CC) -print-sysroot)
>
> Is there any problem with this change?
Yes, it doesn't work with all gcc versions.
I have
http://git.buildroot.net/~tpetazzoni/git/buildroot/commit/?h=multilib-toolchain-fix&id=2907415d82b7d306ca3f1f1ead0bbb0c7f1505c3
in my patch queue. Something I should clean up, test and submit.
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] SYSROOT_DIR issue with external toolchains
2009-12-14 22:43 ` Thomas Petazzoni
@ 2009-12-15 8:31 ` Bjørn Forsman
0 siblings, 0 replies; 3+ messages in thread
From: Bjørn Forsman @ 2009-12-15 8:31 UTC (permalink / raw)
To: buildroot
2009/12/14 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:
> Le Mon, 14 Dec 2009 20:13:44 +0100,
> Bj?rn Forsman <bjorn.forsman@gmail.com> a ?crit :
>
>> SYSROOT_DIR=$(shell $(TARGET_CC) -print-sysroot)
>>
>> Is there any problem with this change?
>
> Yes, it doesn't work with all gcc versions.
I was afraid so.
> I have
> http://git.buildroot.net/~tpetazzoni/git/buildroot/commit/?h=multilib-toolchain-fix&id=2907415d82b7d306ca3f1f1ead0bbb0c7f1505c3
> in my patch queue. Something I should clean up, test and submit.
Your patch is exactly what I want:-) Thanks!
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