2000-11-16 23:34:16

by Peter Denison

[permalink] [raw]
Subject: Which compiler to use?

Sorry for the broken references - I read l-k through Kernel Traffic.

> At one point someone asked what the recommended compiler was for all the
> various kernel versions, and Peter Samuelson [*] listed:
>
> 2.91.66 aka egcs 1.1.2. It has been officially blessed for 2.4 and has
> been given an informal thumbs-up by Alan for 2.2. (It does NOT work for
> 2.0, if you still care about that.)
>
> 2.7.2.3 works for 2.2 (and 2.0) but NOT for 2.4.
>
> 2.95.2 seems to work with both 2.2 and 2.4 (no known bugs, AFAIK) and
> many of us use it, but it is a little riskier than egcs.
>
> Red Hat "2.96" or CVS 2.97 will probably break any known kernel.

Please note that 2.91.66 WILL NOT correctly build any bit of 2.4 (or
probably 2.2) on i386 that uses the kernel version of strstr, because of a
register allocation bug. This currently affects the DEPCA driver, but very
few other things.

2.95.2 is OK in this instance and elsewhere for me (YMMV).

Whether this means we should change the recommended compiler version, or
get rid of the use of (or change) the in-kernel strstr is a subject left
open for debate.

--
Peter Denison <[email protected]>
Linux Driver for Promise DC4030VL cards.
See http://www.pnd-pc.demon.co.uk/promise/promise.html for details



2000-11-16 23:38:48

by Alan Cox

[permalink] [raw]
Subject: Re: Which compiler to use?

> Please note that 2.91.66 WILL NOT correctly build any bit of 2.4 (or
> probably 2.2) on i386 that uses the kernel version of strstr, because of a
> register allocation bug. This currently affects the DEPCA driver, but very
> few other things.
>
> 2.95.2 is OK in this instance and elsewhere for me (YMMV).

2.95.2 miscompiles strstr in some cases too. Current 2.2 however has strstr
no longer inlined. I got bored of playing guess the compiler bug

2000-11-16 23:51:08

by Chris Wedgwood

[permalink] [raw]
Subject: Re: Which compiler to use?

On Thu, Nov 16, 2000 at 11:09:11PM +0000, Alan Cox wrote:

2.95.2 miscompiles strstr in some cases too. Current 2.2 however has strstr
no longer inlined. I got bored of playing guess the compiler bug

What about 2.95.2 + 400K_of_patches that many vendors ship with? I
ended up patch hunting for 2.95.2 a few months back when I discovered
it was miscompiling c++ code and ended up with something that seems
to work... is there a definitive way to tell?


--cw


2000-11-17 11:59:03

by Matthias Andree

[permalink] [raw]
Subject: Re: Which compiler to use?

On Fri, 17 Nov 2000, Chris Wedgwood wrote:

> On Thu, Nov 16, 2000 at 11:09:11PM +0000, Alan Cox wrote:
>
> 2.95.2 miscompiles strstr in some cases too. Current 2.2 however has strstr
> no longer inlined. I got bored of playing guess the compiler bug
>
> What about 2.95.2 + 400K_of_patches that many vendors ship with? I
> ended up patch hunting for 2.95.2 a few months back when I discovered
> it was miscompiling c++ code and ended up with something that seems
> to work... is there a definitive way to tell?

It'd then be better if there would be bug-fix releases of 2.95, I
imagine they'd be called 2.95.2.1 or 2.95.3.

--
Matthias Andree