[root@jeames007 ~]# tar -vxf gmp-5.0.1.tar.bz2
[root@jeames007 ~]# cd gmp-5.0.1/
[root@jeames007 gmp-5.0.1]# ./configure --prefix=/usr/local/gmp-5.0.1
[root@jeames007 gmp-5.0.1]# make
[root@jeames007 gmp-5.0.1]# make install
make[4]: Leaving directory `/root/gmp-5.0.1’
make[3]: Leaving directory `/root/gmp-5.0.1’
make[2]: Leaving directory `/root/gmp-5.0.1’
make[1]: Leaving directory `/root/gmp-5.0.1’
[root@jeames007 ~]# tar -vxf mpfr-3.1.5.tar.xz
[root@jeames007 ~]# cd mpfr-3.1.5/
[root@jeames007 ~]#./configure --prefix=/usr/local/mpfr-3.1.5 --with-gmp=/usr/local/gmp-5.0.1
[root@jeames007 mpfr-3.1.5]# make
[root@jeames007 mpfr-3.1.5]# make install
[root@jeames007 ~]# tar -vxf mpc-1.0.1.tar.gz
[root@jeames007 ~]# cd mpc-1.0.1
[root@jeames007 ~]# ./configure --prefix=/usr/local/mpc-1.0.1 --with-gmp=/usr/local/gmp-5.0.1 --with-mpfr=/usr/local/mpfr-3.1.5
[root@jeames007 mpc-1.0.1]# make
[root@jeames007 mpc-1.0.1]# make install
[root@rhel76 ~]# cd gcc-10.1.0
[root@rhel76 gcc-10.1.0]# cd build/
…/configure --prefix=/usr/local/gcc-10.1.0/ --enable-checking=release --enable-languages=c,c++ --disable-multilib --with-gmp=/usr/local/gmp-5.0.1 --with-mpfr=/usr/local/mpfr-3.1.5 --with-mpc=/usr/local/mpc-1.0.1
checking build system type… x86_64-pc-linux-gnu
checking host system type… x86_64-pc-linux-gnu
checking target system type… x86_64-pc-linux-gnu
checking for a BSD-compatible install… /usr/bin/install -c
checking whether ln works… yes
checking whether ln -s works… yes
checking for a sed that does not truncate output… /usr/bin/sed
checking for gawk… gawk
checking for libatomic support… yes
checking for libitm support… yes
checking for libsanitizer support… yes
checking for libvtv support… yes
checking for libhsail-rt support… yes
checking for libphobos support… yes
checking for gcc… gcc
checking whether the C compiler works… yes
checking for C compiler default output file name… a.out
checking for suffix of executables…
checking whether we are cross compiling… no
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc accepts -g… yes
checking for gcc option to accept ISO C89… none needed
checking for g++… g++
checking whether we are using the GNU C++ compiler… yes
checking whether g++ accepts -g… yes
checking whether g++ accepts -static-libstdc++ -static-libgcc… no
checking for gnatbind… no
checking for gnatmake… no
checking whether compiler driver understands Ada… no
checking how to compare bootstrapped objects… cmp --ignore-initial=16 f 1 f1 f1f2
checking for objdir… .libs
checking for the correct version of gmp.h… yes
checking for the correct version of mpfr.h… buggy but acceptable
checking for the correct version of mpc.h… yes
checking for the correct version of the gmp/mpfr/mpc libraries… yes
checking for isl 0.15 or later… no
required isl version is 0.15 or later
*** This configuration is not supported in the following subdirectories:
gnattools gotools target-libada target-libhsail-rt target-libphobos target-zlib target-libbacktrace target-libgfortran target-libgo target-libffi target-libobjc target-liboffloadmic
(Any other directories should still work fine.)
checking for default BUILD_CONFIG… bootstrap-debug
checking for --enable-vtable-verify… no
checking for bison… bison -y
checking for bison… bison
checking for gm4… no
checking for gnum4… no
checking for m4… m4
checking for flex… flex
checking for flex… flex
checking for makeinfo… no
/root/gcc-10.1.0/missing: line 81: makeinfo: command not found
checking for expect… no
checking for runtest… no
checking for ar… ar
checking for as… as
checking for dlltool… no
checking for ld… ld
checking for lipo… no
checking for nm… nm
checking for ranlib… ranlib
checking for strip… strip
checking for windres… no
checking for windmc… no
checking for objcopy… objcopy
checking for objdump… objdump
checking for otool… no
checking for readelf… readelf
checking for cc… cc
checking for c++… c++
checking for gcc… gcc
checking for gfortran… gfortran
checking for gccgo… no
checking for gdc… no
checking for ar… no
checking for ar… ar
checking for as… no
checking for as… as
checking for dlltool… no
checking for dlltool… no
checking for ld… no
checking for ld… ld
checking for lipo… no
checking for lipo… no
checking for nm… no
checking for nm… nm
checking for objcopy… no
checking for objcopy… objcopy
checking for objdump… no
checking for objdump… objdump
checking for otool… no
checking for otool… no
checking for ranlib… no
checking for ranlib… ranlib
checking for readelf… no
checking for readelf… readelf
checking for strip… no
checking for strip… strip
checking for windres… no
checking for windres… no
checking for windmc… no
checking for windmc… no
checking where to find the target ar… host tool
checking where to find the target as… host tool
checking where to find the target cc… just compiled
checking where to find the target c++… just compiled
checking where to find the target c++ for libstdc++… just compiled
checking where to find the target dlltool… host tool
checking where to find the target gcc… just compiled
checking where to find the target gfortran… host tool
checking where to find the target gccgo… host tool
checking where to find the target gdc… host tool
checking where to find the target ld… host tool
checking where to find the target lipo… host tool
checking where to find the target nm… host tool
checking where to find the target objcopy… host tool
checking where to find the target objdump… host tool
checking where to find the target otool… host tool
checking where to find the target ranlib… host tool
checking where to find the target readelf… host tool
checking where to find the target strip… host tool
checking where to find the target windres… host tool
checking where to find the target windmc… host tool
checking whether to enable maintainer-specific portions of Makefiles… no
configure: creating ./config.status
config.status: creating Makefile
[root@jeames007 ~]# make -j4
make 时间很长,很长,耐心等待,本人编译了1个小时。所以有条件的话,在编译时,可以使用make -j8
[root@jeames007 build]# make install
此时GCC版本还未更新下,需要以下的操作
mv /usr/bin/gcc /usr/bin/gcc485
mv /usr/bin/g++ /usr/bin/g++485
mv /usr/bin/c++ /usr/bin/c++485
mv /usr/bin/cc /usr/bin/cc485
ln -s /usr/local/gcc-10.1.0/bin/gcc /usr/bin/gcc
ln -s /usr/local/gcc-10.1.0/bin/g++ /usr/bin/g++
ln -s /usr/local/gcc-10.1.0/bin/c++ /usr/bin/c++
ln -s /usr/local/gcc-10.1.0/bin/gcc /usr/bin/cc
mv /usr/lib64/libstdc++.so.6 /usr/lib64/libstdc++.so.6.bak
最全的Linux教程,Linux从入门到精通
======================
-
linux从入门到精通(第2版)
-
Linux系统移植
-
Linux驱动开发入门与实战
-
LINUX 系统移植 第2版
-
Linux开源网络全栈详解 从DPDK到OpenFlow
第一份《Linux从入门到精通》466页
====================
内容简介
====
本书是获得了很多读者好评的Linux经典畅销书**《Linux从入门到精通》的第2版**。本书第1版出版后曾经多次印刷,并被51CTO读书频道评为“最受读者喜爱的原创IT技术图书奖”。本书第﹖版以最新的Ubuntu 12.04为版本,循序渐进地向读者介绍了Linux 的基础应用、系统管理、网络应用、娱乐和办公、程序开发、服务器配置、系统安全等。本书附带1张光盘,内容为本书配套多媒体教学视频。另外,本书还为读者提供了大量的Linux学习资料和Ubuntu安装镜像文件,供读者免费下载。
本书适合广大Linux初中级用户、开源软件爱好者和大专院校的学生阅读,同时也非常适合准备从事Linux平台开发的各类人员。
需要《Linux入门到精通》、《linux系统移植》、《Linux驱动开发入门实战》、《Linux开源网络全栈》电子书籍及教程的工程师朋友们劳烦您转发+评论
加入社区》https://bbs.csdn.net/forums/4304bb5a486d4c3ab8389e65ecb71ac0