X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=config%2Flustre-build.m4;h=f196ef0945a8bc27a052446239086c8f0f68b680;hb=4cccb265c5c2148cc4d1089fa1bdaa8db606d57e;hp=7fec7bbba35283f199fd742346e132a86c58f1cf;hpb=ae5ca4d6de847a186de7ef0e1121d846a900d4c2;p=fs%2Flustre-release.git diff --git a/config/lustre-build.m4 b/config/lustre-build.m4 index 7fec7bb..f196ef0 100644 --- a/config/lustre-build.m4 +++ b/config/lustre-build.m4 @@ -362,6 +362,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 +420,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 @@ -583,6 +617,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 @@ -597,7 +633,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