can?t compile kernel with egcs 1.0.2

Kaz Kylheku
Mon Apr 13 14:24:00 GMT 1998

On Saturday, April 11, 1998 4:41 PM, Alexander Langer 
[] wrote:
> I just compiled egcs 1.0.2 and it worked excellent on all applications?
> sources I attempted to compile, but I just can?t get it to work with the
> linux 2.0.33 kernel source.

For what my opinion may be worth, I would recommend that you compile
your kernel with the old GCC. You should not trust your operating system
to a bleeding-edge compiler.

This weekend I built an SMP 2.0.32 kernel with EGCS. For some reason,
X would no longer run. The X server would die with a mysterious segmentation

I tried all kinds of remedies, including reinstalling all of the libraries 
are linked to the X server, and reinstalling the X server itself. I recompiled
the kernel. Still, X just would not run..

Finally, I recompiled the kernel with gcc2, after which the problem
went away.

I didn't investigate to find out what it was; it could just be specific
to SMP. A non-SMP version of the same kernel (same config,
except no SMP) does not exhibit the same problem.

Linux does have subtle GCC dependencies here and there and is
quite likely sensitive to changes in the compiler.

I have come to the conslution best thing is to let the Linux kernel
developers adapt the use of EGCS and iron out any problems. Once
the practice of compiling the kernel with EGCS becomes the norm,
then it will be good to switch. Perhaps EGCS is already being used
for cutting-edge kernels.

I am enjoying the cutting edge compiler for compiling application-level
stuff, though; but the operating system has to be trustworthy.

> After executing ?make zImage? egcs hangs in a loop and can just be stopped
> by hitting <ctrl-c>.

Haven't seen that one.

> Here are the messages which come over and over again..
> /usr/src/linux/include/asm/string.h: In function `__constant_memcpy':
> In file included from /usr/src/linux/include/linux/string.h:39,
>                  from /usr/src/linux/include/asm/termios.h:58,
>                  from /usr/src/linux/include/linux/termios.h:5,
>                  from /usr/src/linux/include/linux/tty.h:20,
>                  from /usr/src/linux/include/sched.h:26,
>                  from init/main.c:20:

That's because EGCS has more diagnostics and is complaining about
things that GCC2 does not.

More information about the Gcc-bugs mailing list