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/17/2003 03:45:04
On Fri, May 16, 2003 at 10:45:39PM -0400, leam wrote:
> Andrey Petrov wrote:
> >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
>
> What makes the GCC32_KERNEL defined? Is there a test for gcc v3.2 an a
> kernel compile? Or is it a command line option with make?
GCC32DIR is a path to compiler directory and GCC32_KERNEL should be set
either in mk.conf or in your environment, and another place to look at
is sys/conf/Makefile.kern.inc which controls kernel build process.
Andrey