Whamcloud - gitweb
LU-12511 build: don't use OpenSFS UAPI headers with --disable-modules 70/38370/2
authorJames Simmons <jsimmons@infradead.org>
Sun, 26 Apr 2020 17:33:31 +0000 (13:33 -0400)
committerOleg Drokin <green@whamcloud.com>
Thu, 14 May 2020 05:38:50 +0000 (05:38 +0000)
If we configure Lustre with --disable-modules that means we want
to use the native Linux Lustre / LNet UAPI headers instead. To do
this only include OpenSFS UAPI header path when Lustre modules are
enabled.

Change-Id: Id0f4d960d51bf02a6e24d2e3ad2544df10384533
Test-Parameters: trivial
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/38370
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Nathaniel Clark <nclark@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
config/lustre-build.m4
lustre/utils/obd.c

index 947b632..4b9f9d1 100644 (file)
@@ -165,8 +165,10 @@ AS_IF([test "x$enable_modules" = xyes], [
                ], [*], [
                        # This is strange - Lustre supports a target we don't
                        AC_MSG_ERROR([Modules are not supported on $target_os])
                ], [*], [
                        # This is strange - Lustre supports a target we don't
                        AC_MSG_ERROR([Modules are not supported on $target_os])
-               ])
        ])
        ])
+       # Use OpenSFS UAPI header path instead of linux kernel
+       CPPFLAGS="-I$PWD/lnet/include/uapi -I$PWD/lustre/include/uapi $CPPFLAGS"
+])
 ]) # LB_CONFIG_MODULES
 
 #
 ]) # LB_CONFIG_MODULES
 
 #
@@ -316,8 +318,8 @@ AS_IF([test $target_cpu = powerpc64], [
        CC="$CC -m64"
 ])
 
        CC="$CC -m64"
 ])
 
-# UAPI headers, libcfs/include for util headers, lustre/include for liblustreapi and friends
-CPPFLAGS="-I$PWD/libcfs/include -I$PWD/lnet/include/uapi -I$PWD/lustre/include -I$PWD/lustre/include/uapi $CPPFLAGS"
+# libcfs/include for util headers, lnetconfig headers, lustre/include for liblustreapi and friends
+CPPFLAGS="-I$PWD/libcfs/include -I$PWD/lnet/utils -I$PWD/lustre/include $CPPFLAGS"
 
 CCASFLAGS="-Wall -fPIC -D_GNU_SOURCE"
 AC_SUBST(CCASFLAGS)
 
 CCASFLAGS="-Wall -fPIC -D_GNU_SOURCE"
 AC_SUBST(CCASFLAGS)
index c810f55..b57d904 100644 (file)
@@ -68,7 +68,9 @@
 
 #include <linux/lnet/nidstr.h>
 #include <linux/lnet/lnetctl.h>
 
 #include <linux/lnet/nidstr.h>
 #include <linux/lnet/lnetctl.h>
+#ifdef HAVE_SERVER_SUPPPORT
 #include <linux/lustre/lustre_barrier_user.h>
 #include <linux/lustre/lustre_barrier_user.h>
+#endif
 #include <linux/lustre/lustre_cfg.h>
 #include <linux/lustre/lustre_ioctl.h>
 #include <linux/lustre/lustre_ostid.h>
 #include <linux/lustre/lustre_cfg.h>
 #include <linux/lustre/lustre_ioctl.h>
 #include <linux/lustre/lustre_ostid.h>