[Buildroot] preparing rootfs with gcc in buildroot

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Thu Jun 21 21:55:42 UTC 2012


Le Thu, 21 Jun 2012 21:24:31 +0000 (UTC),
Grant Edwards <grant.b.edwards at gmail.com> a écrit :

> Right -- if you have buildroot build your compiler.  If you're using
> an external compiler (e.g. one built separately with crosstool-ng),
> you need to tell it where buildroot's libraries and include files are.

No.

When you use an external toolchain in Buildroot, we generate a wrapper
that ensures that the external toolchain cross-compiler is always
properly called with the right argument.

Look at host/usr/bin/<arch>-linux-gcc, and you'll notice it's a symlink
to ext-toolchain-wrapper, which in turns calls the compiler. This
ext-toolchain-wrapper adds the --sysroot option.

So, regardless of whether you're using the internal toolchain backend,
the external toolchain backend, or the crosstool-ng toolchain backend,
you don't have to specify where the libraries and headers are. This was
done on purpose.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com



More information about the buildroot mailing list