[PATCH] Raise the minimum GCC version to 5.2
ada at thorsis.com
Tue May 4 06:30:30 BST 2021
Am Mon, May 03, 2021 at 11:25:21AM +0200 schrieb Arnd Bergmann:
> On Mon, May 3, 2021 at 9:35 AM Alexander Dahl <ada at thorsis.com> wrote:
> > Desktops and servers are all nice, however I just want to make you
> > aware, there are embedded users forced to stick to older cross
> > toolchains for different reasons as well, e.g. in industrial
> > environment. :-)
> > This is no show stopper for us, I just wanted to let you be aware.
> Can you be more specific about what scenarios you are thinking of,
> what the motivations are for using an old compiler with a new kernel
> on embedded systems, and what you think a realistic maximum
> time would be between compiler updates?
One reason might be certification. For certain industrial applications
like support for complex field bus protocols, you need to get your
devices tested by an external partner running extensive test suites.
This is time consuming and expensive.
Changing the toolchain of your system then, would be a massive change
which would require recertification, while you could argue just
updating a single component like the kernel and building everything
again, does not require the whole testing process again.
Thin ice, I know.
> One scenario that I've seen previously is where user space and
> kernel are built together as a source based distribution (OE, buildroot,
> openwrt, ...), and the compiler is picked to match the original sources
> of the user space because that is best tested, but the same compiler
> then gets used to build the kernel as well because that is the default
> in the build environment.
One problem we actually ran into in BSPs like that (we build with
ptxdist, however build system doesn't matter here, it could as well
have been buildroot etc.) was things* failing to build with newer
compilers, things we could not or did not want to fix, so staying with
an older toolchain was the obvious choice.
*Things as in bootloaders for an armv5 platform.
> There are two problems I see with this logic:
> - Running the latest kernel to avoid security problems is of course
> a good idea, but if one runs that with ten year old user space that
> is never updated, the system is likely to end up just as insecure.
> Not all bugs are in the kernel.
> - The same logic that applies to ancient user space staying with
> an ancient compiler (it's better tested in this combination) also
> applies to the kernel: running the latest kernel on an old compiler
> is something that few people test, and tends to run into more bugs
> than using the compiler that other developers used to test that
What we actually did: building recent userspace and kernel with older
toolchains, because bootloader. I know, there are several
possibilities to solve this kind of lock:
- built bootloader with different compiler
- update bootloader
As said before, this is no problem for me now, I can work around it,
but to give an idea what could keep people on older toolchains.
More information about the linux-riscv