Kernels modules are c99 (gnu99) just like the kernel.

Add(move) -std=gnu99 to CPPFLAGS (from COPTS).
This commit is contained in:
matt 2011-01-02 19:24:47 +00:00
parent 6542895ee1
commit d24d5902b3
2 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.kmodule.mk,v 1.26 2010/12/11 18:42:33 martin Exp $
# $NetBSD: bsd.kmodule.mk,v 1.27 2011/01/02 19:24:47 matt Exp $
# We are not building this with PIE
MKPIE=no
@ -17,6 +17,7 @@ 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)

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.kern.inc,v 1.127 2010/03/05 23:06:49 njoly Exp $
# $NetBSD: Makefile.kern.inc,v 1.128 2011/01/02 19:24:48 matt Exp $
#
# This file contains common `MI' targets and definitions and it is included
# at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@ -57,9 +57,9 @@ S!= cd ../../../..; pwd
INCLUDES?= -I. ${EXTRA_INCLUDES} -I${S}/../common/include -I$S/arch \
-I$S -nostdinc
CPPFLAGS+= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D_KERNEL_OPT
CPPFLAGS+= -std=gnu99
DEFCOPTS?= -O2
COPTS?= ${DEFCOPTS}
COPTS+= -std=gnu99
DBG= # might contain unwanted -Ofoo
DEFWARNINGS?= yes
.if (${DEFWARNINGS} == "yes")