# Startup panic on old kernel compiled with new compiler

## JanErik

I recompiled the kernel on two different machines with gcc-4.5.2 and both give kernel panic on boot after that. One kernel is 2.6.32-gentoo-r1 and the other is 2.6.31-gentoo-something. 

Is there a limit for how old kernel can be compiled with the new gcc?

----------

## NeddySeagoon

JanErik,

Those combinations should be ok.

Tell us the panic messages. How did you build the kernels ?

Do you use an initrd - if so, that may need to be rebuilt too.

----------

## JanErik

I do not use an initrd. Just make clean && make && make modules_install as usual. The only option I changed was "Device Drivers/Graphics support/Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)/Enable modesetting on intel by default" on one (X40 laptop) and "File systems/Dnotify support" on the other (headless fileserver).

Re-setting the options does not help. I can photograph the screen of the laptop tomorrow.

----------

## Hu

Do you have RELOCATABLE=y?  Another poster here found that a relocatable kernel built with a particular version of sys-devel/binutils failed to boot.  Linking with older versions of binutils worked correctly, as did linking using very new snapshots of binutils.  Setting RELOCATABLE=n also worked.

----------

## JanErik

I do not think I have it enabled but will check. Should also be mentioned that the rest of the system is up to date (including linux-headers, glibc and binutils). 

It does not get very far, outputs about a screen of messages after unpacking and then panics. Nowhere near mounting filesystems or starting init.

Anyway, will probably upgrade to a recent kernel.

----------

## JanErik

OK, this is the error message: http://img849.imageshack.us/i/crw0634.jpg/ .

And CONFIG_RELOCATABLE is not set.

----------

## JanErik

Installed 2.6.37-gentoo-r1 on the laptop and it booted up without problems...

----------

## JanErik

Same on the server, booted up without any similar problems.

----------

