我已经将 (
make
+ make install
) 从 gcc 12.2 编译成 /usr/local/gcc12
.
现在
gcc --version
:
gcc (GCC) 13.0.1 20230401 (Red Hat 13.0.1-0)
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
列表
/usr/local/gcc122
:
bin include lib lib64 libexec share
/usr/local/gcc122/bin
:
drwxr-xr-x. 1 root root 676 Apr 25 22:25 .
drwxr-xr-x. 1 root root 60 Apr 25 22:25 ..
-rwxr-xr-x. 4 root root 5705624 Apr 25 22:25 c++122
-rwxr-xr-x. 1 root root 5701800 Apr 25 22:25 cpp122
-rwxr-xr-x. 4 root root 5705624 Apr 25 22:25 g++122
-rwxr-xr-x. 3 root root 5695360 Apr 25 22:25 gcc122
-rwxr-xr-x. 2 root root 145976 Apr 25 22:25 gcc-ar122
-rwxr-xr-x. 2 root root 145880 Apr 25 22:25 gcc-nm122
-rwxr-xr-x. 2 root root 145888 Apr 25 22:25 gcc-ranlib122
-rwxr-xr-x. 1 root root 5697728 Apr 25 22:25 gcov122
-rwxr-xr-x. 1 root root 3484168 Apr 25 22:25 gcov-dump122
-rwxr-xr-x. 1 root root 3660344 Apr 25 22:25 gcov-tool122
-rwxr-xr-x. 2 root root 5706568 Apr 25 22:25 gfortran122
-rwxr-xr-x. 1 root root 249334728 Apr 25 22:25 lto-dump122
-rwxr-xr-x. 4 root root 5705624 Apr 25 22:25 x86_64-pc-linux-gnu-c++122
-rwxr-xr-x. 4 root root 5705624 Apr 25 22:25 x86_64-pc-linux-gnu-g++122
-rwxr-xr-x. 3 root root 5695360 Apr 25 22:25 x86_64-pc-linux-gnu-gcc122
-rwxr-xr-x. 3 root root 5695360 Apr 25 22:25 x86_64-pc-linux-gnu-gcc-12.2.0
-rwxr-xr-x. 2 root root 145976 Apr 25 22:25 x86_64-pc-linux-gnu-gcc-ar122
-rwxr-xr-x. 2 root root 145880 Apr 25 22:25 x86_64-pc-linux-gnu-gcc-nm122
-rwxr-xr-x. 2 root root 145888 Apr 25 22:25 x86_64-pc-linux-gnu-gcc-ranlib122
-rwxr-xr-x. 2 root root 5706568 Apr 25 22:25 x86_64-pc-linux-gnu-gfortran122
./gcc122 --version
:
gcc122 (GCC) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
如何正确地将安装的默认 gcc 13 替换为 gcc 12.2 (
/usr/local/gcc12
)(long stage make 后的最后一步)?
重启没有帮助。