From 8f0f7a44341ec15412eb9463c769dabf7674da16 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Tue, 14 May 2024 22:09:13 -0700 Subject: [PATCH] LU-16819 build: use mofed path based on target kernel 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 Change-Id: Ifce912061a74fc5b7435cd940105190f0c3cd544 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55117 Reviewed-by: Oleg Drokin Tested-by: jenkins Tested-by: Maloo --- lnet/autoconf/lustre-lnet.m4 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lnet/autoconf/lustre-lnet.m4 b/lnet/autoconf/lustre-lnet.m4 index f1dce43..e8fb1aa 100644 --- a/lnet/autoconf/lustre-lnet.m4 +++ b/lnet/autoconf/lustre-lnet.m4 @@ -88,8 +88,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 | - egrep "`uname -r`|default" | sed -e 's/\/include\/rdma\/rdma_cm.h//') fi -- 1.8.3.1