Enable c99 mode by default.
This has the side effect of complaining for missing prototypes implicit type declarations and missing return statements. NB: I've only ran a build on amd64, so other platforms MI code might break. If you can't wait for me to fix them, revert this commit.
This commit is contained in:
parent
2bf6f45a6d
commit
6bbebf8328
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: bsd.kmodule.mk,v 1.28 2011/04/17 09:47:40 mrg Exp $
|
||||
# $NetBSD: bsd.kmodule.mk,v 1.29 2011/05/17 01:12:34 christos Exp $
|
||||
|
||||
# We are not building this with PIE
|
||||
MKPIE=no
|
||||
|
@ -17,7 +17,6 @@ CFLAGS+= -ffreestanding ${COPTS}
|
|||
CPPFLAGS+= -nostdinc -I. -I${.CURDIR} -isystem $S -isystem $S/arch
|
||||
CPPFLAGS+= -isystem ${S}/../common/include
|
||||
CPPFLAGS+= -D_KERNEL -D_LKM -D_MODULE
|
||||
CPPFLAGS+= -std=gnu99
|
||||
|
||||
# XXX until the kernel is fixed again...
|
||||
.if (defined(HAVE_GCC) && ${HAVE_GCC} == 4) || defined(HAVE_PCC)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: bsd.sys.mk,v 1.193 2010/12/25 18:56:45 joerg Exp $
|
||||
# $NetBSD: bsd.sys.mk,v 1.194 2011/05/17 01:12:34 christos Exp $
|
||||
#
|
||||
# Build definitions used for NetBSD source tree builds.
|
||||
|
||||
|
@ -10,6 +10,13 @@ CPPFLAGS+= -Wp,-iremap,${NETBSDSRCDIR}:/usr/src
|
|||
CPPFLAGS+= -Wp,-iremap,${DESTDIR}/:/
|
||||
.endif
|
||||
|
||||
# Enable c99 mode by default.
|
||||
# This has the side effect of complaining for missing prototypes
|
||||
# implicit type declarations and missing return statements.
|
||||
.if defined(HAVE_GCC) && ${HAVE_GCC} >= 3
|
||||
CFLAGS+= -std=gnu99
|
||||
.endif
|
||||
|
||||
.if defined(WARNS)
|
||||
.if ${WARNS} > 0
|
||||
CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
|
||||
|
@ -47,7 +54,6 @@ CXXFLAGS+= -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder \
|
|||
.endif
|
||||
.if ${WARNS} > 3 && defined(HAVE_GCC) && ${HAVE_GCC} >= 3
|
||||
CFLAGS+= -Wsign-compare
|
||||
CFLAGS+= -std=gnu99
|
||||
.endif
|
||||
.endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue