Attend warnings with gcc 11&12 when building kernel and modules
Bugzilla: https://bugzilla.redhat.com/2159468
Attend the warnings encountered when building CentOS Stream 9 kernel and module
for x86_64 and arm64 using GCC11 (cs9) and GCC12 (f37).
Some warnings end up being disabled usptream (-Wdangling-pointer,
-Warray-bounds for GCC12 and -Wdeprecated for the sign-file.c), so backport
these changes to align with this behavior.
A few configurations were introduced to deal with -Werror and specific warnings
depending on the toolchain and target architecture. This merge-request tries to
bring these relevant patches without breaking compilation (e.g, CONFIG_WERROR
is introduced, but not set).
https://bugzilla.redhat.com/2142659 was already opened separately to attend the -Wstringop-overread in net/core/dev.c.
Signed-off-by: Eric Chanudet echanude@redhat.com