大家好,又见面了,我是你们的朋友全栈君。
wget http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-4.9.3/gcc-4.9.3.tar.bz2
tar xjvf gcc-4.9.3.tar.bz2
cd gcc-4.9.3
./contrib/download_prerequisites
cloog-0.18.1
gmp-4.3.2
isl-0.12.2
mpc-0.8.1
mpfr-2.4.2
./contrib/download_prerequisites
cd ..
mkdir gcc-4.9.3-build-temp
cd gcc-4.9.3-build-temp
../gcc-4.9.3/configure --enable-checking=release --enable-languages=c,c++ --disable-multilib
make -j4
make install
export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64/:$LD_LIBRARY_PATH
export C_INCLUDE_PATH=/usr/local/include/:$C_INCLUDE_PATH
export CPLUS_INCLUDE_PATH=/usr/local/include/:$CPLUS_INCLUDE_PATH
gcc -v
使用内建 specs。
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.9.3/lto-wrapper
目标:x86_64-unknown-linux-gnu
配置为:../gcc-4.9.3/configure --enable-checking=release --enable-languages=c,c++ --disable-multilib
线程模型:posix
gcc 版本 4.9.3 (GCC)
像这样:
/root/gcc-4.9.3/gcc-build-4.9.3/x86_64-unknown-linux-gnu/libstdc++-v3/include/bits/basic_string.h: No such file or directory
/root/gcc-4.9.3/gcc-build-4.9.3/x86_64-unknown-linux-gnu/libstdc++-v3/include/bits/allocator.h: No such file or directory
yum install texinfo
yum install ncurses-devel
yum install python
yum install python-devel
wget http://mirrors.ustc.edu.cn/gnu/gdb/gdb-7.9.tar.gz
tar xzvf gdb-7.9.tar.gz
cd gdb-7.9
./configure --with-python
make
make install
最近升级gcc-9.3 和 gdb-9.2 感觉新版本升级更加方便了,但是编译仍然报各种错误,切换使用root权限make可以顺利通过编译!
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/141497.html原文链接:https://javaforall.cn