summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorKamil Domanski <[email protected]>2015-12-12 13:35:49 +0100
committerBrian Behlendorf <[email protected]>2015-12-14 10:40:33 -0800
commite0ed96fa43e1d34751ef8a750a7816852b1d09b3 (patch)
tree4cd36e280aa13a38f380b86d15571cdb1441dcd4 /config
parentcb877e0ff2648085c56ab78f15740f2b64bab849 (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 zfsonlinux/spl#507 Closes zfsonlinux/zfs#4075
Diffstat (limited to 'config')
-rw-r--r--config/spl-build.m419
1 files changed, 11 insertions, 8 deletions
diff --git a/config/spl-build.m4 b/config/spl-build.m4
index daa9eb714..b9c04a95e 100644
--- a/config/spl-build.m4
+++ b/config/spl-build.m4
@@ -673,16 +673,19 @@ AC_DEFUN([SPL_AC_TEST_MODULE],
fi
])
- 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(
+ "$SPL_META_LICENSE");
+ ])
+ ], [
+ AC_DEFINE([SPL_IS_GPL_COMPATIBLE], [1],
+ [Define to 1 if GPL-only symbols can be used])
], [
- return !license_is_gpl_compatible("$SPL_META_LICENSE");
])
- ], [
- AC_DEFINE([SPL_IS_GPL_COMPATIBLE], [1],
- [Define to 1 if GPL-only symbols can be used])
- ], [
])
])