Add '-fwrapv' to gcc CFLAGS
[sfrench/cifs-2.6.git] / Makefile
index 2e2f4a4324af777e66ffd333f7b3e44c8d5e243b..f607658ac896b710ed1d144b415c3873d097bede 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -347,6 +347,7 @@ KBUILD_CPPFLAGS := -D__KERNEL__
 KBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
                   -fno-strict-aliasing -fno-common \
                   -Werror-implicit-function-declaration
 KBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
                   -fno-strict-aliasing -fno-common \
                   -Werror-implicit-function-declaration
+KBUILD_CFLAGS  += $(call cc-option,-fwrapv)
 KBUILD_AFLAGS   := -D__ASSEMBLY__
 
 # Read KERNELRELEASE from include/config/kernel.release (if it exists)
 KBUILD_AFLAGS   := -D__ASSEMBLY__
 
 # Read KERNELRELEASE from include/config/kernel.release (if it exists)