*BSD News Article 6986


Return to BSD News archive

Path: sserve!manuel.anu.edu.au!munnari.oz.au!uunet!usc!cs.utexas.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!paladin.american.edu!news.univie.ac.at!hp4at!mcsun!news.funet.fi!hydra!klaava!torvalds
From: torvalds@klaava.Helsinki.FI (Linus Torvalds)
Newsgroups: comp.unix.bsd
Subject: Re: How suitable is gcc-2.2.2 for 386bsd?
Message-ID: <1992Oct23.222805.24970@klaava.Helsinki.FI>
Date: 23 Oct 92 22:28:05 GMT
References: <colin.719809711@marsh> <1992Oct23.065308.15617@ntuix.ntu.ac.sg>
Organization: University of Helsinki
Lines: 35

In article <1992Oct23.065308.15617@ntuix.ntu.ac.sg> eoahmad@ntuix.ntu.ac.sg (Othman Ahmad) writes:
>
>I strongly advise people not to remove the original gcc-1.39.
>gcc-2.2.2 has lots of bugs.

gcc-2.2.2 does NOT have lot's of bugs - quite the reverse is true in my
opinion (I had more troubles with gcc-1.39 code generation than with
gcc-2.2.2).  You may have a few problems with C++, but so far I haven't
heard of any bad bugs in gcc-2.2.2 that would make me want to have an
older version. 

The linux community has been using the newest gcc for quite a while
(this includes actually testing out snapshots a few days after they are
released etc), and compiler-generated problems have been very few
(although there were quite a few library-related ones). 

But there *IS* at least a couple of reasons for trouble with gcc-2.2.2
under 386bsd:
 - math support.  gcc-2.2.2 generates many new 387-instructions relative
   to 1.39, and the bsd386 math-emulation may not be up to it (and I'm
   not putting it down: I wrote most of it, and I just recognize that
   it's not a piece of art.  Linux no longer uses it).  This will only
   get worse: gcc-2.3 will emit the fsin/fcos instructions directly.
 - gcc-2.x generates the 386 string instructions, and doesn't put a 'cld'
   before them, assuming that the direction flag is always cleared.  If
   the kernel doesn't clear the direction flag at an interrupt or trap,
   you'll get weird behaviour.  I don't think this is a problem for
   386bsd, but I remember having problems with it under linux when
   testing out a pre-release of gcc-2.0.  Easily fixed in any case. 

There should probably be no other major problems (although gcc-2.2.2 is
a lot bigger than 1.39, so if you are tight on memory, 1.39 is much
faster). 

		Linus