Share a key compile shell script code to install GCC

Source: Internet
Author: User

Today, I saw an article with a shell script and a makefile that would automatically download all of the required packages and compile GCC:

The code is as follows Copy Code
$ # Download the scripts using wget.
$ mkdir/opt/gcc-4.9.2
$ cd/opt/gcc-4.9.2
$ wget http://projects.joelinoff.com/gcc-4.9.2/bld.sh
$ wget Http://projects.joelinoff.com/gcc-4.9.2/Makefile
$ chmod a+x bld.sh
$ make
[Output SNIPPED]
$ # The compiler is installed In/opt/gcc-4.9.2/rtf/bin

I tried it, and it was very convenient indeed. As long as there is a computer can be connected to the network. Interested friends can give it a try.

P.s.:
(1) When compiling libiconv there may be "' gets ' undeclared here" error, please refer to this article.
(2) If the machine is 64-bit, but a 32-bit library file is missing. This will cause an error when compiling GCC: "configure:error:i suspect your system does not have 32-bit (developement and libraries). If you have them, rerun configure With–enable-multilib. If you don't have them, and want to build a 64-bit-only compiler, rerun configure. Prompts you to configure "--disable-multilib".

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.