diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-01-11 17:06:42 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-01-11 17:06:42 -0800 |
commit | 01367e86e90948b1ae8f66b2c23aadd7e8374e34 (patch) | |
tree | 27f4c72625ba2ebd0395f6bb38af1e608d53e61e /Makefile | |
parent | 3e3a138a46906641d95599040f2470a60740c399 (diff) | |
parent | 552a23a0e5d0a84cecd4687043d8030673981d30 (diff) | |
download | linux-01367e86e90948b1ae8f66b2c23aadd7e8374e34.tar.bz2 |
Merge tag 'Wcast-function-type-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux
Pull cast-function-type warning addition from Gustavo A. R. Silva:
"This globally enables -Wcast-function-type.
We need to make sure new function cast mismatches are not introduced
in the kernel in order to avoid tripping CFI checking"
* tag 'Wcast-function-type-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux:
Makefile: Enable -Wcast-function-type
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -953,6 +953,11 @@ KBUILD_CFLAGS += -Wvla # disable pointer signed / unsigned warnings in gcc 4.0 KBUILD_CFLAGS += -Wno-pointer-sign +# In order to make sure new function cast mismatches are not introduced +# in the kernel (to avoid tripping CFI checking), the kernel should be +# globally built with -Wcast-function-type. +KBUILD_CFLAGS += $(call cc-option, -Wcast-function-type) + # disable stringop warnings in gcc 8+ KBUILD_CFLAGS += $(call cc-disable-warning, stringop-truncation) |