In Arch Linux, you can use the AUR to compile your custom version of GCC (example with gcc 4.9) [Alternative 1]: using the AUR manually mkdir -p $HOME/build/ cd $HOME/build/ git clone https://aur.archlinux.org/gcc49.git cd gcc49 makepkg --syncdeps sudo pacman --upgrade gcc-4.9.3-1-x86_64.pkg.tar.xz