Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] external toolchain --sysroot
@ 2009-01-13  4:30 Hamish Moffatt
  2009-01-13  4:45 ` Eric
  0 siblings, 1 reply; 8+ messages in thread
From: Hamish Moffatt @ 2009-01-13  4:30 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

Firstly:

The external toolchain --sysroot change in CFLAGS has broken my builds.
(I only just merged into into my tree and tried it, so sorry for the
delayed feedback).

configure scripts are failing to compile any test program, with the
error:

configure:2909: checking for C compiler default output file name
configure:2936: /home/hamish/work/xyz/buildroot/build_armeb/staging_dir/usr/bin/armeb-linux-uclibcgnu-gcc -Os  -I/home/hamish/work/xyz/buildroot/build_armeb/staging_dir/include -I/home/hamish/work/xyz/buildroot/build_armeb/staging_dir/usr/include -I/home/hamish/work/xyz/buildroot/build_armeb/staging_dir/usr/armeb-linux-uclibcgnu/include --sysroot /home/hamish/work/xyz/buildroot/build_armeb/staging_dir/ -Os  -I/home/hamish/work/xyz/buildroot/build_armeb/staging_dir/include -I/home/hamish/work/xyz/buildroot/build_armeb/staging_dir/usr/include -I/home/hamish/work/xyz/buildroot/build_armeb/staging_dir/usr/armeb-linux-uclibcgnu/include --sysroot /home/hamish/work/xyz/buildroot/build_armeb/staging_dir/  -L/home/hamish/work/xyz/buildroot/build_armeb/staging_dir/lib -L/home/hamish/work/xyz/buildroot/build_armeb/staging_dir/usr/lib conftest.c  >&5
/home/hamish/work/xyz/buildroot/build_armeb/staging_dir/usr/bin/armeb-linux-uclibcgnu-ld: cannot find /home/hamish/work/xyz/buildroot/build_armeb/staging_dir/lib/libc.so.0 inside /home/hamish/work/xyz/buildroot/build_armeb/staging_dir/
collect2: ld returned 1 exit status
configure:2939: $? = 1

The library does exist at that location, I guess it doesn't like the
combination of the sysroot and the full path in -L.../lib.

[ 2:49PM] hamish at bach:work/xyz/buildroot $ ls -l /home/hamish/work/xyz/buildroot/build_armeb/staging_dir/lib/libc.so.0 
lrwxrwxrwx 1 hamish hamish 19 2008-11-10 17:15 /home/hamish/work/xyz/buildroot/build_armeb/staging_dir/lib/libc.so.0 -> libuClibc-0.9.29.so

[ 2:54PM] hamish at bach:work/xyz/buildroot $ ls -l /home/hamish/work/xyz/buildroot/build_armeb/staging_dir/lib/libuClibc-0.9.29.so 
-rw-r--r-- 1 hamish hamish 293315 2008-11-10 17:15 /home/hamish/work/xyz/buildroot/build_armeb/staging_dir/lib/libuClibc-0.9.29.so

My gcc is 4.1.2. This might work with newer versions.

I removed the --sysroot in package/Makefile.in and it works again.

What is the purpose of using the --sysroot flag? It's used even if gcc
is configured without it.


Secondly:

The change to toolchain/external-toolchain/ext-tool.mk seems to copy the
sysroot into $(STAGING_DIR) as a side-effect of copying the libs to the
$(TARGET_DIR), not as an explicit dependency.

And in my case, the sysroot IS the $(STAGING_DIR)... but my gcc is not
configured with sysroot so it doesn't do any copying anyway.

I did a fresh checkout of my tree and built the toolchain and then my
board, and it failed as above. gcc has a hardcoded path to libc in it,
so it doesn't expect to get --sysroot as well.

Hamish
-- 
Hamish Moffatt VK3SB <hamish@debian.org> <hamish@cloud.net.au>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-01-14 10:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-13  4:30 [Buildroot] external toolchain --sysroot Hamish Moffatt
2009-01-13  4:45 ` Eric
2009-01-13  4:46   ` Eric
2009-01-13  4:52     ` Eric
2009-01-13 23:11       ` Hamish Moffatt
2009-01-14  8:30         ` Daniel James Laird
2009-01-14  9:43         ` Bernhard Reutner-Fischer
2009-01-14 10:04           ` Hamish Moffatt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox