Skip to contentSkip to conversation

Kernel compiler

DISCUSSION Ralf Baechle 5 participants 9 messages Nov 3, 2000 – Nov 7, 2000 MIPS

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 3 lines · Ralf Baechle

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.

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.

#2 lore raw
Quoted 6 lines · Keith Owens
Quoted 3 lines · Ralf Baechle

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.

Quoted 6 lines

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.

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

#3 lore raw
Quoted 3 lines · Ralf Baechle

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.

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.

Signature · 3 lines
Keith M Wesolowski			[email protected]
University of Nevada			http://www.chem.unr.edu
Chemistry Department Systems and Network Administrator
#4 lore raw
In reply to Ralf Baechle
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Original Message <<<<<<<<<<<<<<<<<<

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

Quoted 15 lines · Keith Owens
Quoted 7 lines
Quoted 3 lines · Ralf Baechle

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.

Quoted 6 lines

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.

Quoted 5 lines

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,

Quoted 4 lines

so we're in some trouble.

I've got reports regarding the 1.1.2 crosscompiler which say that it 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

#6 lore raw
In reply to Ralf Baechle
Quoted 3 lines · Ralf Baechle

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.

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.

#5 lore raw
In reply to Pete Popov
Quoted 6 lines · Pete Popov
Quoted 5 lines

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,

Quoted 8 lines
Quoted 4 lines

so we're in some trouble.

I've got reports regarding the 1.1.2 crosscompiler which say that it 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).

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

#7 lore raw
In reply to Ralf Baechle
Quoted 3 lines

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.

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

#8 lore raw
Quoted 8 lines · Alan Cox
Quoted 3 lines

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.

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

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