*BSD News Article 27427


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!metro!news.cs.su.oz.au!harbinger.cc.monash.edu.au!msuinfo!agate!howland.reston.ans.net!vixen.cso.uiuc.edu!sdd.hp.com!apollo.hp.com!bloom-beacon.mit.edu!ai-lab!life.ai.mit.edu!mycroft
From: mycroft@duality.gnu.ai.mit.edu (Charles Hannum)
Newsgroups: comp.os.386bsd.misc
Subject: Re: Why uses /usr/src -O instead of -O2?
Date: 17 Feb 1994 23:29:04 GMT
Organization: MIT Artificial Intelligence Lab
Lines: 25
Message-ID: <MYCROFT.94Feb17182904@duality.gnu.ai.mit.edu>
References: <1994Feb16.103448.6398@paramount.nikhefk.nikhef.nl>
NNTP-Posting-Host: duality.gnu.ai.mit.edu
In-reply-to: eloy@paramount.nikhefk.nikhef.nl's message of Wed, 16 Feb 1994 10:34:48 GMT


In article <1994Feb16.103448.6398@paramount.nikhefk.nikhef.nl>
eloy@paramount.nikhefk.nikhef.nl (Eloy Domingos) writes:

   When rebuilding the 'world' I noticed that the makefiles use -O
   instead of the better optimizing -O2. Is there a reason not to use
   the better optimization?

Sometimes the `higher' levels cause bugs to appear that no one has
noticed before; in particular, there was a bug in GCC 2.4.5 that
caused the kernel to sometimes get stuck in an infinite loop in the
signal processing code which only seemed to appear with -O2 or so, and
only on some 486s.  You don't see this now because I got tired of my
Vectra crashing and fixed it.

Other than compiler bugs, there is no particular reason.  The first
thing I ever did with 386BSD was shove it down GCC 2's throat,
screaming all the way, and I've never used GCC 1 since (except for
occasional testing).  All my compiles are done with `-O6'.

--
- Charles Hannum
  NetBSD group
  Working ports: i386, hp300, amiga, sparc, mac68k, pc532.
  In progress: pmax, sun3.