点击上方“IT那活儿”公众号,关注后了解更多内容,不管IT什么活儿,干就完了!!!
../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin


../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin

注:如果是glibc-2.28时,gcc的版本为8.2,不能升级为最新的gcc版本,且make的版本也不能为4.4的版本。
tar -xf gcc-8.2.0.tar.gz
cd gcc-8.2.0

./contrib/download_prerequisites
mkdir build
cd build/
../configure --prefix=/usr/local/gcc-8.2.0 --enable-bootstrap --enable-checking=release --enable-languages=c,c++ --disable-multilib
make -j 8
-- 并行执行,不然make时间会很长
make install
sudo ln -sv /usr/local/gcc-8.2.0/include/ usr/include/gcc
"/usr/include/gcc/include" -> "/usr/local/gcc-8.2.0/include/"
echo -e '\nexport PATH=/usr/local/gcc-8.2.0/bin:$PATH\n' >> /etc/profile.d/gcc.sh
source /etc/profile.d/gcc.sh
gcc -v
--查看gcc版本信息

gcc ldconfig -p |grep gcc
--查看gcc
reboot
--重启主机
tar -xf make-4.2.tar.gz
cd make-4.2
./configure
make -j4
make install
mv /usr/bin/make /usr/bin/make_0817
cp ./make /usr/bin/
make -v
mkdir build
cd build/
../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/
make -j8
make install
strings /usr/local/gcc-8.2.0/lib64/libstdc++.so.6 | grep GLIBCXX_

strings /lib64/libc.so.6 | grep GLIBC



本文作者:糖醋小鲤鱼(上海新炬中北团队)
本文来源:“IT那活儿”公众号

文章转载自IT那活儿,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。