diff options
author | chrisrd <[email protected]> | 2018-02-16 07:58:23 +1100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-02-15 12:58:23 -0800 |
commit | e921f6508b212c61fcedd0eeb2f9cf9da1abc4d1 (patch) | |
tree | 1eb47661e8e4f048f29dfc93e028d27bda0c7652 /config/kernel.m4 | |
parent | 62d5c5531334c25918dad7f2b303eefe33da4f5a (diff) |
Fix config issues: frame size and headers
1. With various (debug and/or tracing?) kernel options enabled it's
possible for 'struct inode' and 'struct super_block' to exceed the
default frame size, leaving errors like this in config.log:
build/conftest.c:116:1: error: the frame size of 1048 bytes is larger
than 1024 bytes [-Werror=frame-larger-than=]
Fix this by removing the frame size warning for config checks
2. Without the correct headers included, it's possible for declarations
to be missed, leaving errors like this in the config.log:
build/conftest.c:131:14: error: ‘struct nameidata’ declared inside
parameter list [-Werror]
Fix this by adding appropriate headers.
Note: Both these issues can result in silent config failures because
the compile failure is taken to mean "this option is not supported by
this kernel" rather than "there's something wrong with the config
test". This can lead to something merely annoying (compile failures) to
something potentially serious (miscompiled or misused kernel primitives
or functions). E.g. the fixes included here resulted in these
additional defines in zfs_config.h with linux v4.14.19:
Also, drive-by whitespace fixes in config/* files which don't mention
"GNU" (those ones look to be imported from elsewhere so leave them
alone).
Reviewed by: Brian Behlendorf <[email protected]>
Signed-off-by: Chris Dunlop <[email protected]>
Closes #7169
Diffstat (limited to 'config/kernel.m4')
-rw-r--r-- | config/kernel.m4 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/config/kernel.m4 b/config/kernel.m4 index 805ec60a1..e9eec70d4 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -711,7 +711,7 @@ AC_DEFUN([ZFS_LINUX_COMPILE_IFELSE], [ modpost_flag='' test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage AS_IF( - [AC_TRY_COMMAND(cp conftest.c conftest.h build && make [$2] -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag) >/dev/null && AC_TRY_COMMAND([$3])], + [AC_TRY_COMMAND(cp conftest.c conftest.h build && make [$2] -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $FRAME_LARGER_THAN $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag) >/dev/null && AC_TRY_COMMAND([$3])], [$4], [_AC_MSG_LOG_CONFTEST m4_ifvaln([$5],[$5])] ) |