*BSD News Article 78461


Return to BSD News archive

Newsgroups: comp.unix.bsd.freebsd.misc
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!foxhound.dsto.gov.au!fang.dsto.defence.gov.au!ns.saard.net!news.camtech.com.au!news.adelaide.on.net!news.ade.connect.com.au!news.mel.connect.com.au!news.mira.net.au!news.vbc.net!garlic.com!news.scruz.net!kithrup.com!news.Stanford.EDU!bloom-beacon.mit.edu!eru.mt.luth.se!www.nntp.primenet.com!nntp.primenet.com!cs.utexas.edu!math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!in2p3.fr!swidir.switch.ch!surfnet.nl!news.unisource
nl!xs4all!plm.xs4all.nl!plm
From: Peter Mutsaers <plm@xs4all.nl>
Subject: Re: gcc optimizations for kernel
X-Newsreader: Gnus v5.2.39/Emacs 19.34
Sender: plm@plm.xs4all.nl
Lines: 21
Organization: My Unorganized Home
Message-ID: <87wwxv57zz.fsf@plm.xs4all.nl>
References: <51d0eg$9uf@usenet4.interramp.com> <323A693E.7B4C@OntheNet.com.au>
	<8791ad5jed.fsf@plm.xs4all.nl> <n0E175F6A@longacre.demon.co.uk>
Date: Mon, 16 Sep 1996 05:44:32 GMT

>> On Sun, 15 Sep 1996 16:41:48 BST, searle@longacre.demon.co.uk
>> (Michael Searle) said:

    >> Hmm, I've been running for months with a kernel compiled with
    >> -O2, without problems. I assume that the sections of device
    >> drivers that depend on order are not reordered by gcc, or the
    >> makefiles force that -O2 not be used for such files.

    MS> Well, so had I, but I've changed the Makefile to do -O on
    MS> device drivers (there's a separate CFLAGS line). I tried to
    MS> change it to do -O3 for the rest, but the result gave me the
    MS> Black Screen of Death when starting X. (I think it was X that
    MS> did it, it was certainly after login.)

I never tried -O3. Then -O2 must be safe, but -O3 not.

I would not use -O3 anyway since programs compiled with it tend to be
somewhat bigger than compiled with -O2 (loop-unroll
optimization?). For the kernel, occupying it's memory always, I'd
rather not have that. -O and -O2 make more difference than -O2 and -O3
wrt speed, so I would suggest to use -O2.
-- 
Peter Mutsaers  |  Abcoude (Utrecht),
plm@xs4all.nl   |  the Netherlands