From e0ed96fa43e1d34751ef8a750a7816852b1d09b3 Mon Sep 17 00:00:00 2001 From: Kamil Domanski Date: Sat, 12 Dec 2015 13:35:49 +0100 Subject: [PATCH] Skip GPL-only symbols test when cross-compiling MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Kamil Domański Signed-off-by: Brian Behlendorf Closes zfsonlinux/spl#507 Closes zfsonlinux/zfs#4075 --- config/spl-build.m4 | 19 +++++++++++-------- 1 file 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]) - ], [ ]) ]) -- 2.40.0