# Gentoo compiler update

Tags: Gentoo Linux

Reading time: 1 minute

Description: Updating GCC on gentoo linux



  1. Update the gcc package like any other
  2. List the installed version
    1
    
    gcc-config --list-profiles
    
  3. Use the new one
    1
    
    gcc-config <number_from_list>
    
  4. Update profile
    1
    
    source /etc/profile
    
  5. Update libtool
    1
    
    emerge --ask --oneshot --usepkg=n sys-devel/libtool
    
  6. Remove the old version
    1
    
    emerge --ask --depclean sys-devel/gcc:12
    
  7. (optional) Rebuild the system and world set
    1
    2
    
    emerge --ask --emptytree --usepkg=n @system
    emerge --ask --emptytree --usepkg=n @world