[Buildroot] [PATCH 0/2] Fix Rock 5B build, broken by gcc 12 warnings

Kilian Zinnecker kilian.zinnecker at mail.de
Tue Aug 8 20:44:04 UTC 2023


Hello Thomas, all,

> > Building the image for the Radxa Rock 5B currently breaks: The gcc
> > version was recently changed to version 12 and gcc 12 seems to stop
> > compiling, if certain warnings occur. See the broken build here:
> > 
> > https://gitlab.com/buildroot.org/buildroot/-/jobs/4795673759
> > 
> > This patch series adds two patches from the mainline Linux kernel,
> > which fix two of the warnings. However, also custom code parts of the
> > used custom kernel break due to warnings from gcc 12. The best
> > solution would be to fix those issues as well. However, until they are
> > fixed, the version of gcc used for the Rock 5B is set to the previous
> > version, gcc 11.
> > 
> > Kilian Zinnecker (2):
> >   configs/rock5b: Freeze gcc to version 11
> >   board/radxa/rock5b: Add patches for gcc12 warnings
> 
> I'm not sure to understand the reasoning for the second patch. Does it
> fix all gcc 12.x issues or not? If not, what is the motivation for this
> second patch?

No, the second patch does not fix all gcc 12.x issues. It only fixes two of 
them. I think that fixing two of the warnings for now still is a plus.

> Also: gcc 11.x is currently the oldest version supported by Buildroot,
> it means that as soon as gcc 14.x is released, we will drop support for
> gcc 11.x. So clearly, the solution of sticking to gcc 11.x is not going
> to work for a very long time.

Thanks for the info, I actually would not have known this! I think that the 
best way is to ask the maintainers of the Radxa custom kernel whether they may 
fix the remaining issues, so that the custom kernel compiles with gcc 12.x. I 
intend to do so.

I think both patches should be applied. However, the first patch alone should 
already cause to fix the build itself. (Tbh. I did not test it though.)

Best regards,
Kilian





More information about the buildroot mailing list