summaryrefslogtreecommitdiffstats
path: root/config/kernel.m4
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2017-01-28 12:12:25 -0800
committerGitHub <[email protected]>2017-01-28 12:12:25 -0800
commit3130b84e94717fe9aad67a14defe79bb7f10fa9f (patch)
tree19f697e2cf41e33464a96a29d1c2014304f0a8b5 /config/kernel.m4
parent721ed0ee86463cb3e4a562d86783fd1372182367 (diff)
Add -Wno-declaration-after-statement to KERNELCPPFLAGS
Disable the warnings regarding ISO C90 forbidding mixed declarations and code. While this functionality was introduced as part of C99 gcc does allow this in C90 mode as an extension. https://gcc.gnu.org/onlinedocs/gcc/Mixed-Declarations.html#Mixed-Declarations Allowing this usage helps minimize the changes required when porting patches from OpenZFS. The downside here is that this functionality is specific to gcc. Reviewed-by: George Melikov <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #5686
Diffstat (limited to 'config/kernel.m4')
-rw-r--r--config/kernel.m41
1 files changed, 1 insertions, 0 deletions
diff --git a/config/kernel.m4 b/config/kernel.m4
index afb0cc7fa..a44132837 100644
--- a/config/kernel.m4
+++ b/config/kernel.m4
@@ -123,6 +123,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
dnl # -Wall -fno-strict-aliasing -Wstrict-prototypes and other
dnl # compiler options are added by the kernel build system.
+ KERNELCPPFLAGS="$KERNELCPPFLAGS -Wno-declaration-after-statement"
KERNELCPPFLAGS="$KERNELCPPFLAGS $NO_UNUSED_BUT_SET_VARIABLE"
KERNELCPPFLAGS="$KERNELCPPFLAGS $NO_BOOL_COMPARE"
KERNELCPPFLAGS="$KERNELCPPFLAGS -DHAVE_SPL -D_KERNEL"