Skip to content
Snippets Groups Projects
Commit 70eca9ed authored by Brian J. Murrell's avatar Brian J. Murrell
Browse files

b=17671

i=zhen.liang
i=sheng.yang

Enable Lustre to be built with OFED 1.4.1.

This is just the glue needed for the build with OFED 1.4.1 to actually work.
OFED 1.4.1 won't actually get built with a Lustre branch until a target file
specifies:

OFED_VERSION=1.4.1-rc4

Note that OFED 1.4.1 only supports RHEL4, RHEL5 and SLES10 targets.  SLES9
users are out of luck (but have been for some time with OFED).
parent a6f21c85
No related branches found
No related tags found
No related merge requests found
...@@ -458,6 +458,72 @@ AC_DEFUN([LB_LINUX_CONFIG_BIG_STACK], ...@@ -458,6 +458,72 @@ AC_DEFUN([LB_LINUX_CONFIG_BIG_STACK],
fi fi
]) ])
#
# LB_CONFIG_OFED_BACKPORTS
#
# include any OFED backport headers in all compile commands
# NOTE: this does only include the backport paths, not the OFED headers
# adding the OFED headers is done in the lnet portion
AC_DEFUN([LB_CONFIG_OFED_BACKPORTS],
[AC_MSG_CHECKING([whether to use any OFED backport headers])
# set default
AC_ARG_WITH([o2ib],
AC_HELP_STRING([--with-o2ib=path],
[build o2iblnd against path]),
[
case $with_o2ib in
yes) O2IBPATHS="$LINUX $LINUX/drivers/infiniband"
ENABLEO2IB=2
;;
no) ENABLEO2IB=0
;;
*) O2IBPATHS=$with_o2ib
ENABLEO2IB=3
;;
esac
],[
O2IBPATHS="$LINUX $LINUX/drivers/infiniband"
ENABLEO2IB=1
])
if test $ENABLEO2IB -eq 0; then
AC_MSG_RESULT([no])
else
o2ib_found=false
for O2IBPATH in $O2IBPATHS; do
if test \( -f ${O2IBPATH}/include/rdma/rdma_cm.h -a \
-f ${O2IBPATH}/include/rdma/ib_cm.h -a \
-f ${O2IBPATH}/include/rdma/ib_verbs.h -a \
-f ${O2IBPATH}/include/rdma/ib_fmr_pool.h \); then
o2ib_found=true
break
fi
done
if ! $o2ib_found; then
AC_MSG_RESULT([no])
case $ENABLEO2IB in
1) ;;
2) AC_MSG_ERROR([kernel OpenIB gen2 headers not present]);;
3) AC_MSG_ERROR([bad --with-o2ib path]);;
*) AC_MSG_ERROR([internal error]);;
esac
else
if test -f $O2IBPATH/config.mk; then
. $O2IBPATH/config.mk
elif test -f $O2IBPATH/ofed_patch.mk; then
. $O2IBPATH/ofed_patch.mk
fi
if test -n "$BACKPORT_INCLUDES"; then
OFED_BACKPORT_PATH=`echo $BACKPORT_INCLUDES | sed "s#.*/src/ofa_kernel/#$O2IBPATH/#"`
EXTRA_LNET_INCLUDE="-I$OFED_BACKPORT_PATH $EXTRA_LNET_INCLUDE"
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
fi
fi
])
# #
# LB_PROG_LINUX # LB_PROG_LINUX
# #
...@@ -489,6 +555,10 @@ LB_LINUX_CONFIG([KMOD],[],[ ...@@ -489,6 +555,10 @@ LB_LINUX_CONFIG([KMOD],[],[
#LB_LINUX_CONFIG_BIG_STACK #LB_LINUX_CONFIG_BIG_STACK
# it's ugly to be doing anything with OFED outside of the lnet module, but
# this has to be done here so that the backports path is set before all of
# the LN_PROG_LINUX checks are done
LB_CONFIG_OFED_BACKPORTS
]) ])
# #
...@@ -503,14 +573,14 @@ AC_DEFUN([LB_LINUX_CONDITIONALS], ...@@ -503,14 +573,14 @@ AC_DEFUN([LB_LINUX_CONDITIONALS],
# #
# LB_CHECK_SYMBOL_EXPORT # LB_CHECK_SYMBOL_EXPORT
# check symbol exported or not # check symbol exported or not
# $1 - symbol # $1 - symbol
# $2 - file(s) for find. # $2 - file(s) for find.
# $3 - do 'yes' # $3 - do 'yes'
# $4 - do 'no' # $4 - do 'no'
# #
# 2.6 based kernels - put modversion info into $LINUX/Module.modvers # 2.6 based kernels - put modversion info into $LINUX/Module.modvers
# or check # or check
AC_DEFUN([LB_CHECK_SYMBOL_EXPORT], AC_DEFUN([LB_CHECK_SYMBOL_EXPORT],
[AC_MSG_CHECKING([if Linux was built with symbol $1 exported]) [AC_MSG_CHECKING([if Linux was built with symbol $1 exported])
grep -q -E '[[[:space:]]]$1[[[:space:]]]' $LINUX/$SYMVERFILE 2>/dev/null grep -q -E '[[[:space:]]]$1[[[:space:]]]' $LINUX/$SYMVERFILE 2>/dev/null
...@@ -537,3 +607,31 @@ else ...@@ -537,3 +607,31 @@ else
$3 $3
fi fi
]) ])
#
# Like AC_CHECK_HEADER but checks for a kernel-space header
#
m4_define([LB_CHECK_LINUX_HEADER],
[AS_VAR_PUSHDEF([ac_Header], [ac_cv_header_$1])dnl
AC_CACHE_CHECK([for $1], ac_Header,
[LB_LINUX_COMPILE_IFELSE([LB_LANG_PROGRAM([@%:@include <$1>])],
[modules],
[test -s build/conftest.o],
[AS_VAR_SET(ac_Header, [yes])],
[AS_VAR_SET(ac_Header, [no])])])
AS_IF([test AS_VAR_GET(ac_Header) = yes], [$2], [$3])[]dnl
AS_VAR_POPDEF([ac_Header])dnl
])
#
# Like AC_CHECK_HEADERS but for kernel space headers
#
AC_DEFUN([LB_CHECK_LINUX_HEADERS],
[AH_CHECK_HEADERS([$1])dnl
for ac_header in $1
do
LB_CHECK_LINUX_HEADER($ac_header,
[AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_$ac_header)) $2],
[$3])dnl
done
])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment