From ec41a96daaa6e401bc0d4ba71d9cf37a1d79fc86 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Sat, 1 Jul 2023 12:21:13 -0700 Subject: [PATCH] sys: Switch the kernel's C standard from C99 to GNU99. This matches the default used in userland, and the kernel already depends on various GNU extensions to standard C that are supported by both clang and GCC. This should be a no-op for clang, but for GCC it enables some GNU extensions that aren't otherwise enabled. It also enables GCC for i386 to avoid the need for a floatundidf intrinsic in libkern. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D40646 --- sys/conf/kern.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 9e977a6e4a01..51bbfcbaa617 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -278,7 +278,7 @@ PHONY_NOTMAIN = afterdepend afterinstall all beforedepend beforeinstall \ .PHONY: ${PHONY_NOTMAIN} .NOTMAIN: ${PHONY_NOTMAIN} -CSTD= c99 +CSTD= gnu99 .if ${CSTD} == "k&r" CFLAGS+= -traditional