LoginSignup
1
1

More than 3 years have passed since last update.

CentOS7へ(CentOS6と同じバージョンの)gcc4.4.7をインストール

Last updated at Posted at 2017-12-19
  • compat-gcc-44
  • compat-gcc-44-c++

を使えば良いです。

以下古い記事

CentOS6やdebian9だとビルドできるがCentOS7だとビルドできないソースがあった。

ディストリ gccバージョン
debian 9 6.3
centos 6 4.4.7
centos 7 4.8.5
gcc4系の最新 4.9.4

準備

ビルドに必要なパッケージ
yum install -y \
  libmpc-devel mpfr-devel gmp-devel

ビルド

x86_64用にビルド
cd gcc-4.4.7
# --disable-multilib 指定をしないとglibc-devel.i686もインストールしておく必要がある。
./configure --build=x86_64-linux-gnu --disable-multilib
make -j 4

make install
# /usr/local/bin/gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ./configure --build=x86_64-linux-gnu --disable-multilib
Thread model: posix
gcc version 4.4.7 (GCC) 
1
1
0

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
1