From 65d65b7a8d2a5bc038647640726e6979bcf3c21a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Doma=C5=84ski?= Date: Wed, 16 Dec 2015 17:24:28 +0100 Subject: [PATCH] Skip GPL-only symbols test when cross-compiling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kamil DomaƄski Signed-off-by: Brian Behlendorf Closes #4107 --- config/kernel.m4 | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/config/kernel.m4 b/config/kernel.m4 index 0a65f39ef2..c655a9a1dd 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -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_DEBUG_LOCK_ALLOC