Module Name: src
Committed By: christos
Date: Tue Feb 13 16:15:59 UTC 2024
Modified Files:
src/share/mk: bsd.sys.mk
Log Message:
Allow overriding the language standard to something newer.
To generate a diff of this commit:
cvs rdiff -u -r1.315 -r1.316 src/share/mk/bsd.sys.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/share/mk/bsd.sys.mk
diff -u src/share/mk/bsd.sys.mk:1.315 src/share/mk/bsd.sys.mk:1.316
--- src/share/mk/bsd.sys.mk:1.315 Mon Nov 6 17:35:48 2023
+++ src/share/mk/bsd.sys.mk Tue Feb 13 11:15:59 2024
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.sys.mk,v 1.315 2023/11/06 22:35:48 christos Exp $
+# $NetBSD: bsd.sys.mk,v 1.316 2024/02/13 16:15:59 christos Exp $
#
# Build definitions used for NetBSD source tree builds.
@@ -57,7 +57,7 @@ CXXFLAGS+= ${REPROFLAGS}
# NetBSD sources use C99 style, with some GCC extensions.
# Coverity does not like -std=gnu99
-.if !defined(COVERITY_TOP_CONFIG)
+.if !defined(COVERITY_TOP_CONFIG) && empty(CFLAGS:M*-std=*)
CFLAGS+= ${${ACTIVE_CC} == "clang":? -std=gnu99 :}
CFLAGS+= ${${ACTIVE_CC} == "gcc":? -std=gnu99 :}
CFLAGS+= ${${ACTIVE_CC} == "pcc":? -std=gnu99 :}