Subject: Re: Optimisation flags
To: None <>
From: Michael Brandt <>
List: current-users
Date: 06/27/1997 00:55:09

> Is there any reason that the optimisation level for the C compiler
> is set to -O instead of -O2?  I've had a quick look back through the
> mailing list archives, but couldn't find any discussion about this.  I
> have vague memories of some problems with the 68k machines, but that's
> about it...

I currently compile the kernel as well as the rest of the distribution
here at home with -O2 and an also home-compiled gcc I'm
currently not sure wether the official NetBSD-current gcc is already
at too; mine was 2.7.2. I wouldn't recommend using 2.7.2 with
-O2 because it contains some well known errors in the optimizer --- at
least for the 68k which I use.

So if you want to use maximum optimization do the following: Get the
gcc sources and compile them using the installed gcc 2.7.2
just as described in the installation instructions. You don't need to
supply any parameters to the `configure' script, it should
automagically recognize your system (in my case m68k-atari-netbsd1.2E)
and compile out of the box. With the new stage1 compiler you can then
create a usable gcc with -O2 by bootstrapping.