LEX_YY_CFLAGS := -Wno-implicit-fallthrough
endif
+ifdef CONFIG_HAVE_NO_STRINGOP
+YTAB_YY_CFLAGS := -Wno-stringop-truncation
+endif
+
lex.yy.o: lex.yy.c y.tab.h
$(QUIET_CC)$(CC) -o $@ $(CFLAGS) $(CPPFLAGS) $(LEX_YY_CFLAGS) -c $<
y.tab.o: y.tab.c y.tab.h
- $(QUIET_CC)$(CC) -o $@ $(CFLAGS) $(CPPFLAGS) -c $<
+ $(QUIET_CC)$(CC) -o $@ $(CFLAGS) $(CPPFLAGS) $(YTAB_YY_CFLAGS) -c $<
y.tab.c: exp/expression-parser.y
$(QUIET_YACC)$(YACC) -o $@ -l -d -b y $<
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
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