LoginSignup
1

More than 5 years have passed since last update.

Ubuntu 16.04 64bitに特定バージョンのgccをローカルビルドする

Posted at

makeに3時間ぐらいかかります。

mkdir -p $HOME/local/bin
mkdir -p $HOME/local/src
cd $HOME/local/src
wget https://ftp.gnu.org/gnu/gcc/gcc-6.4.0/gcc-6.4.0.tar.gz
tar xzvf gcc-6.4.0.tar.gz
cd gcc-6.4.0
./contrib/download_prerequisites
./configure -v --disable-multilib --prefix=$HOME/local
sudo apt install make
make
make install
echo "export PATH=$HOME/local/bin:$PATH" >> $HOME/.profile
source $HOME/.profile
g++ --version

いろいろエラーがでることもあると思ういますがそのたびに、対応が必要。 makeがとても長い...。

参考:
https://askubuntu.com/questions/864893/update-gcc-to-the-6-3-version

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1