Makefile: add -Wno-stringop-truncation for y.tab.o
[fio.git] / configure
index 6d8e3a8712558ae8c4ecbacb974788457125cf78..a17d1cda1091e0419fbd0e2bec757604d2ae5929 100755 (executable)
--- a/configure
+++ b/configure
@@ -2826,6 +2826,22 @@ if compile_prog "-Wimplicit-fallthrough=2" "" "-Wimplicit-fallthrough=2"; then
 fi
 print_config "-Wimplicit-fallthrough=2" "$fallthrough"
 
+##########################################
+# check if the compiler has -Wno-stringop-concatenation
+no_stringop="no"
+cat > $TMPC << EOF
+#include <stdio.h>
+
+int main(int argc, char **argv)
+{
+       return printf("%s\n", argv[0]);
+}
+EOF
+if compile_prog "-Wno-stringop-truncation -Werror" "" "no_stringop"; then
+  no_stringop="yes"
+fi
+print_config "-Wno-stringop-truncation" "$no_stringop"
+
 ##########################################
 # check for MADV_HUGEPAGE support
 if test "$thp" != "yes" ; then
@@ -3271,6 +3287,9 @@ fi
 if test "$fallthrough" = "yes"; then
   CFLAGS="$CFLAGS -Wimplicit-fallthrough"
 fi
+if test "$no_stringop" = "yes"; then
+  output_sym "CONFIG_HAVE_NO_STRINGOP"
+fi
 if test "$thp" = "yes" ; then
   output_sym "CONFIG_HAVE_THP"
 fi