[Buildroot] external toolchain --sysroot

Eric rocketman110 at gmail.com
Tue Jan 13 04:45:26 UTC 2009


I had to change it to be --sysroot= and then sysroot support works.

Eric

On Mon, Jan 12, 2009 at 10:30 PM, Hamish Moffatt <hamish at cloud.net.au>wrote:

> 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 <http://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 <http://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 <http://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 at debian.org> <hamish at cloud.net.au>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/buildroot/attachments/20090112/266c5cd2/attachment.htm 


More information about the buildroot mailing list