Subject: Re: subr_disk.c error on kernel compile
To: leam <leam@reuel.net>
From: Andrey Petrov <petrov@netbsd.org>
List: port-sparc64
Date: 05/16/2003 23:01:28
On Fri, May 16, 2003 at 06:17:45PM -0400, leam wrote:
> Andrey Petrov wrote:
> >That's not an error that's warning, which you can not avoid for
> >that code in gcc 3.2.2. You can ignore that warning removing
> >-Werror from Makefile or manually compile that file without that
> >flag, or set kernel compiler flags in /etc/mk.conf.
> >
> >	Andrey
> 
> The man page for mk.conf didn't show how to unset the -Werror flag. I 
> see it in /usr/share/mk/bsd.sys.mk, but I'm not familier with the syntax 
> of what it is saying:
> 
> CFLAGS+=     ${CWARNFLAGS} ${NOGCCERROR:D:U-Werror}
> 
> Does /etc/mk.conf get read before or after everything else? Is there a 
> way to unset -Werror?
> 

I have 

.ifdef GCC32_KERNEL
CC=             ${GCC32DIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
CPP=            ${GCC32DIR}/bin/cpp

DEFWARNINGS=no
CWARNFLAGS+=    -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith
CWARNFLAGS+=    -Wmissing-prototypes -Wstrict-prototypes
CWARNFLAGS+=    -Wno-uninitialized
.endif

in my /etc/mk.conf.

	Andrey