周梦康 发表于 2017-10-11 1602 次浏览
wget https://ftp.gnu.org/gnu/gcc/gcc-4.9.4/gcc-4.9.4.tar.gz
tar zxf gcc-4.9.4.tar.gz
cd gcc-4.9.4
./contrib/download_prerequisites
./configure --prefix=/usr --enable-checking=release --enable-languages=c,c++ --disable-multilib
make
make install

升级完毕

# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-unknown-linux-gnu/4.9.4/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/usr --enable-checking=release --enable-languages=c,c++ --disable-multilib
Thread model: posix
gcc version 4.9.4 (GCC)

https://unix.stackexchange.com/questions/206410/why-gcc-show-unknown-in-target-x86-64-unknown-linux-gnu-in-arch-linux

评论列表