Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/conf enable -Walloca, warn if something uses alloca()



details:   https://anonhg.NetBSD.org/src/rev/d04c63862935
branches:  trunk
changeset: 936250:d04c63862935
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Wed Jul 22 19:37:59 2020 +0000

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

diffstat:

 sys/conf/Makefile.kern.inc |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (24 lines):

diff -r b57138cbebe4 -r d04c63862935 sys/conf/Makefile.kern.inc
--- a/sys/conf/Makefile.kern.inc        Wed Jul 22 19:26:37 2020 +0000
+++ b/sys/conf/Makefile.kern.inc        Wed Jul 22 19:37:59 2020 +0000
@@ -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+=       ${${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)



Home | Main Index | Thread Index | Old Index