Comment 1 for bug 1933856

Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

For the record, this is what's causing the config differences between the gcc versions:

With gcc 10.3.0, CC_HAS_KASAN_GENERIC is not available as it depends on the following compiler flag:

config CC_HAS_KASAN_GENERIC
         def_bool $(cc-option, -fsanitize=kernel-address)

'cc-option' will do something similar to the following, which with gcc 10.2.0 riscv64 cross compiler would return success:

$ /usr/bin/riscv64-linux-gnu-gcc-10 -Werror -fsanitize=kernel-address -c -x c /dev/null
$ echo $?
0

But with 10.3.0 this doesn't seem to be supported anymore as a standalone flag, depending now on '-fasan-shadow-offset=':

$ /usr/bin/riscv64-linux-gnu-gcc-10 -Werror -fsanitize=kernel-address -c -x c /dev/null
cc1: error: ‘-fsanitize=kernel-address’ with stack protection is not supported without ‘-fasan-shadow-offset=’ for this target [-Werror]

And all KASAN options get removed altogether.

This doesn't cause any real config change, as we disable CONFIG_KASAN anyway. But for our annotations '-' != 'n', failing the config checks.