Can we configure newer GCC to build kernels with the old gnu89 standard?
Currently, most of our downstream kernels are patched to build on GCC5 and above. Newer GCC versions changed the default C standard from gnu89 to c11, which broke older kernels that relied on gnu89 features such as inline functions.
Most of our downstream kernels include patches to fix these breakages to allow the kernel to build on c11.
However, mainline Linux simply added a CFLAG to switch newer GCC to the older gnu89 standard.
Should we try adding this patch when porting to new devices? That might simplify the process by reducing the number of patches required.
When I added the Nexus 6P (huawei-angler)'s 3.10 kernel, it built after I added that patch, without any additional modifications. However, none of the other ports uses this method; I'm not sure why.