Nope, kernels have nothing to do with compiler optimizations--Now some of your stuff might not work, but recompiling it wouldn't help
; some software just hates the 2.6.x kernels. You only really need to recompile if you make drastic changes to the processor. (Like swapping from Intel to AMD or vice versa.)