diff --git a/config/Rules.am b/config/Rules.am index 3c22bb8443..e36860ee68 100644 --- a/config/Rules.am +++ b/config/Rules.am @@ -1,8 +1,7 @@ DEFAULT_INCLUDES = -I${top_srcdir} # FIXME: Add -Wshadow once everything is working -AM_CFLAGS = -Wall -Wstrict-prototypes -Werror -Wno-switch -AM_CFLAGS += -Wno-uninitialized -fno-strict-aliasing +AM_CFLAGS = -Wall -Wstrict-prototypes -fno-strict-aliasing -Werror # Expected defines not covered by zfs_config.h or spl_config.h AM_CFLAGS += -D_GNU_SOURCE -D__EXTENSIONS__ -D_REENTRANT diff --git a/config/kernel.m4 b/config/kernel.m4 index e1cd0b90cf..3c82003184 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -6,13 +6,10 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [ dnl # KERNELMAKE_PARAMS="V=1" # Enable verbose module build KERNELMAKE_PARAMS= - KERNELCPPFLAGS="$KERNELCPPFLAGS -Wall -Wstrict-prototypes -Werror" - KERNELCPPFLAGS="$KERNELCPPFLAGS -Wno-switch" - KERNELCPPFLAGS="$KERNELCPPFLAGS -Wno-uninitialized -fno-strict-aliasing" - - KERNELCPPFLAGS="$KERNELCPPFLAGS -DHAVE_SPL -D_KERNEL" + dnl # -Wall -fno-strict-aliasing -Wstrict-prototypes and other + dnl # compiler options are added by the kernel build system. + KERNELCPPFLAGS="$KERNELCPPFLAGS -Werror -DHAVE_SPL -D_KERNEL" KERNELCPPFLAGS="$KERNELCPPFLAGS -DTEXT_DOMAIN=\\\"zfs-linux-kernel\\\"" - KERNELCPPFLAGS="$KERNELCPPFLAGS -I$splsrc -I$splsrc/include -I$TOPDIR" if test "$kernelbuild" != "$kernelsrc"; then