Subject: Re: another makefile mystery: COPTS
To: Jaromir Dolecek <dolecek@ics.muni.cz>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: tech-toolchain
Date: 01/20/2000 04:33:45
In message <200001201219.NAA13346@jdolecek.per4mance.cz>Jaromir Dolecek writes

>There is no way to say "all I build now would have -pipe in COPTS".
>Note I don't count the makeoptions COPTS+=-pipe, that is just too
>inflexible.
>

Why not: make CC=""cc -pipe". Worked for me for years.

OTOH, kernel compiles are a special environment: its a non-hosted
compile. You really shouldn't be messing with CFLAGS, unless you
absolutely know what you are doing. (look at Makefile.pmax).  But I
wrote it so that all the MD flags are in CFLAGS, so it's safe to
redefine COPTS to "-O2 -pipe". However, there have been times when
cc -O3 was known to produce non-working kernels. Futzing about
with defer-pop or -m<model> options has bitten other ports. So
COPTS should't be too easy to change.

All in all, what we have seems about right....