<div>I have had to patch a few other .mk files to work properly .. I can submit those as I get a chance .. util-linux is one that needed work.</div>
<div> </div>
<div>Eric<br><br></div>
<div class="gmail_quote">On Mon, Jan 12, 2009 at 10:45 PM, Eric <span dir="ltr"><<a href="mailto:rocketman110@gmail.com">rocketman110@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>I had to change it to be --sysroot= and then sysroot support works.</div>
<div> </div><font color="#888888">
<div>Eric<br><br></div></font>
<div>
<div></div>
<div class="Wj3C7c">
<div class="gmail_quote">On Mon, Jan 12, 2009 at 10:30 PM, Hamish Moffatt <span dir="ltr"><<a href="mailto:hamish@cloud.net.au" target="_blank">hamish@cloud.net.au</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi Thomas,<br><br>Firstly:<br><br>The external toolchain --sysroot change in CFLAGS has broken my builds.<br>
(I only just merged into into my tree and tried it, so sorry for the<br>delayed feedback).<br><br>configure scripts are failing to compile any test program, with the<br>error:<br><br>configure:2909: checking for C compiler default output file name<br>
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<br>
/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/<br>
collect2: ld returned 1 exit status<br>configure:2939: $? = 1<br><br>The library does exist at that location, I guess it doesn't like the<br>combination of the sysroot and the full path in -L.../lib.<br><br>[ 2:49PM] hamish@bach:work/xyz/buildroot $ ls -l /home/hamish/work/xyz/buildroot/build_armeb/staging_dir/lib/libc.so.0<br>
lrwxrwxrwx 1 hamish hamish 19 2008-11-10 17:15 /home/hamish/work/xyz/buildroot/build_armeb/staging_dir/lib/libc.so.0 -> <a href="http://libuclibc-0.9.29.so/" target="_blank">libuClibc-0.9.29.so</a><br><br>[ 2:54PM] hamish@bach:work/xyz/buildroot $ ls -l /home/hamish/work/xyz/buildroot/build_armeb/staging_dir/lib/<a href="http://libuclibc-0.9.29.so/" target="_blank">libuClibc-0.9.29.so</a><br>
-rw-r--r-- 1 hamish hamish 293315 2008-11-10 17:15 /home/hamish/work/xyz/buildroot/build_armeb/staging_dir/lib/<a href="http://libuclibc-0.9.29.so/" target="_blank">libuClibc-0.9.29.so</a><br><br>My gcc is 4.1.2. This might work with newer versions.<br>
<br>I removed the --sysroot in package/Makefile.in and it works again.<br><br>What is the purpose of using the --sysroot flag? It's used even if gcc<br>is configured without it.<br><br><br>Secondly:<br><br>The change to toolchain/external-toolchain/<a href="http://ext-tool.mk/" target="_blank">ext-tool.mk</a> seems to copy the<br>
sysroot into $(STAGING_DIR) as a side-effect of copying the libs to the<br>$(TARGET_DIR), not as an explicit dependency.<br><br>And in my case, the sysroot IS the $(STAGING_DIR)... but my gcc is not<br>configured with sysroot so it doesn't do any copying anyway.<br>
<br>I did a fresh checkout of my tree and built the toolchain and then my<br>board, and it failed as above. gcc has a hardcoded path to libc in it,<br>so it doesn't expect to get --sysroot as well.<br><br>Hamish<br><font color="#888888">--<br>
Hamish Moffatt VK3SB <<a href="mailto:hamish@debian.org" target="_blank">hamish@debian.org</a>> <<a href="mailto:hamish@cloud.net.au" target="_blank">hamish@cloud.net.au</a>><br>_______________________________________________<br>
buildroot mailing list<br><a href="mailto:buildroot@busybox.net" target="_blank">buildroot@busybox.net</a><br><a href="http://lists.busybox.net/mailman/listinfo/buildroot" target="_blank">http://lists.busybox.net/mailman/listinfo/buildroot</a><br>
</font></blockquote></div><br></div></div></blockquote></div><br>