From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Edwards Date: Fri, 26 Mar 2010 01:04:33 +0000 (UTC) Subject: [Buildroot] external toolchain and sysroot References: <1272730299.20100325182803@ya.ru> <93399903.20100325201240@ya.ru> <44830928.20100325201616@ya.ru> <20100325233452.3794166b@surf> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net On 2010-03-25, Thomas Petazzoni wrote: > On Thu, 25 Mar 2010 18:08:49 +0000 (UTC) > Grant Edwards wrote: > >> Based on my sample of three packages (two had the problem), I'm >> guessing it's a very common problem. It looks like the buildroot >> developers use external toolchains that don't require a --sysroot >> option. > > They do. > > What we do to support external toolchains is : > > * We copy the full sysroot of the toolchain into $(STAGING_DIR) > * We copy just the C library and related libraries from the sysroot to > the $(TARGET_DIR) Agreed. > * We pass --sysroot $(STAGING_DIR) to every gcc/ld invocation, so that > gcc/ld find the libraries and header files correctly. Perhaps that's what's supposed to happen, but there appear to be a lot of packages where it doesn't happen (at least for some of us). > Actually, this mechanism *only* works with toolchain supporting > --sysroot. Toolchains *not* supporting --sysroot are rejected (see > toolchain/external-toolchain/ext-tool.mk). True. -- Grant