Re: Linux kernel + gcc-4.0
On Tuesday 08 March 2005 6:49pm, Javier Kohen wrote:
> Has anybody attempted to compile the Linux kernel with gcc-4.0?
> Given that gcc-4.0 is now the default compiler in the gcc-3.4/4.0
> archive I attempted to use it to compile the kernel, but it failed
> during compilation. It displays a bunch of warnings an errors.
> Googling a bit shows that there are some ongoing attempts at fixing
> gcc-4.0 miscompilations of the kernel, but I'd like to hear what you're
> experience on AMD64 was. I'm still using 2.6.10.
It *can* be done:
11:20am ed (pts/2) :~ >cat /proc/version
Linux version 2.6.11-bk2 (root@ScreaminDemon) (gcc version 4.0.0 20050304
(prerelease) (Debian 4.0-0pre7)) #1 Wed Mar 9 04:48:13 EST 2005
I've stopped at bk2 because bk3 makes changes that break NVIDIA's driver.
The only problem I had moving from i386 (other than having to recompile libqt3
- which you'll have to if you use KDE) was the "warning: losing many ticks"
problem (its been mentioned on lkml). A warning message some are getting
constantly. Related AFAICT to the thermal sensing code in ACPI, turning that
off made most of the messages go away, along with disabling HPET control of
RTC's IRQ (?). However, those of us with an MSI motherboard that dynamically
changes CPU speed will have to put up with false warning messages for the
time being because it looks like some parts of the kernel can't deal with
CPU's changing speeds dynamically (this is the impression I got from an
archived conversation on lkml).
Other than those messages, its been rock solid, even KDE too, but it will all
come down to your hardware of course. Possibly, I'm just lucky it worked for
me. First compile was of 2.6.10-ac12 using the version of gcc-4.0 prior to
their latest upgrade to 4.0.0-pre7 in the gcc-3.4 version of pure64.
2.6.11-bk3 also worked (except for nvidia driver). Had to install gcc-3.4 to
rebuild libqt3 to fix KDE, and then revert the kernel back to 2.6.11-bk2
while awaiting fixes in NVIDIA's driver.
Have an MSI Neo mobo (VIA chipset) with A64 3200+, SCSI and ATA hard drives,
ALSA running VIA's audio hardware on the mobo, NVIDIA's driver running an
NVIDIA 5600 video card, 1GB ram.
PS: Yes, you will get a lot of warnings during a kernel compile, but the
majority seemed to be of the "nitpick" variety, mainly over the signedness of
long integers, so my guess is this is a relatively new warning in gcc that
only really appears on 64 bit systems and the problems it shows aren't real
errors, just something that hasn't been cast properly in the code to make the
warning go away. Of course, there's always then the chance that a real
warning/error gets buried under all those false alarms.