Subject: Re: Turning off optimization on selected files.
To: None <>
From: Simon J. Gerraty <>
List: tech-kern
Date: 06/10/2000 00:44:52
> >>If I know that a small set of MI source files will break the compiler if
> >>compiled with optimization on, is there some easy way to turn it off in,
> >>say, sys/${ARCH}/conf/Makefile.${ARCH}?
> >Yes.  That's one of the reasons I added ODE's :U modifier.

Actually that 1st diff is a bit half hearted.  One should also allow
CFLAGS to be completely specified for a target.  Though I think being
able to set just a subset (eg the optimizer flags) is also worth

Again, variable names probably suck... anyone violetly object to:
I used _CFLAGS_ as just a more readable? form of

one could do the same trick with CPPFLAGS etc, too if need be.


RCS file: /cvsroot/sharesrc/share/mk/,v
retrieving revision 1.57
diff -u -p -r1.57
---	2000/05/02 03:44:36	1.57
+++	2000/06/09 14:37:08
@@ -27,21 +27,22 @@ CC?=		cc
     ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" || \
     ${MACHINE_ARCH} == "sparc" || \
     ${MACHINE_ARCH} == "vax"
-DBG?=	-O2
+COPT?=	-O2
-DBG?=	-O
+COPT?=	-O
 CXX?=		c++
 OBJC?=		${CC}