[Buildroot] Can't use output/host/ as "SDK" with external toolchain

Bryce Schober bryce.schober at gmail.com
Tue Jan 10 20:22:31 UTC 2012


As I said in my original post, I am using an externally generated and
configured (and statically linked) crosstool-ng toolchain. I believe that
it is the buildroot import thereof that is at fault. Again, in summary:
1. Buildroot generates absolute-pathed symbolic links to the external
binutils in output/host/usr/bin instead of copying them in.
2. Buildroot's ext-toolchain-wrapper uses an absolute path for its sysroot
configuration.
3. Buildroot's ext-toolchain-wrapper uses an absolute path for its binary
exec path.

I realize that these problems are triggered by my specification of:
BR2_TOOLCHAIN_EXTERNAL_PATH="$(TOPDIR)/../my-ext-toolchain-dir/"
But I can't specify merely "../my-ext-toolchain-dir/" without breaking
things either.

<><  <><  <><
Bryce Schober



On Tue, Jan 10, 2012 at 3:26 AM, Thomas De Schampheleire <
patrickdepinguin+buildroot at gmail.com> wrote:

> Hi Bryce,
>
> On Mon, Jan 9, 2012 at 11:54 PM, Bryce Schober <bryce.schober at gmail.com>
> wrote:
> > What I mean by "SDK" is the ability to compile external programs using
> the
> > buildroot toolchain and libraries on any reasonably-compatible host. I'm
> > assuming that the toolchain itself is built properly static for its own
> host
> > independence (which in my case, it is). Ideally the toolchain in the
> > output/host directory would be capable of standing alone, when built
> > properly
> >
> > I'm having two issues w/ archving the output/host dir for extraction and
> > usage in a different host directory. I'm using a custom-built
> crosstool-ng
> > built externally and independent of buildroot.
> >
> > The external toolchain import results in three distinct problems that I
> can
> > see:
> > 1. The symbolic links for binutils binaries in use absolute paths to
> link to
> > the external toolchain instead of copying them in.
> > 2. The ext-toolchain-wrapper uses an absolute path for the sysroot
> > directory.
> > 3. The ext-toolchain-wrapper seems to point to the old (import-from) bin
> > directory, not the path to which the toolchain has been copied.
> >
> > I'm not particularly familiar with the relocatability of toolchains or
> > buildroot's method thereof, and so am not sure where to start with a
> > proposal, let alone a patch. If I could get some direction as to how
> best to
> > tackle this, I'd be grateful.
>
> It is known that the toolchains generated by buildroot are not relocatable.
> However, you can tell buildroot to create the toolchain with
> crosstool-ng, and this one is relocatable. I suggest you give that a
> try to see if it solves your problems.
> I'm using buildroot in the same way and it works fine for me.
>
> Best regards,
> Thomas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120110/6148e478/attachment-0001.html>


More information about the buildroot mailing list