Skip GPL-only symbols test when cross-compiling

Signed-off-by: Kamil Domański <kamil@domanski.co>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes zfsonlinux/spl#507
Closes zfsonlinux/zfs#4075
This commit is contained in:
Kamil Domanski 2015-12-12 13:35:49 +01:00 committed by Brian Behlendorf
parent cb877e0ff2
commit e0ed96fa43
1 changed files with 11 additions and 8 deletions

View File

@ -673,11 +673,13 @@ AC_DEFUN([SPL_AC_TEST_MODULE],
fi
])
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");
return !license_is_gpl_compatible(
"$SPL_META_LICENSE");
])
], [
AC_DEFINE([SPL_IS_GPL_COMPATIBLE], [1],
@ -685,6 +687,7 @@ AC_DEFUN([SPL_AC_TEST_MODULE],
], [
])
])
])
dnl #
dnl # Use the atomic implemenation based on global spinlocks. This