From 88eb44d74ffa12804ba35728d76dbae9ab3fb627 Mon Sep 17 00:00:00 2001 From: Ryan Libby Date: Fri, 29 Nov 2019 06:25:07 +0000 Subject: [PATCH] kern.mk: -Wno-error=stringop-overflow for gcc due to false positives Demote gcc's Wstringop-overflow to Wno-error due to false positives. E.g. the riscv64 build with gcc 8.3.0 has been failing with this warning since r355062 [1]. A bug has been filed with gcc [2]. The warning was first introduced in gcc 7.1 [3]. Hopefully we can avoiding suppressing the warning in future gcc versions. [1] https://ci.freebsd.org/job/FreeBSD-head-riscv64-build/16691/ [2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92718 [3] https://gcc.gnu.org/wiki/WarningHistory Reviewed by: markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D22603 --- sys/conf/kern.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 949b0b2ecacc..85c2630cb17b 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -61,6 +61,9 @@ CWARNEXTRA+= -Wno-error=misleading-indentation \ -Wno-error=shift-overflow \ -Wno-error=tautological-compare .endif +.if ${COMPILER_VERSION} >= 70100 +CWARNEXTRA+= -Wno-error=stringop-overflow +.endif .if ${COMPILER_VERSION} >= 70200 CWARNEXTRA+= -Wno-error=memset-elt-size .endif