Seth Mos a écrit :
> At 13:02 18-9-2001 -0400, Arun Ramakrishnan wrote:
> > 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
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
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
to broken code in kernel that old more tolerant compilers accepted but should
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
2) On a PIII, compiling specifically for i686 gives a 15% improvement on pure C
(my benchmark) over the worst case (compiling for plain Pentium). AMD
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