*BSD News Article 7154


Return to BSD News archive

Newsgroups: comp.unix.bsd
Path: sserve!manuel.anu.edu.au!munnari.oz.au!sgiblab!darwin.sura.net!jvnc.net!nuscc!ntuix!eoahmad
From: eoahmad@ntuix.ntu.ac.sg (Othman Ahmad)
Subject: Re: How suitable is gcc-2.2.2 for 386bsd?
Message-ID: <1992Oct28.135008.29265@ntuix.ntu.ac.sg>
Organization: Nanyang Technological University - Singapore
X-Newsreader: TIN [version 1.1 PL6]
References: <1992Oct23.222805.24970@klaava.Helsinki.FI>
Date: Wed, 28 Oct 1992 13:50:08 GMT
Lines: 65

Linus Torvalds (torvalds@klaava.Helsinki.FI) wrote:
: 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. 

My advice was to the beginners of 386bsd, not just to anyone.
Please note that my meaning of "bugs" may be different from the usual one.

What I meant was the one causing the most  problem to 386bsd users.
The kernel and utilities in 386bsd were compiled with gcc-1.39 in the flavour
decided by William Jolitz.
	gcc is highly configurable so even versions of gcc-1.39 on the same
microprocessors are not exactly identical. I notice that linux and 386bsd use
the same options namely, bsd assembler syntax, and Mach 386 style(?).

I've used gcc-2.2.2 to compile all utilities and some ported software like 
bash, sc  but it failed for petdingo, 386bsd kernel, f2c .
	gcc-1.39 works for all these cases. If you do not have gcc-1.39 ,
you'll not be able to have these software.

gcc-2.2.2 uses a different syntax from gcc-1.39 and it is still very volatile.
I support the idea that we wait until version 2.4.. before adopting it outright,
who knows FSF may change its syntax again.
 
: 
: 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). 
: 

gcc-2.2.2 is bigger than gcc-1.39 & g++, being about 6 Megabytes binary.
gcc&g++ 1.39 occupy about 2 megabytes(?).

--
Othman bin Ahmad, School of EEE,
Nanyang Technological University, Singapore 2263.
Internet Email: eoahmad@ntuix.ntu.ac.sg
Bitnet Email: eoahmad@ntuvax.bitnet