summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorKamil Domański <[email protected]>2015-12-16 17:24:28 +0100
committerBrian Behlendorf <[email protected]>2015-12-18 13:46:23 -0800
commit76d5bf196cf6e5625f884a9ebbdaf53873a5a979 (patch)
tree52290328423c87d90bdc2bc8c9d085d1c2ddd5a8 /config
parentdcb6bed1dfc7ca6221a556f19d4252272ccfda33 (diff)
Skip GPL-only symbols test when cross-compiling
Signed-off-by: Kamil Domański <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #4107
Diffstat (limited to 'config')
-rw-r--r--config/kernel.m418
1 files changed, 10 insertions, 8 deletions
diff --git a/config/kernel.m4 b/config/kernel.m4
index 906d39d59..31ba79f04 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_THREAD_SIZE