+# 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"
+])
+
+#