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
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user