Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Hamish Moffatt <hamish@cloud.net.au>
To: buildroot@busybox.net
Subject: [Buildroot] external toolchain --sysroot
Date: Tue, 13 Jan 2009 15:30:14 +1100	[thread overview]
Message-ID: <20090113043014.GA5238@cloud.net.au> (raw)

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>

             reply	other threads:[~2009-01-13  4:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-13  4:30 Hamish Moffatt [this message]
2009-01-13  4:45 ` [Buildroot] external toolchain --sysroot 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090113043014.GA5238@cloud.net.au \
    --to=hamish@cloud.net.au \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox