Is there any link between gcc versions and the version of a kernel ? Specifically, would I be able to install a very old version of gcc onto the latest kernel. Alternatively would I be able to build the latest version of gcc on a very old kernel? Are there any compatibility problems between the two for any version ??
Ubuntu – Are gcc versions tied to kernel versions
gcckernelupgrade
Best Answer
You might have trouble compiling new kernels with very old versions of GCC.
Besides that, no, GCC versions are not tied to the Linux kernel's version:
libc
that will not run on that kernel. But this is not a particularly likely scenario.With that said, you should be careful about installing an older GCC over a newer GCC, since the newer GCC may be needed. If you're building GCC yourself from source, you can configure the build to install in its own prefix (rather than
/usr
). If this still breaks builds, make sure the newer GCC (which was there before) is in a directory earlier in thePATH
environment variable than the older GCC (which you more recently installed).