Module Name:    src
Committed By:   jdolecek
Date:           Wed Jul 22 19:37:59 UTC 2020

Modified Files:
        src/sys/conf: Makefile.kern.inc

Log Message:
enable -Walloca, warn if something uses alloca()


To generate a diff of this commit:
cvs rdiff -u -r1.274 -r1.275 src/sys/conf/Makefile.kern.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/conf/Makefile.kern.inc
diff -u src/sys/conf/Makefile.kern.inc:1.274 src/sys/conf/Makefile.kern.inc:1.275
--- src/sys/conf/Makefile.kern.inc:1.274	Thu Jun 25 14:52:26 2020
+++ src/sys/conf/Makefile.kern.inc	Wed Jul 22 19:37:59 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.kern.inc,v 1.274 2020/06/25 14:52:26 jdolecek Exp $
+#	$NetBSD: Makefile.kern.inc,v 1.275 2020/07/22 19:37:59 jdolecek Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -104,12 +104,14 @@ CFLAGS+=	-ffreestanding -fno-zero-initia
 CFLAGS+=	${${ACTIVE_CC} == "gcc":? -fno-delete-null-pointer-checks :}
 CFLAGS+=	${DEBUG} ${COPTS}
 AFLAGS+=	-D_LOCORE -Wa,--fatal-warnings
+
 # example usage to find largest stack users in kernel compile directory:
 #    find . -name \*.su | xargs awk '{ printf "%6d %s\n", $2, $1 }' | sort -n
 .if ${MACHINE} != "vax"
 # GCC/vax 8.4 does not support -fstack-usage.
 CFLAGS+=	${${ACTIVE_CC} == "gcc":? -fstack-usage -Wstack-usage=3584 :}
 .endif
+CWARNFLAGS+=	-Walloca
 
 # XXX
 .if defined(HAVE_GCC) || defined(HAVE_LLVM)

Reply via email to