Subject: Re: mk.conf ignored by kernel build?
To: Martin Husemann <>
From: Curt Sampson <>
List: current-users
Date: 02/05/1999 12:13:59
On Fri, 5 Feb 1999, Martin Husemann wrote:

> Since a very long time ago I have this in my /etc/mk.conf:
> .if ! ${CFLAGS:M-pipe}
> CFLAGS += -pipe
> .endif
> My machine has loads of memory but no local disk - so this speeds
> up compiles quite a bit. When doing make in, say, /usr/src/bin/ls
> everything is fine. When compiling a kernel, no -pipe is used.

No, because /etc/mk.conf is pulled in by, but later on
in that makefile CFLAGS is set directly (with CFLAGS=), overriding
what you've done. I think you need to set COPTS instead. Make sure
you set your optimisation level, too, because the COPTS?=-O2 won't
take effect if you've already set COPTS.

Of course, another approach to solving your problem would be to
set up /tmp as an MFS on your machine, and set TMPDIR=/tmp in your.
You can mount /tmp as an MFS with the following line in your fstab:

swap            /tmp            mfs     rw,-s131072,async,nodev,nosuid  0 0

Curt Sampson  <>   604 801 5335   De gustibus, aut bene aut nihil.
The most widely ported operating system in the world: