×

Search anything:

Build and Install binutils from source

Internship at OpenGenus

Get this book -> Problems on Array: For Interviews and Competitive Programming

In this article, we have explored the steps to build Binutils from source code. With this, you can install any version of binutils and even try custom changes.

Table of contents:

  1. Step 1: Get source code of binutils
  2. Step 2: Configure binutils
  3. Step 3: Build and install binutils
  4. Summary of commands

Step 1: Get source code of binutils

git clone git://sourceware.org/git/binutils-gdb.git

OR

https://github.com/bminor/binutils-gdb.git

Once cloned, go into the source code:

cd binutils-gdb

Step 2: Configure binutils

CC=gcc ./configure

Step 3: Build and install binutils

make install

This will directly install binutils in default location such as /usr/local/bin, /usr/local/lib and others. This is the preferred way to make the newly built binutils available to the entire system.

To install it in your custom location, use the following command:

make

Summary of commands

The summary is as follows:

https://github.com/bminor/binutils-gdb.git
cd binutils-gdb
CC=gcc ./configure
make install

Once installed, check the version of binutils using one of the commands mentioned in this resource.

With this article at OpenGenus, you must be able to install any version of binutils and even, try your custom binutils changes.

OpenGenus Tech Review Team

OpenGenus Tech Review Team

The official account of OpenGenus's Technical Review Team. This team review all technical articles and incorporates peer feedback. The team consist of experts in the leading domains of Computing.

Read More

Improved & Reviewed by:


Geoffrey Ziskovin Geoffrey Ziskovin
Build and Install binutils from source
Share this