Whamcloud - gitweb
LU-16819 build: use mofed path based on target kernel
authorAke Sandgren <ake.sandgren@hpc2n.umu.se>
Wed, 15 May 2024 05:14:36 +0000 (22:14 -0700)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 30 May 2024 00:37:32 +0000 (00:37 +0000)
Instead of using "uname -r", which limits builds to the currently
running kernel, use the target kernel which is available in
LINUXRELEASE, if the directory is available.
Building for a specific kernel is common practice when using DKMS.

Lustre-change: https://review.whamcloud.com/50937
Lustre-commit: 0e9708016b9948676484d290326c1fe8a269eb80

Test-Parameters: trivial
Signed-off-by: Ake Sandgren <ake.sandgren@hpc2n.umu.se>
Change-Id: Ifce912061a74fc5b7435cd940105190f0c3cd544
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/55118
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lnet/autoconf/lustre-lnet.m4

index c1e3c90..417fb7b 100644 (file)
@@ -103,8 +103,10 @@ case $with_o2ib in
                                       egrep "${O2IBDIR}$" | head -n1)
 
                        if test -n "$O2IBDIR_PATH"; then
+                               if test -d $O2IBDIR_PATH/${LINUXRELEASE}; then
+                                       O2IBDIR_PATH=$O2IBDIR_PATH/${LINUXRELEASE}
+                               fi
                                O2IBPATHS=$(find $O2IBDIR_PATH -name rdma_cm.h |
-                                       grep -F -e "`uname -r`" -e default |
                                        sed -e 's/\/include\/rdma\/rdma_cm.h//')
                        fi