Whamcloud - gitweb
b=17671
authorbrian <brian>
Mon, 4 May 2009 21:30:57 +0000 (21:30 +0000)
committerbrian <brian>
Mon, 4 May 2009 21:30:57 +0000 (21:30 +0000)
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).

lnet/autoconf/lustre-lnet.m4

index 2ba0af8..9364f43 100644 (file)
@@ -546,7 +546,8 @@ else
                O2IBCPPFLAGS="-I$O2IBPATH/include"
                EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
                EXTRA_KCFLAGS="$EXTRA_KCFLAGS $O2IBCPPFLAGS"
-               EXTRA_LNET_INCLUDE="$O2IBCPPFLAGS $EXTRA_LNET_INCLUDE"
+               EXTRA_LNET_INCLUDE="$EXTRA_LNET_INCLUDE $O2IBCPPFLAGS"
+
                LB_LINUX_TRY_COMPILE([
                        #include <linux/version.h>
                        #include <linux/pci.h>
@@ -594,13 +595,19 @@ else
                        if test -n $O2IB_SYMVER ; then
                                AC_MSG_NOTICE([adding $O2IBPATH/Module.symvers to $PWD/$SYMVERFILE])
                                # strip out the existing symbols versions first
-                               egrep -v $(echo $(awk '{ print $2 }' $O2IBPATH/$O2IB_SYMVER) | tr ' ' '|') $PWD/$SYMVERFILE > $PWD/$SYMVERFILE.old
+                               if test -f $PWD/$SYMVERFILE; then
+                                   egrep -v $(echo $(awk '{ print $2 }' $O2IBPATH/$O2IB_SYMVER) | tr ' ' '|') $PWD/$SYMVERFILE > $PWD/$SYMVERFILE.old
+                               else
+                                   touch $PWD/$SYMVERFILE.old
+                               fi
                                cat $PWD/$SYMVERFILE.old $O2IBPATH/$O2IB_SYMVER > $PWD/$SYMVERFILE
+                               rm $PWD/$SYMVERFILE.old
                        else
                                AC_MSG_ERROR([an external source tree was specified for o2iblnd however I could not find a $O2IBPATH/Module.symvers there])
                        fi
                fi
 
+               AC_MSG_CHECKING([for ib_dma_map_single support])
                LB_LINUX_TRY_COMPILE([
                        #include <linux/version.h>
                        #include <linux/pci.h>
@@ -619,6 +626,7 @@ else
                        AC_MSG_RESULT(no)
                ])
 
+               AC_MSG_CHECKING([for OFED completion vector])
                LB_LINUX_TRY_COMPILE([
                        #include <linux/version.h>
                        #include <linux/pci.h>