From 28cedfae1e318b3f4783a6f145e24441b279646c Mon Sep 17 00:00:00 2001 From: Mr NeilBrown Date: Fri, 23 Oct 2020 15:07:36 +1100 Subject: [PATCH] LU-13783 build: Fix LB_LINUX_VERSION rule for v5.8 Since Commit 20b1be595282 ("kbuild: fix single target builds for external modules") in v5.8-rc7, the LB_LINUX_VERSION autoconf rule doesn't work. I don't know exactly why, but it can be fixed by setting "makerule" to an empty string. Passing the path to the directory in $makerule is unnecessary as LB_LINUX_COMPILE_IFELSE, which LB_LINUX_TRY_MAKE eventually calls, passes "$MODULE_TARGET=$PWD/build" which has the required effect. Test-Parameters: trivial Signed-off-by: Mr NeilBrown Change-Id: I2b381d3546aaa0f365328a1319b2d4f145f33eeb Reviewed-on: https://review.whamcloud.com/40371 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Aurelien Degremont Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- config/lustre-build-linux.m4 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/config/lustre-build-linux.m4 b/config/lustre-build-linux.m4 index 3528eda..f39b010 100644 --- a/config/lustre-build-linux.m4 +++ b/config/lustre-build-linux.m4 @@ -29,14 +29,23 @@ AC_CACHE_CHECK([for external module build target], lb_cv_module_target, [$makerule LUSTRE_KERNEL_TEST=conftest.i], [test -s build/conftest.i], [lb_cv_module_target="M"], [ + MODULE_TARGET="M" + makerule="" + LB_LINUX_TRY_MAKE([], [], + [$makerule LUSTRE_KERNEL_TEST=conftest.i], + [test -s build/conftest.i], + [lb_cv_module_target="M58"], [ AC_MSG_ERROR([kernel module make failed; check config.log for details]) - ])])]) + ])])])]) ]) AS_IF([test -z "$lb_cv_module_target"], [AC_MSG_ERROR([unknown external module build target])], [test "x$lb_cv_module_target" = "xM54"], [makerule="$PWD/build" lb_cv_module_target="M"], +[test "x$lb_cv_module_target" = "xM58"], + [makerule="" + lb_cv_module_target="M"], [test "x$lb_cv_module_target" = "xM"], [makerule="_module_$PWD/build"]) MODULE_TARGET=$lb_cv_module_target -- 1.8.3.1