Upgrade GCC 4.6.3 on Ubuntu 12.04 to 4.8.2

后端 未结 3 846
旧时难觅i
旧时难觅i 2020-12-29 00:18

I\'m about to update default GCC (version 4.6.3) shipped by Ubuntu 12.04 to 4.8.2, though the compilation requires a standalone C++ compiler

admin@ubuntu: /u         


        
3条回答
  •  长发绾君心
    2020-12-29 00:54

    You can easily compile the sources.

    The following commands worked for gcc 4.7. They should be fine for gcc 4.8 as well:

    sudo apt-get install libmpfr-dev libgmp3-dev libmpc-dev flex bison
    
    svn checkout svn://gcc.gnu.org/svn/gcc/trunk
    
    cd trunk
    
    ./configure --prefix=/opt/gcc-4.8.2/usr/local/gcc-4.8.2 --enable-languages=c,c++
    
    make
    
    make install
    

    The compiler will be placed in the /opt/ directory, so you have to use it from there.

提交回复
热议问题