注意
本文最后更新于 2024-07-14,文中内容可能已过时。
通过源代码安装 gcc14
,同时需要更新 libstdc++
动态库链接。
安装
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
wget https://ftp.gnu.org/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.gz
tar xvf gcc-14.2.0.tar.gz
cd gcc-14.2.0
## install prerequisites
./contrib/download_prerequisites
for k in `ls |grep .tar.`; do
tar xvf ${k}
done
ln -s gmp-6.2.1 gmp
ln -s mpfr-4.1.0 mpfr
ln -s mpc-1.2.1 mpc
ln -s isl-0.24 isl
mkdir -p /shared/trading/lib/gcc14
./configure --prefix=/shared/trading/lib/gcc14 \
--enable-bootstrap \
--enable-checking=release \
--enable-languages=c,c++ \
--disable-multilib
make && make install
#echo "export PATH=/usr/local/gcc9/bin:$PATH" >> /etc/profile.d/gcc.sh && \
#source /etc/profile.d/gcc.sh && \
#ln -sv /usr/local/gcc9/include/ /usr/include/gcc && \
#echo "/usr/local/gcc9/lib64" >> /etc/ld.so.conf.d/gcc.conf && \
#ldconfig -v && \
#ldconfig -p |grep gcc && \
#ln -sf /usr/local/gcc9/bin/g++ /usr/bin/g++ && \
#ln -sf /usr/local/gcc9/bin/gcc /usr/bin/gcc && \
#ln -sf /usr/local/gcc9/bin/c++ /usr/bin/c++ && \
#ln -sf /usr/local/gcc9/bin/cc /usr/bin/cc && \
#rm -rf /tmp/gcc*
|
libstdc++
1
2
3
4
|
## ubuntu
ln -sfn /usr/local/gcc14/lib64/libstdc++.so /usr/lib/x86_64-linux-gnu/libstdc++.so.6
## centos
|