From: Mr NeilBrown Date: Fri, 23 Oct 2020 04:07:36 +0000 (+1100) Subject: LU-13783 build: Fix LB_LINUX_VERSION rule for v5.8 X-Git-Tag: 2.13.57~46 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F71%2F40371%2F3;p=fs%2Flustre-release.git 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 --- 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