From owner-freebsd-current Sun Jan 9 21:28:36 2000 Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 1484814F40 for ; Sun, 9 Jan 2000 21:28:22 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (beefcake.zeta.org.au [203.26.10.12]) by mailman.zeta.org.au (8.8.7/8.8.7) with ESMTP id QAA27220; Mon, 10 Jan 2000 16:26:35 +1100 Date: Mon, 10 Jan 2000 16:26:32 +1100 (EST) From: Bruce Evans X-Sender: bde@alphplex.bde.org To: John Polstra Cc: current@freebsd.org Subject: Re: __sigisempty() undefined if "cc -g" used. In-Reply-To: <200001092124.NAA65356@vashon.polstra.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 9 Jan 2000, John Polstra wrote: > In article , > Bruce Evans wrote: > > > > You apparently > > clobbered -O in CFLAGS by setting CFLAGS=-g. -g normally needs to be > > added to CC to avoid breaking CFLAGS (CC='cc -g'). > > Better yet: DEBUG_FLAGS=-g Except it only supported in bsd.prog.mk and bsd.lib.mk, but not in bsd.kmod.mk, kernel Makefiles, or if no bsd .mk files are included A few verbose module makefiles add it explicitly. You can also use COPTS, but it is only supported in bsd.prog.mk, bsd.kmod.mk and kernel Makefiles. The ordering of these macros is important but very obscure. E.g., if the default options contain -g, then you may want kill -g by adding -g0 after -g. ${DEBUG_FLAGS} seems to be added last, so it works right. Not so for ${COPTS}. It is added before ${CWARNFLAGS}, so it can't be used to kill unwanted warning flags. I think COPTS and DEBUG_FLAGS should be reserved for users, but COPTS is used by 16 Makefiles in the src tree, e.g., ping/Makefile. Its use there is 100% wrong since it is used for warning flags and a non- option. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message