Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Apr 2003 12:43:57 +0300
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        Marcel Moolenaar <marcel@xcllnt.net>
Cc:        Bruce Evans <bde@zeta.org.au>
Subject:   Re: cvs commit: src/libexec/talkd announce.c extern.h print.c table.c talkd.c
Message-ID:  <20030403094357.GA43282@sunbay.com>
In-Reply-To: <20030403093800.GA68012@dhcp01.pn.xcllnt.net>
References:  <200304030513.h335DR60079544@repoman.freebsd.org> <20030402231638.A81523@FreeBSD.org> <20030403055049.GA67232@dhcp01.pn.xcllnt.net> <20030403180026.A29934@gamplex.bde.org> <20030403085350.GA37174@sunbay.com> <20030403093800.GA68012@dhcp01.pn.xcllnt.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--cWoXeonUoKmBZSoM
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Apr 03, 2003 at 01:38:00AM -0800, Marcel Moolenaar wrote:
> On Thu, Apr 03, 2003 at 11:53:50AM +0300, Ruslan Ermilov wrote:
> > >=20
> > How's this bugfix?
> >=20
> > %%%
> > Index: bsd.sys.mk
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > RCS file: /home/ncvs/src/share/mk/bsd.sys.mk,v
> > retrieving revision 1.12
> > diff -u -r1.12 bsd.sys.mk
> > --- bsd.sys.mk	31 Mar 2003 13:10:51 -0000	1.12
> > +++ bsd.sys.mk	3 Apr 2003 08:48:40 -0000
> > @@ -25,7 +25,7 @@
> >  .  if ${WARNS} > 3
> >  CFLAGS		+=3D	-Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshad=
ow -Wcast-align
> >  .  endif
> > -.  if ${WARNS} > 4
> > +.  if ${WARNS} > 4 && !empty(CFLAGS:M-O*) && empty(CFLAGS:M-O0)
> >  CFLAGS		+=3D	-Wuninitialized
> >  .  endif
> >  # BDECFLAGS
> > %%%
>=20
> Should work in most cases, but beware DEBUG_FLAGS. The above does not
> catch the case where DEBUG_FLAGS is defined to something like "-O0 -g".
> I think this is a reasonable use of DEBUG_FLAGS.
>=20
> \begin{log}
> dhcp01% setenv DEBUG_FLAGS "-O0 -g"
> dhcp01% setenv CFLAGS -O
> dhcp01% make
> cc -O -mcpu=3Dpentiumpro -I/usr/local/src/fpi/cpu/..  -O0 -g -Wsystem-hea=
ders -Werror -Wall -Wno-format-y2k -W -Wstrict-prototypes -Wmissing-prototy=
pes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wsh=
adow -Wcast-align -Wuninitialized  -c decode.c
> cc1: warnings being treated as errors
> cc1: warning: -Wuninitialized is not supported without -O
> *** Error code 1
> \end{log}=20
>=20
I doubt you have really tried my patch.  DEBUG_FLAGS becomes
part of CFLAGS in bsd.{prog,lib}.mk, and bsd.sys.mk is only
parsed after, so it covers this case too:

# make devfs.o
cc -O -pipe -march=3Dpentiumpro   -Wsystem-headers -Werror -Wall -Wno-forma=
t-y2k -
W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -W=
cast-
qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wuninitialized  -c dev=
fs.c
# make DEBUG_FLAGS=3D-O0 devfs.o
cc -O -pipe -march=3Dpentiumpro  -O0 -Wsystem-headers -Werror -Wall -Wno-fo=
rmat-y2
k -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type=
 -Wca
st-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align  -c devfs.c


Cheers,
--=20
Ruslan Ermilov		Sysadmin and DBA,
ru@sunbay.com		Sunbay Software AG,
ru@FreeBSD.org		FreeBSD committer,
+380.652.512.251	Simferopol, Ukraine

http://www.FreeBSD.org	The Power To Serve
http://www.oracle.com	Enabling The Information Age

--cWoXeonUoKmBZSoM
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE+jAJdUkv4P6juNwoRAq+QAJ41SAwaEX/wZeaOYgmPI9V2mJ+iPgCdFhLo
ep9yez0OxJLvxrcLQeGk+Ig=
=gv6O
-----END PGP SIGNATURE-----

--cWoXeonUoKmBZSoM--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030403094357.GA43282>