Difference between revisions of "Build GCC-4.9.1 under Ubuntu 14.04"

From GNU Tools - Wiki
Jump to: navigation, search
(Created page with "Follow the steps: * Run the command: $ cd * Download the source code for gcc-4.9.1: https://ftp.gnu.org/gnu/gcc/gcc-4.9.1/gcc-4.9.1.tar.bz2 * Create a new folder:...")
 
(No difference)

Latest revision as of 11:40, 13 June 2016

Follow the steps:

  • Run the command:
 $ cd
  • Download the source code for gcc-4.9.1:
  https://ftp.gnu.org/gnu/gcc/gcc-4.9.1/gcc-4.9.1.tar.bz2
  • Create a new folder:
  $ mkdir gcc
  • Copy the archive in the folder:
  $ cp ~/Downloads/gcc-4.9.1.tar.bz2 gcc
  • Extract the archive:
  $ cd gcc
  $ tar -jxvf gcc-4.9.1.tar.bz2
  • Change the current directory to gcc source folder and run the following command:
  $ cd gcc-4.9.1
  $ ./contrib/download_prerequisites
  • Return to the previous folder:
  $ cd ..
  • Create a new folder
  $ mkdir build
  • Change the current directory to build:
  $ cd build
  • Configure and build:
  $ sudo /home/<username>/gcc/gcc-4.9.1/configure --disable-multilib
  $ sudo make
  $ sudo make install