Ubuntu12.04 GCC-3.4.6 Installation

Source: Internet
Author: User
To compile the kernel, The gcc4.3 version that comes with Ubuntu is too high and gcc3.x needs to be used. Therefore, you need to install gcc of earlier versions. I chose gcc3.4.4. (1) to download the deb installation package, package I downloaded: gcc-3.4-base_3.4.6-6ubuntu3_i386.deb, gcc-3.4_3.4.6-6ubuntu3_i386.deb, cpp-3.4_3.4.6-6ubun

To compile the kernel, The gcc4.3 version that comes with Ubuntu is too high and gcc3.x needs to be used. Therefore, you need to install the gcc of the lower version. I chose gcc3.4.4.

(1) download the deb installation package. The package I downloaded is:

Gcc-3.4-base_3.4.6-6ubuntu3_i386.deb,

Gcc-3.4_3.4.6-6ubuntu3_i386.deb,

Cpp-3.4_3.4.6-6ubuntu3_i386.deb,

G ++-3.4 _ 3.4.6-6ubuntu3_i386.deb,

Libstdc ++ 6-dev_3.4.6-6ubuntu3_i386.deb

For: http://archive.ubuntu.com/ubuntu/pool/universe/g/gcc-3.4/

(2) install these packages

Sudo dpkg-force-depends-I xxx. deb

(3) System Configuration

After the installation is complete, more: gcc-3.4 will be available in the system

Currently, there are two versions of gcc in the system, which are short of time-saving gcc4.3. You need to change the default configuration of the system:

Added gcc3.4 and gcc4.3 options

$ Sudo update-alternatives -- install/usr/bin/gcc/usr/bin/gcc-4.3 40

$ Sudo update-alternatives -- install/usr/bin/gcc/usr/bin/gcc-3.4 30

Switch version to gcc-3.4

$ Sudo update-alternatives -- config gcc

There are two options available, both of which provide "gcc"

<Select the option -----------------------------------------------

* + 1/usr/bin/gcc-3.4

2/usr/bin/gcc-4.2

To maintain the default value [*], press the Enter key or enter the selected number: 1.

Use '/usr/bin/gcc-3.4' to provide 'gcc ".

So far, the compilation is successful.

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.