X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=config%2Flustre-build.m4;h=189f735121fbd25ee7eb4837b651a8dcdb7febe6;hp=b41ce46dc22741ea5dc4953f5c587bcf7d211622;hb=4b67e5a8150309f4bbeb43a9095f12243be6dcfa;hpb=ccafcc7116411c7d276c5b8523b0effb4c4dd796 diff --git a/config/lustre-build.m4 b/config/lustre-build.m4 index b41ce46..189f735 100644 --- a/config/lustre-build.m4 +++ b/config/lustre-build.m4 @@ -340,6 +340,28 @@ AC_SUBST(EXTRA_KCFLAGS) ]) # LB_PROG_CC # +# Check if gcc supports -Wno-format-truncation +# +# To supress many warnings with gcc7 +# +AC_DEFUN([LB_CC_NO_FORMAT_TRUNCATION], [ + AC_MSG_CHECKING([for -Wno-format-truncation support]) + + saved_flags="$CFLAGS" + CFLAGS="$CFLAGS -Wno-format-truncation" + + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [ + EXTRA_KCFLAGS="$EXTRA_KCFLAGS -Wno-format-truncation" + AC_SUBST(EXTRA_KCFLAGS) + AC_MSG_RESULT([yes]) + ], [ + AC_MSG_RESULT([no]) + ]) + + CFLAGS="$saved_flags" +]) + +# # LB_CONDITIONALS # # AM_CONDITIONAL instances for everything @@ -357,6 +379,7 @@ AM_CONDITIONAL([USES_DPKG], [test x$uses_dpkg = xyes]) 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([UBUNTU], [test x$UBUNTU_KERNEL = xyes]) # Sanity check for PCLMULQDQ instruction availability # PCLMULQDQ instruction is a new instruction available beginning with @@ -438,8 +461,12 @@ AS_IF([test x$enable_ldiskfs = xno -a x$enable_zfs = xno], [ AC_MSG_CHECKING([whether to build Lustre server support]) AC_MSG_RESULT([$enable_server]) -AS_IF([test x$enable_server = xyes], - [AC_DEFINE(HAVE_SERVER_SUPPORT, 1, [support server])]) +AS_IF([test x$enable_server = xyes], [ + AC_DEFINE(HAVE_SERVER_SUPPORT, 1, [support server]) + AC_SUBST(ENABLE_SERVER, yes) +], [ + AC_SUBST(ENABLE_SERVER, no) +]) ]) # LB_CONFIG_SERVERS # @@ -472,7 +499,6 @@ for arg; do --enable-tests | --disable-tests ) ;; --enable-utils | --disable-utils ) ;; --enable-iokit | --disable-iokit ) ;; - --enable-dlc | --disable-dlc ) ;; --enable-manpages | --disable-manpages ) ;; * ) CONFIGURE_ARGS="$CONFIGURE_ARGS '$arg'" ;; esac @@ -547,6 +573,7 @@ LB_INCLUDE_RULES LB_PATH_DEFAULTS LB_PROG_CC +LB_CC_NO_FORMAT_TRUNCATION LC_OSD_ADDON