gcc

http://www.gnu.org/software/gcc/gcc-10/
gcc 10.2 http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-10.2.0/
https://bigsearcher.com/mirrors/gcc/releases/gcc-10.2.0/gcc-10.2.0.tar.gz
obtain GCC please use our mirror sites or our version control system.

编译gcc 10.2 on centos7

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

gcc-10.2.0]# ./contrib/download_prerequisites
[root@localhost gcc-10.2.0]# ./contrib/download_prerequisites
2020-08-10 20:07:51 URL:http://gcc.gnu.org/pub/gcc/infrastructure/gmp-6.1.0.tar.bz2 [2383840/2383840] -> "./gmp-6.1.0.tar.bz2" [1]
2020-08-10 20:09:55 URL:http://gcc.gnu.org/pub/gcc/infrastructure/mpfr-3.1.4.tar.bz2 [1279284/1279284] -> "./mpfr-3.1.4.tar.bz2" [1]
2020-08-10 20:10:53 URL:http://gcc.gnu.org/pub/gcc/infrastructure/mpc-1.0.3.tar.gz [669925/669925] -> "./mpc-1.0.3.tar.gz" [1]
2020-08-10 20:13:20 URL:http://gcc.gnu.org/pub/gcc/infrastructure/isl-0.18.tar.bz2 [1658291/1658291] -> "./isl-0.18.tar.bz2" [1]
gmp-6.1.0.tar.bz2: OK
mpfr-3.1.4.tar.bz2: OK
mpc-1.0.3.tar.gz: OK
isl-0.18.tar.bz2: OK
All prerequisites downloaded successfully.

# ll
.... # 可以看到自动下载了 gmp, mpfr, mpc, isl
lrwxrwxrwx. 1 root root 12 Aug 10 20:13 gmp -> ./gmp-6.1.0/
lrwxrwxrwx. 1 root root 13 Aug 10 20:13 mpfr -> ./mpfr-3.1.4/
lrwxrwxrwx. 1 root root 12 Aug 10 20:13 mpc -> ./mpc-1.0.3/
lrwxrwxrwx. 1 root root 11 Aug 10 20:13 isl -> ./isl-0.18/

mkdir gccBuild
cd gccBuild
../gcc-10.2.0/configure --prefix=/opt/gcc-10.2.0 --enable-languages=c,c++,go --disable-multilib
# --disable-multilib 表示不支持32位的gcc
# make
# make install
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

../gcc-10.2.0/configure --prefix=/share/lord/toolchain/gcc-10.2.0 --enable-languages=c,c++,go


➜ /bin alias sha512sum='/share/CACHEDEV1_DATA/.qpkg/container-station/bin/busybox sha512sum'
➜ /bin sha512sum --help
BusyBox v1.22.1 (2019-07-11 04:19:06 UTC) multi-call binary.

Usage: sha512sum [-c[sw]] [FILE]...

Print or check SHA512 checksums

-c Check sums against list in FILEs
-s Don't output anything, status code shows success
-w Warn about improperly formatted checksum lines

➜ /bin

configure: error: Building GCC requires GMP 4.2+, MPFR 3.1.0+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations.


./contrib/download_prerequisites
./contrib/download_prerequisites: line 234: sha512sum: command not found
error: Cannot verify integrity of possibly corrupted file gmp-6.1.0.tar.bz2