Upgrade GCC and GDB

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.