Skip to content

Commit

Permalink
Skip GPL-only symbols test when cross-compiling
Browse files Browse the repository at this point in the history
Signed-off-by: Kamil Domański <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs/spl#507
Closes openzfs#4075
  • Loading branch information
kdomanski authored and behlendorf committed Dec 14, 2015
1 parent cb877e0 commit e0ed96f
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions config/spl-build.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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])
], [
])
])

Expand Down

0 comments on commit e0ed96f

Please sign in to comment.