*BSD News Article 78386


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!cancer.vividnet.com!hunter.premier.net!www.nntp.primenet.com!nntp.primenet.com!howland.erols.net!EU.net!usenet2.news.uk.psi.net!uknet!usenet1.news.uk.psi.net!uknet!dispatch.news.demon.net!demon!longacre.demon.co.uk
From: searle@longacre.demon.co.uk (Michael Searle)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: gcc optimizations for kernel
Date: Sun, 15 Sep 1996 16:41:48 BST
Lines: 29
Message-ID: <n0E175F6A@longacre.demon.co.uk>
References: <51d0eg$9uf@usenet4.interramp.com> <323A693E.7B4C@OntheNet.com.au> <8791ad5jed.fsf@plm.xs4all.nl>
NNTP-Posting-Host: longacre.demon.co.uk
X-NNTP-Posting-Host: longacre.demon.co.uk
X-Newsreader: Offlite 0.09 / Termite Internet for Acorn RISC OS

Peter Mutsaers <plm@xs4all.nl> wrote:

>>> On Sat, 14 Sep 1996 18:13:50 +1000, Tony Griffiths
>>> <tonyg@OntheNet.com.au> said:

TG>> The higher levels of optimisation are "probably" OK for non-device
TG>> driver code, but would almost certainly bring you undone in a driver.
TG>>  Re-arranging the order of 'bashing' device registers is generally
TG>> not a good thing.

TG>> If you feel brave enough to go through and modify the make file, then
TG>> you might get a "-O3" kernel to work but it will be a LOT of work!!!

> 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.

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

Is all the driver code compiled with the DRIVER_C options? Most of it seemed
to be, but I think all the /scsi files were compiled with the NORMAL_C flags
which may have caused the failure at -O3.

-- 
Michael Searle - searle@longacre.demon.co.uk