diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-01-12 02:06:42 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-01-12 02:06:42 +0100 |
commit | 01367e86e90948b1ae8f66b2c23aadd7e8374e34 (patch) | |
tree | 27f4c72625ba2ebd0395f6bb38af1e608d53e61e /Makefile | |
parent | Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm (diff) | |
parent | Makefile: Enable -Wcast-function-type (diff) | |
download | linux-01367e86e90948b1ae8f66b2c23aadd7e8374e34.tar.xz linux-01367e86e90948b1ae8f66b2c23aadd7e8374e34.zip |
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) |