Subject: Kernel compiler

From: Ralf Baechle <[email-masked]>
Date: Fri, 3 Nov 2000 22:19:26 +0100

Due to compiler bugs with named initializers the use of egcs 1.1.2 has
ben deprecated for Linux; Linux 2.4.0-test10 will refuse to compile with
older compilers.

mips64 users can ignore this message;  they're currently all using egcs 1.1.2
and therefore not affected.

  Ralf

---

From: Keith Owens <[email-masked]>
Date: Sat, 04 Nov 2000 13:44:22 +1100

On Fri, 3 Nov 2000 22:19:26 +0100, 
>ben deprecated for Linux; Linux 2.4.0-test10 will refuse to compile with

Correction.  gcc 2.7 has been deprecated, the recommended version is
gcc 2.91.66 (also known as egcs 1.1.2) or better.  Unfortunately RedHat
created an unofficial 2.96 which is known to miscompile the kernel, so
you cannot just use the "latest" gcc.  It is believed that gcc versions
2.91.66 through 2.95 inclusive are safe, as long as you use
-fno-strict-aliasing.

---

From: Ralf Baechle <[email-masked]>
Date: Sat, 4 Nov 2000 03:53:26 +0100

> 2.91.66 through 2.95 inclusive are safe, as long as you use

Sigh, yes you're right as other have already pointed out on IRC ...

Gcc 2.7 is no longer being used for Linux/MIPS since a long time and I'd
simply bitbucket any bugreport related to it.  Most people are using egcs
1.0.3a for everything which is older than the required minimum version 1.1.2,
so we're in some trouble.

I've got reports regarding the 1.1.2 crosscompiler which say that it
misscompiles MIPS kernels, sigh ...

The reports regarding egcs 2.96 and newer misscompiling the kernel only
affect x86 or are other architecture affected as well?  I don't have any
pending compiler >= 2.96 related bug reports.

  Ralf

---

From: Keith M Wesolowski <[email-masked]>
Date: Fri, 3 Nov 2000 19:03:01 -0800

> pending compiler >= 2.96 related bug reports.

Somewhere between 1019 and 1023, a bug was introduced which causes
miscompilation. Symptom is oops on boot during RPC port lookups. I
don't know if this is still present, nor the exact nature of the
bug. It appears that some address offsets changed in the compiled code
from gcc 1019 to gcc 1023.

-- 
Keith M Wesolowski			[email-masked]
University of Nevada			http://www.chem.unr.edu
Chemistry Department Systems and Network Administrator

---

From: Pete Popov <[email-masked]>
Date: Sat, 04 Nov 2000 03:10:50 +0000 (GMT)

>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 11/3/00, 6:53:26 PM, Ralf Baechle <[email-masked]> wrote regarding Re: 

> misscompiles MIPS kernels, sigh ...

What are the symptoms of a "miscompiled" kernel and how does one detect 
that (assuming that the kernel actually compiles successfully, but has 
problems running).

Pete

---

From: Keith Owens <[email-masked]>
Date: Sat, 04 Nov 2000 14:13:37 +1100

On Sat, 4 Nov 2000 03:53:26 +0100, 
>pending compiler >= 2.96 related bug reports.

At a guess (and it is only a guess), the problems will affect all
architectures.  AFAICT they are in the common optimization phase, the
kernel uses constructs that were undefined or poorly defined but worked
in gcc 2.95, 2.96 handles them differently.

---

From: Ralf Baechle <[email-masked]>
Date: Sat, 4 Nov 2000 04:20:02 +0100

> that (assuming that the kernel actually compiles successfully, but has 

When trying to work on a serial terminal hooked up to an Indy it'll oops.

Question is if the compiler is buggy or if it's particular code generation
is just triggering a bug in the kernel code.

  Ralf

---

From: Alan Cox <[email-masked]>
Date: Sat, 4 Nov 2000 10:40:42 +0000 (GMT)

> pending compiler >= 2.96 related bug reports.

The Red Hat 2.96 seems to compile 2.2 correctly when you fix the 2.2 bugs but
does miscompile x86 fs/buffers.c on 2.4 according to reports. I think with mips
you'd have to experiment. Also AFAIK that tree branch hasn't been tested on
mips

---

From: Ralf Baechle <[email-masked]>
Date: Tue, 7 Nov 2000 04:39:22 +0100

> you'd have to experiment. Also AFAIK that tree branch hasn't been tested on

I asked Cort about their PPC experience and they also got trouble.  Reason
enough to ignore gcc-current for kernel use for now.  It's doing well
for userland however so we'll also have to use two compilers from now on,
one for kernel and one for userland.

Btw, I've now placed srpm and i386-linux rpms of a new release of the
egcs-1.1.2 Linux/MIPS crosscompiler on oss.sgi.com.  Users of the 64-bit
kernel, read Origin users should also update as this release has several
fixes.

  Ralf