X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=config%2Flustre-build.m4;h=ed23616fddcc3c709698b985f92a82b4213caf66;hp=c2da79e50802f9b6cec7e670fc7084e691191bdf;hb=9a085781b34d3dbe46c61db21c2681a0d31136de;hpb=a170a5787df625caec0cdac637a8dedd2e18bbd8 diff --git a/config/lustre-build.m4 b/config/lustre-build.m4 index c2da79e..ed23616 100644 --- a/config/lustre-build.m4 +++ b/config/lustre-build.m4 @@ -103,19 +103,6 @@ AC_SUBST(LUSTREIOKIT_SUBDIR) AM_CONDITIONAL([BUILD_LUSTREIOKIT], [test "x$enable_iokit" = xyes]) ]) # LB_PATH_LUSTREIOKIT -# Define no libcfs by default. -AC_DEFUN([LB_LIBCFS_DIR], [ -AS_IF([test "x$libcfs_is_module" = xyes], [ - LIBCFS_INCLUDE_DIR="libcfs/include" - LIBCFS_SUBDIR="libcfs" - ], [ - LIBCFS_INCLUDE_DIR="lnet/include" - LIBCFS_SUBDIR="" - ]) -AC_SUBST(LIBCFS_INCLUDE_DIR) -AC_SUBST(LIBCFS_SUBDIR) -]) # LB_LIBCFS_DIR - # # LB_LIBMOUNT # @@ -329,13 +316,14 @@ AS_IF([test $target_cpu = powerpc64], [ CC="$CC -m64" ]) -CPPFLAGS="-I$PWD/$LIBCFS_INCLUDE_DIR -I$PWD/lnet/include -I$PWD/lnet/include/uapi -I$PWD/lustre/include -I$PWD/lustre/include/uapi $CPPFLAGS" +# 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" CCASFLAGS="-Wall -fPIC -D_GNU_SOURCE" AC_SUBST(CCASFLAGS) -# everyone builds against lnet and lustre -EXTRA_KCFLAGS="$EXTRA_KCFLAGS -g -I$PWD/$LIBCFS_INCLUDE_DIR -I$PWD/lnet/include -I$PWD/lustre/include" +# everyone builds against lnet and lustre kernel headers +EXTRA_KCFLAGS="$EXTRA_KCFLAGS -g -I$PWD/libcfs/include -I$PWD/libcfs/include/libcfs -I$PWD/lnet/include/uapi -I$PWD/lnet/include -I$PWD/lustre/include/uapi -I$PWD/lustre/include" AC_SUBST(EXTRA_KCFLAGS) ]) # LB_PROG_CC @@ -362,6 +350,50 @@ AC_DEFUN([LB_CC_NO_FORMAT_TRUNCATION], [ ]) # +# Check if gcc supports -Wno-stringop-truncation +# +# To supress many warnings with gcc8 +# +AC_DEFUN([LB_CC_NO_STRINGOP_TRUNCATION], [ + AC_MSG_CHECKING([for -Wno-stringop-truncation support]) + + saved_flags="$CFLAGS" + CFLAGS="$CFLAGS -Wno-stringop-truncation" + + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [ + EXTRA_KCFLAGS="$EXTRA_KCFLAGS -Wno-stringop-truncation" + AC_SUBST(EXTRA_KCFLAGS) + AC_MSG_RESULT([yes]) + ], [ + AC_MSG_RESULT([no]) + ]) + + CFLAGS="$saved_flags" +]) + +# +# Check if gcc supports -Wno-stringop-overflow +# +# To supress many warnings with gcc8 +# +AC_DEFUN([LB_CC_NO_STRINGOP_OVERFLOW], [ + AC_MSG_CHECKING([for -Wno-stringop-overflow support]) + + saved_flags="$CFLAGS" + CFLAGS="$CFLAGS -Wno-stringop-overflow" + + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [ + EXTRA_KCFLAGS="$EXTRA_KCFLAGS -Wno-stringop-overflow" + AC_SUBST(EXTRA_KCFLAGS) + AC_MSG_RESULT([yes]) + ], [ + AC_MSG_RESULT([no]) + ]) + + CFLAGS="$saved_flags" +]) + +# # LB_CONDITIONALS # # AM_CONDITIONAL instances for everything @@ -376,20 +408,10 @@ AM_CONDITIONAL([DOC], [test x$ENABLE_DOC = x1]) AM_CONDITIONAL([MANPAGES], [test x$enable_manpages = xyes]) AM_CONDITIONAL([LINUX], [test x$lb_target_os = xlinux]) AM_CONDITIONAL([USE_QUILT], [test x$use_quilt = xyes]) -AM_CONDITIONAL([RHEL], [test x$RHEL_KERNEL = xyes]) -AM_CONDITIONAL([SUSE], [test x$SUSE_KERNEL = xyes]) +AM_CONDITIONAL([RHEL], [test -f /etc/redhat-release]) +AM_CONDITIONAL([SUSE], [test -f /etc/SUSE-brand -o -f /etc/SuSE-release]) AM_CONDITIONAL([UBUNTU], [test x$UBUNTU_KERNEL = xyes]) -# Sanity check for PCLMULQDQ instruction availability -# PCLMULQDQ instruction is a new instruction available beginning with -# the all new Core processor family based on the 32nm microarchitecture -# codename Westmere. So, $target_cpu = x86_64 should have this instruction -# except MIC microarchitecture (k1om). -AM_CONDITIONAL(HAVE_PCLMULQDQ, test x$target_cpu = "xx86_64" -a x$target_vendor != "xk1om") -AS_IF([test x$target_cpu = "xx86_64" -a x$target_vendor != "xk1om"], - [AC_DEFINE(HAVE_PCLMULQDQ, 1, [have PCLMULQDQ instruction])]) - -LIBCFS_CONDITIONALS LN_CONDITIONALS LC_CONDITIONALS ]) # LB_CONDITIONALS @@ -554,6 +576,9 @@ fi if test x$enable_static != xyes ; then RPMBINARGS="$RPMBINARGS --without static" fi +if test x$enable_mpitests != xyes ; then + RPMBINARGS="$RPMBINARGS --without mpi" +fi RPMBUILD_BINARY_ARGS=$RPMBINARGS @@ -573,8 +598,7 @@ LB_CANONICAL_SYSTEM LB_CONFIG_DIST LB_DOWNSTREAM_RELEASE - -LB_LIBCFS_DIR +LB_USES_DPKG LB_INCLUDE_RULES @@ -582,6 +606,8 @@ LB_PATH_DEFAULTS LB_PROG_CC LB_CC_NO_FORMAT_TRUNCATION +LB_CC_NO_STRINGOP_TRUNCATION +LB_CC_NO_STRINGOP_OVERFLOW LC_OSD_ADDON @@ -596,7 +622,6 @@ LB_CONFIG_SERVERS # Tests depends from utils (multiop from liblustreapi) AS_IF([test "x$enable_utils" = xno], [enable_tests="no"]) -m4_ifdef([LC_NODEMAP_PROC_DEBUG], [LC_NODEMAP_PROC_DEBUG]) LIBCFS_CONFIG_CDEBUG LC_QUOTA