From 93d6fa53c9951563be3081a347cc4dc1917ad452 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Mon, 13 Sep 2021 11:00:38 -0700 Subject: [PATCH] Disable -Woverflow errors for i386 for GCC 9. GCC 9 warns about floating point constants overflowing for i386. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D26201 --- share/mk/bsd.sys.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 304d8dd7d243..14b643fe0a20 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -196,6 +196,13 @@ CWARNFLAGS+= -Wno-error=aggressive-loop-optimizations \ -Wno-error=stringop-truncation .endif +# GCC 9.2.0 +.if ${COMPILER_VERSION} >= 90200 +.if ${MACHINE_ARCH} == "i386" +CWARNFLAGS+= -Wno-error=overflow +.endif +.endif + # GCC's own arm_neon.h triggers various warnings .if ${MACHINE_CPUARCH} == "aarch64" CWARNFLAGS+= -Wno-system-headers