First, GCC upgrade 4.9.2
1. Decompression
TARZXVF gcc-4.9.2.tar.gz
cdgcc-4.9.2
2. Download dependencies
./contrib/download_prerequisites
3. Build the compiled output directory
mkdir gcc-build-4.9.2
4. Enter the output directory, execute the following command, and generate the makefile file:
cdgcc-build-4.9.2
.. /configure--enable-checking=release--enable-languages=c,c++--disable-multilib
5. Compiling
Make-j4
6. Installation:
Makeinstall
7. Check the version
Gcc-v
Second, compile and install gdb-7.10.1
1. Uninstall the old GDB version first
Rpm-qa | grep gdb
RPM-E--nodeps gdb-7.2-60.el6.x86_64
2. Installing the Texinfo Documentation system
Yum Install Texinfo
Yum Install Ncurses-devel
3. Download gdb-7.10.1 Source Package
4. Unzip the gdb-7.10.1 source package
TAR-ZXVF gdb-7.10.1.tar.gz
5. Generate makefile
CD gdb-7.10.1
./configure
Make
sudo make install
6. Copy the compiled gdb to the/usr/bin directory
sudo cp/root/gdb/gdb/usr/bin/gdb
7. See if the installation was successful.
Gdb-v
Iii. Common errors:
If the Yum install Texinfo is not installed
MAKE[5]:* * * [Gdb.info] Error 127
make[5]:leaving directory '/root/gdb-7.10.1/gdb-build/gdb/doc '
MAKE[4]:* * * [SUBDIR_DO] Error 1
make[4]:leaving directory '/root/gdb-7.10.1/gdb-build/gdb '
MAKE[3]:* * * [install-only] Error 2
make[3]:leaving directory '/root/gdb-7.10.1/gdb-build/gdb '
MAKE[2]:* * * [Install] Error 2
make[2]:leaving directory '/root/gdb-7.10.1/gdb-build/gdb '
MAKE[1]:* * * [INSTALL-GDB] Error 2
make[1]:leaving directory '/root/gdb-7.10.1/gdb-build '
make:*** [Install] Error 2
This article is from the "MySQL" blog, be sure to keep this source http://wenjing.blog.51cto.com/5908329/1736594
Upgrade GCC and GDB