xfs
[Top] [All Lists]

Re: gcc-2.96-nn status

To: alan@xxxxxxxxxxxx, linux-xfs@xxxxxxxxxxx
Subject: Re: gcc-2.96-nn status
From: Jean Francois Martinez <jfm2@xxxxxxxxxxxxxxxx>
Date: Tue, 18 Sep 2001 21:26:29 +0200
Cc: Seth Mos <knuffie@xxxxxxxxx>
References: <20010918124051.A30647@wwweasel.geeksrus.net> <4.3.2.7.2.20010918191512.03352ba8@pop.xs4all.nl>
Sender: owner-linux-xfs@xxxxxxxxxxx
Seth Mos a écrit :

> At 13:02 18-9-2001 -0400, Arun Ramakrishnan wrote:
> >Hi,
> >     I heard that 2.96 is again a devel version of gcc which is sorta
> > unstable.I
>
> It was a CVS snapshot.
>

It was a CVS snapshot some 18 months ago.  Eighteen months of bug hunting
later you can tell nothing about its stability.  In fact because Gcc 2.96 was
frozen
over a year before gcc 3.0  and has been far more dceployed I trust it far m
ore than gcc 3.0+

>
> >heard posting saying that we shud downgrade to 2.95 possibly.I think with
> >RH 7.1
> >,u no longer need kgcc to compile things correctly.gcc itself works.In fact,i
>
> For most userland programs it seems to be fine but I have encounterd some
> utilities that don't like it.

Gcc 2.96 requires C++ functions being declared before their use.   I have found
many programs who need to be fixed.


>
> For kernels kgcc might be a better solution.
>

The only gcc tested by kernel people are egcs and gcc 2.95.  There is ever a
danger kernel
will break if compiled with a different compiler.  On another hand gcc 2.96 has
been used in
the two most popular Linux distributions so is a good test bench.


>
> >heard sby commenting that now kgcc seems broke in RH 7.1 and so it is safe to
> >use only gcc in RH 7.1;while it was mandatory  to use kgcc in RH 7.0!!!!
>
> Not that I know off.

AFAIK kgscc is no longer shipped with 7.1.  Reason kgcc was in 7.0 was because
gcc 2.96 did not compile kernel 2.2.  gcc 2.96 had its bugs but in that case it
was due
to broken code in kernel that old more tolerant compilers accepted but should 
not
have.
kernel 2.4 has no longer this problem.

>
>
> >     I also heard that binaries produced by gcc 3.0 are going to be somewhat
> >incompatible with the older binaries.
>
> No, you mean the object code. Not the binaries itself but the intermediate
> binary form that you have before creating the actual binary. C code ->
> object code -> Binary
>

About compiling specifically for athlon:

1) The thing who will get you real benefits are the assembler parts (ie
unaffected by
compiler flags).

2) On a PIII, compiling specifically for i686 gives a 15% improvement on pure C
programs
(my benchmark) over the worst case (compiling for plain Pentium).   AMD
processors tend
to be more tolerant to code not specifically compiled for them since most of the
time they have
to cope with code optimized for Intel.

Thus on kernel (mix of assembler and C) a good strategy if you want to use kgcc
(aka egcs) is
to go under arch/i386 and fix the file containing the compiler flags to use the
-D  for athlon and
-march=i686.   This will be a bit faster than  compiling for i686.   Gcc 2.96
genrates faster code than egcs but if you are wary of it the above is the best
solution


                                JFM



<Prev in Thread] Current Thread [Next in Thread>