Whamcloud - gitweb
LU-13783 build: Fix LB_LINUX_VERSION rule for v5.8 71/40371/3
authorMr NeilBrown <neilb@suse.de>
Fri, 23 Oct 2020 04:07:36 +0000 (15:07 +1100)
committerOleg Drokin <green@whamcloud.com>
Thu, 26 Nov 2020 09:26:34 +0000 (09:26 +0000)
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
passes "$MODULE_TARGET=$PWD/build" which has the required effect.

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I2b381d3546aaa0f365328a1319b2d4f145f33eeb
Reviewed-on: https://review.whamcloud.com/40371
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Aurelien Degremont <degremoa@amazon.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>

index 3528eda..f39b010 100644 (file)
@@ -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"], [
+       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"],
+[test "x$lb_cv_module_target" = "xM58"],
+       [makerule=""
+       lb_cv_module_target="M"],
 [test "x$lb_cv_module_target" = "xM"],