]> granicus.if.org Git - zfs/commitdiff
Skip GPL-only symbols test when cross-compiling
authorKamil Domański <kamil@domanski.co>
Wed, 16 Dec 2015 16:24:28 +0000 (17:24 +0100)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 18 Dec 2015 21:46:23 +0000 (13:46 -0800)
Signed-off-by: Kamil Domański <kamil@domanski.co>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #4107

config/kernel.m4

index 906d39d59d067179753d1cf46e08d83f94cfa6e2..31ba79f04a772fd8d349b16a46f23c3e927e4d19 100644 (file)
@@ -448,16 +448,18 @@ dnl # detected at configure time and cause a build failure.  Otherwise
 dnl # modules may be successfully built that behave incorrectly.
 dnl #
 AC_DEFUN([ZFS_AC_KERNEL_CONFIG], [
-       AC_RUN_IFELSE([
-               AC_LANG_PROGRAM([
-                       #include "$LINUX/include/linux/license.h"
+       AS_IF([test "x$cross_compiling" != xyes], [
+               AC_RUN_IFELSE([
+                       AC_LANG_PROGRAM([
+                               #include "$LINUX/include/linux/license.h"
+                       ], [
+                               return !license_is_gpl_compatible("$ZFS_META_LICENSE");
+                       ])
+               ], [
+                       AC_DEFINE([ZFS_IS_GPL_COMPATIBLE], [1],
+                           [Define to 1 if GPL-only symbols can be used])
                ], [
-                       return !license_is_gpl_compatible("$ZFS_META_LICENSE");
                ])
-       ], [
-               AC_DEFINE([ZFS_IS_GPL_COMPATIBLE], [1],
-                   [Define to 1 if GPL-only symbols can be used])
-       ], [
        ])
 
        ZFS_AC_KERNEL_CONFIG_THREAD_SIZE