The gcc package probably contains the compiler proper, e.g. files /usr/bin/gcc and directory /usr/lib/gcc/x86_64-linux-gnu/4.8/ (which contains the cc1 executable).

The /usr/bin/gcc program starts cc1 (or cc1plus etc...) to compile your source code *.c, and also as to translate cc1-generated assembly code (produced by cc1) into object file *.o, and at last ld to link.

Compile once with gcc -v to understand what is happening, it would show the really executed binaries. Notice that gcc is only a driving program (starting other executables like cc1, as, ld ...)

The as and ld programs are provided by binutils -which is needed to compile.

So the binutils package is a required dependency for the gcc package (with many other dependencies, probably including libc and libc-devel, but if you really want you could use some other libc like MUSL libc; the libc is generally providing the dynamic linker like /lib/ld-linux.so*).

Learn how to use rpm (on Centos, or dpkg on Ubuntu & Debian) to query the dependencies between packages.

For development you probably want some other packages. Debian has the build-essential virtual package. Probably CentOS has an equivalent. And you'll surely want to use some libraries (and you want the development packages for them, e.g. on Debian libcurl4-gnutls-dev to develop with the libcurl HTTP client library). See also this answer (for Ubuntu and Debian, but you can adapt it for CentOS).

In 2021 you want to use GCC 10 at least, as g++ -Wall -Wextra -g and you could decide to code your own GCC plugin (checking some coding rules in your C++ code; you also want to document your coding conventions by writing). Be aware of the rule of five.

Answer from Basile Starynkevitch on Stack Overflow
🌐
Gentoo
packages.gentoo.org › packages › sys-libs › binutils-libs › dependencies
sys-libs/binutils-libs – Gentoo Packages
https://sourceware.org/binutils/ 9999 · 2.44 · 2.43-r3 · 2.42-r2 · 2.41-r5 · 2.40-r7 · 2.39-r5 · 2.38-r2 · 2.37_p1-r2 · 2.36.1-r2 · 2.35.2 · 2.34-r2 · The dependencies are regularly computed based on the qa-reports.
🌐
Gentoo
packages.gentoo.org › packages › sys-devel › binutils › dependencies
sys-devel/binutils – Gentoo Packages
https://sourceware.org/binutils/ 9999 · 2.45.9999 · 2.45.1 · 2.45-r1 · 2.45 · 2.44-r4 · 2.43-r2 · 2.42-r2 · 2.41-r5 · 2.40-r9 · 2.39-r5 · 2.38-r2 · 2.37_p1-r2 · 2.36.1-r2 · 2.35.2 · 2.34-r2 · 2.33.1-r1 · 2.32-r2 · The dependencies are regularly computed based on the qa-reports.
Top answer
1 of 1
12

The gcc package probably contains the compiler proper, e.g. files /usr/bin/gcc and directory /usr/lib/gcc/x86_64-linux-gnu/4.8/ (which contains the cc1 executable).

The /usr/bin/gcc program starts cc1 (or cc1plus etc...) to compile your source code *.c, and also as to translate cc1-generated assembly code (produced by cc1) into object file *.o, and at last ld to link.

Compile once with gcc -v to understand what is happening, it would show the really executed binaries. Notice that gcc is only a driving program (starting other executables like cc1, as, ld ...)

The as and ld programs are provided by binutils -which is needed to compile.

So the binutils package is a required dependency for the gcc package (with many other dependencies, probably including libc and libc-devel, but if you really want you could use some other libc like MUSL libc; the libc is generally providing the dynamic linker like /lib/ld-linux.so*).

Learn how to use rpm (on Centos, or dpkg on Ubuntu & Debian) to query the dependencies between packages.

For development you probably want some other packages. Debian has the build-essential virtual package. Probably CentOS has an equivalent. And you'll surely want to use some libraries (and you want the development packages for them, e.g. on Debian libcurl4-gnutls-dev to develop with the libcurl HTTP client library). See also this answer (for Ubuntu and Debian, but you can adapt it for CentOS).

In 2021 you want to use GCC 10 at least, as g++ -Wall -Wextra -g and you could decide to code your own GCC plugin (checking some coding rules in your C++ code; you also want to document your coding conventions by writing). Be aware of the rule of five.

🌐
GitHub
github.com › actions › runner › issues › 2631
Dependencies no longer resolving for `binutils-dev` on ubuntu-20.04 worker · Issue #2631 · actions/runner
May 30, 2023 - Run sudo apt-get -y install libunwind-dev binutils-dev libiberty-dev sudo apt-get -y install libunwind-dev binutils-dev libiberty-dev shell: /usr/bin/bash -e {0} Reading package lists... Building dependency tree... Reading state information... The following NEW packages will be installed: binutils-dev libiberty-dev libunwind-dev 0 upgraded, 3 newly installed, 0 to remove and 14 not upgraded.
Author   actions
🌐
Gentoo
packages.gentoo.org › packages › sys-devel › binutils-hppa64 › dependencies
sys-devel/binutils-hppa64 – Gentoo Packages
https://sourceware.org/binutils/ 9999 · 2.45.1 · 2.45-r1 · 2.45 · 2.44-r3 · 2.43-r2 · 2.42-r2 · 2.41-r5 · 2.40-r7 · 2.39-r5 · 2.38-r2 · 2.37_p1-r2 · The dependencies are regularly computed based on the qa-reports.
🌐
GNU
sourceware.org › binutils › docs-2.28 › as › Machine-Dependencies.html
Machine Dependencies - Using as
Next: Reporting Bugs, Previous: Object Attributes, Up: Top · The machine instruction sets are (almost by definition) different on each machine where as runs. Floating point representations vary as well, and as often supports a few additional directives or command-line options for compatibility ...
🌐
GNU
gcc.gnu.org › legacy-ml › gcc › 2010-01 › msg00329.html
Gary Funck - GCC and binutils dependencies
January 15, 2010 - The issue was noted in this GCC PR: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40332 Since GCC 4.5 isn't out yet, I'm wondering what is the policy, or general rule that is followed with respect to a new version of GCC being dependent upon a particular version of binutils, or some important library?
🌐
Ui
community.ui.com › questions › How-do-I-install-the-newly-required-binutils-on-Ubuntu › e0545511-ba9b-4d51-b88c-8718a6f804f0
How do I install the newly required "binutils" on Ubuntu? | Ubiquiti Community
Odd. binutils is a normal package and should have been installed when unifi was installed. ... gapinski@5017a-ef:~$ aptitude show unifi Package: unifi New: yes State: installed Automatically installed: yes Version: 4.6.6-5426 Priority: optional Section: java Maintainer: UniFi developers <unifi-dev@ubnt.com> Architecture: all Uncompressed Size: 196 M Depends: mongodb-10gen (>= 2.0.0) | mongodb-server (>= 2.0.0), binutils, openjdk-6-jre-headless | openjdk-7-jre-headless, jsvc Conflicts: unifi-controller, unifi-controller Replaces: unifi-controller, unifi-controller Provides: unifi-controller Description: Ubiquiti UniFi server Ubiquiti UniFi server is a centralized management system for UniFi suite of devices.
🌐
GitHub
github.com › vmware › photon › issues › 420
Binutils dependencies are broken · Issue #420 · vmware/photon
January 21, 2016 - I ran into an issue with the version ... remove bison, binutils, and binutils-dev. Binutils does not include flex and does not have a dependency on it....
Author   vmware
Find elsewhere
🌐
Gentoo
packages.gentoo.org › packages › sys-devel › binutils-apple › dependencies
sys-devel/binutils-apple – Gentoo Packages
Darwin Xtools matching Xcode Tools binutils-apple · https://github.com/iains/darwin-xtools · 8.2.1-r103 · 8.2.1-r2 · 3.2.6-r1 · The dependencies are regularly computed based on the qa-reports.
🌐
Linux From Scratch
linuxfromscratch.org › lfs › view › development › appendices › dependencies.html
Appendix C. Dependencies
Test suite depends on: Binutils, Bison, Bzip2, DejaGNU, Diffutils, Expect, Findutils, Flex, GCC, Gettext, Gzip, Libtool, and Tar
🌐
GitHub
github.com › redox-os › binutils-gdb › blob › master › binutils › README
binutils-gdb/binutils/README at master · redox-os/binutils-gdb
By default Native Language Support will be enabled for binutils. On · some systems however this support is not present and can lead to error · messages such as "undefined reference to `libintl_gettext'" when · building there tools. If that happens the NLS support can be disabled · by adding the --disable-nls switch to the configure line like this: ... ${MAKE} $* ar_DEPENDENCIES= ar_LDADD='../bfd/*.o ../libiberty/*.o `if test -f ../intl/gettext.o; then echo '../intl/*.o'; fi`' ar
Author   redox-os
🌐
GNU
gnu.org › software › binutils
Binutils - GNU Project - Free Software Foundation
When a release is imminent a pre-release tarball is created in order to allow users a chance to preview the changes before they become official. These are available from here: https://sourceware.org/pub/binutils/snapshots/.
🌐
Arch Linux
archlinux.org › packages › core › x86_64 › binutils
Arch Linux - binutils 2.46+r70+g155188ea10a7-1 (x86_64)
View the file list for binutils · View the soname list for binutils · Copyright © 2002-2026 Judd Vinet, Aaron Griffin and Levente Polyák. The Arch Linux name and logo are recognized trademarks. Some rights reserved.
🌐
ArchWiki
wiki.archlinux.org › title › DeveloperWiki:Toolchain_maintenance › Binutils
DeveloperWiki:Toolchain maintenance/Binutils
May 16, 2021 - The second sequence of glibc -> binutils -> gcc is then required to build the toolchain itself with the new gcc. gcc is not necessarily needed here as it is the last item in the first sequence which therefore is build with all new tools already available.
🌐
GitHub
github.com › GameServerManagers › LinuxGSM › issues › 1435
[hwserver] binutils missing dependency on Debian · Issue #1435 · GameServerManagers/LinuxGSM
May 12, 2017 - Manually install dependencies. sudo dpkg --add-architecture i386; sudo apt-get update; sudo apt-get install binutils
Author   GameServerManagers
🌐
Phil-opp
os.phil-opp.com › cross-compile-binutils
Cross Compile Binutils | Writing an OS in Rust
The prefix argument selects the installation directory, you can change it if you like. But be careful that you do not overwrite your system’s binutils. The disable-nls flag disables native language support (so you’ll get the same english error messages). It also reduces build dependencies.
🌐
GNU
sourceware.org › binutils › docs › ld › libdep-Plugin.html
libdep Plugin (LD)
The GNU ar utility now supports a --record-libdeps option to embed dependency lists into static libraries as well, and the libdep plugin may be used to read this dependency information at link time. The dependency information is stored as a single string, carrying -l and -L arguments as they would normally appear in a linker command line.
🌐
GNU
sourceware.org › binutils › docs › binutils.html
GNU Binary Utilities
Specify dependencies of this library. The dependencies must immediately follow this option character, must use the same syntax as the linker command line, and must be specified within a single argument. I.e., if multiple items are needed, they must be quoted to form a single command line argument.
🌐
Gentoo
packages.gentoo.org › packages › sys-devel › binutils-config › reverse-dependencies
sys-devel/binutils-config – Gentoo Packages
Utility to change the binutils version being used · https://wiki.gentoo.org/wiki/Project:Toolchain · The reverse dependencies are regularly parsed from the qa-reports. The sources can be found at: rdepend · depend · bdepend ·