diff options
Diffstat (limited to 'config/kernel.m4')
-rw-r--r-- | config/kernel.m4 | 54 |
1 files changed, 52 insertions, 2 deletions
diff --git a/config/kernel.m4 b/config/kernel.m4 index 465f69b72..a951ce848 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -417,13 +417,39 @@ AC_DEFUN([ZFS_AC_KERNEL], [ AC_MSG_RESULT([$kernsrcver]) - AS_VERSION_COMPARE([$kernsrcver], [$ZFS_META_KVER_MIN], [ - AC_MSG_ERROR([ + AX_COMPARE_VERSION([$kernsrcver], [ge], [$ZFS_META_KVER_MIN], [], [ + AC_MSG_ERROR([ *** Cannot build against kernel version $kernsrcver. *** The minimum supported kernel version is $ZFS_META_KVER_MIN. ]) ]) + AC_ARG_ENABLE([linux-experimental], + AS_HELP_STRING([--enable-linux-experimental], + [Allow building against some unsupported kernel versions])) + + AX_COMPARE_VERSION([$kernsrcver], [ge], [$ZFS_META_KVER_MAX], [ + AX_COMPARE_VERSION([$kernsrcver], [eq2], [$ZFS_META_KVER_MAX], [ + kern_max_version_ok=yes + ], [ + kern_max_version_ok=no + ]) + ], [ + kern_max_version_ok=yes + ]) + + AS_IF([test "x$kern_max_version_ok" != "xyes"], [ + AS_IF([test "x$enable_linux_experimental" == "xyes"], [ + AC_DEFINE(HAVE_LINUX_EXPERIMENTAL, 1, + [building against unsupported kernel version]) + ], [ + AC_MSG_ERROR([ + *** Cannot build against kernel version $kernsrcver. + *** The maximum supported kernel version is $ZFS_META_KVER_MAX. + ]) + ]) + ]) + LINUX=${kernelsrc} LINUX_OBJ=${kernelbuild} LINUX_VERSION=${kernsrcver} @@ -433,6 +459,30 @@ AC_DEFUN([ZFS_AC_KERNEL], [ AC_SUBST(LINUX_VERSION) ]) +AC_DEFUN([ZFS_AC_KERNEL_VERSION_WARNING], [ + AS_IF([test "x$enable_linux_experimental" = "xyes" && \ + test "x$kern_max_version_ok" != "xyes"], [ + AC_MSG_WARN([ + + You are building OpenZFS against Linux version $kernsrcver. + + This combination is considered EXPERIMENTAL by the OpenZFS project. + Even if it appears to build and run correctly, there may be bugs that + can cause SERIOUS DATA LOSS. + + YOU HAVE BEEN WARNED! + + If you choose to continue, we'd appreciate if you could report your + results on the OpenZFS issue tracker at: + + https://github.com/openzfs/zfs/issues/new + + Your feedback will help us prepare a new OpenZFS release that supports + this version of Linux. + ]) + ]) +]) + dnl # dnl # Detect the QAT module to be built against, QAT provides hardware dnl # acceleration for data compression: |