GCC编译

  • file format not recognized,在ld时候出这个错误,有可能是符号链接失效了。
  • 加快编译
    #服务端:
    distcc-3.2rc1.tar.gz
    ./configure;make;make install;
    #客户端:
    yum install distcc
    #配置
    ~/.bash_profile中的动作:
    export CC=distcc
    export CXX="distcc g++"
    alias make="make -j 8"
    export DISTCC_HOSTS='192.168.1.4 192.168.1.91 192.168.1.47 192.168.1.21 192.168.1.84'
    #服务端运行:
    sudo /usr/local/bin/distccd --daemon --allow 192.168.1.0/16 --user linghegu port 3632
    #CCache的使用
    yum install ccache
    mkdir /home/linghegu/.bin
    cd vi ~/.bash_profile
    ln -s /usr/bin/ccache gcc
    ln -s /usr/bin/ccache g++
    
    vim ~/.bash_profile
    PATH=/home/linghegu/.bin:$PATH
    

      

原文地址:https://www.cnblogs.com/bornfish/p/5302268.html