[Buildroot] compiler plugins & compiling the kernel

Kenneth Adam Miller kennethadammiller at gmail.com
Sat Aug 20 22:39:27 UTC 2016


On Sat, Aug 20, 2016 at 2:01 PM, Thomas Petazzoni
<thomas.petazzoni at free-electrons.com> wrote:
> Hello,
>
> On Sat, 20 Aug 2016 13:10:07 -0400, Kenneth Adam Miller wrote:
>
>> I've noticed that when the kernel is built, it appears to always be
>> built with the host compiler, and not the buildroot specified cross
>> compiler. Why is that?
>
> This is not true, the kernel is built with the cross-compiler.
> Otherwise, Buildroot would never be able to build an ARM, PowerPC or
> MIPS kernel on a x86 or x86-64 build machine.
>

Well I'm not arguing with you, but I had at one point set up buildroot
within a docker instance, and then started the build going when it
stopped because of some compiler centric package on my host. I
installed something, and then the build continued in exactly that
sequence. Although, because my docker instance was stopped abruptly
and since bash saves history to disk after having been exited I don't
have that package name. The compiler packages I have are gcc, gcc-5,
gcc-5-base:amd64, gcc-5-locales, gcc-5-plugin-dev, gcc-6-base:amd64,
libgcc-5-dev:amd64, libgcc1:amd64

>> In addition, for some pax related options, it requires gcc plugins for
>> the version being used. That means that I would have to have plugin
>> support for my host, correct?
>
> No, you would need support for plugins in the cross-compiler.
>

We have been building gr-security modded kernels for some time on a
different machine with gcc 4.8, but I'm having this confusion; does
the buildroot internal compiler support that? Because I'm getting an
error in buildroot indicating that compiler plugins must be supported,
and I'm using the buildroot internal compiler with version 5.x, it
confused me a little bit.

>> I don't believe that there is a way to
>> enable plugin support for the buildroot toolchain or for crosstool. At
>> least, when I looked and searched I didn't see any option that
>> mentioned that. I just want to make sure that I have it correct in
>> that my host compiler is being used to build the kernel.
>
> You're not correct. Support for plugins should be added to the
> cross-compiler if you need plugin support to build your kernel.
>

That doesn't appear to be an option in buildroot.

> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com


More information about the buildroot mailing list