This page describes the basic toolchain, for C, C++, ObjC, ObjC++ and Fortran development. It does not cover development tools for other languages like Java, Python, Perl, etc.
- Toolchain Components
- Multiarch and multilib configurations
- Toolchain Sources
- Toolchain Updates
- Issue Tracking
- Cross development toolchain
GCC is packaged by major/minor version. The source packages are called gcc-4.8, gcc-4.9, etc. Some language frontends are built from a separate "source" package to reduce the build and test time of these packages (gnat-4.9).
The default (recommended) GCC version is packaged as the gcc-defaults package, building binary packages gcc, g++, gfortran, etc.
A development snapshot of GCC is available in the gcc-snapshot package.
Starting with the Ubuntu 11.10 (maverick) release, the GCC packages are based on the Linaro-GCC branch. The branch is used to build the packages on all architectures.
Starting with the Ubuntu 14.04 LTS (trusty) release, the GCC packages are based on the Linaro branch for the armhf and arm64 architectures.
Ubuntu sets some compiler flags differently compared to the GCC upstream releases. These changed flags are described in ToolChain/CompilerFlags.
kernel headers for user space packages
Kernel headers for user space packages (linux-libc-dev) are built from the linux source package.
Multiarch and multilib configurations
GCC is configured to build more than one variant for its runtime libraries on various architectures. Each multilib variant is mapped to a multiarch configuration.
- amd64: bi-arch 64bit/32bit multilib, defaulting to x86_64-linux-gnu. Starting with 13.04, this is tri-arch with x32 multilibs are available.
- i386: bi-arch 32bit/64bit multilib, defaulting to i686-linux-gnu (multiarch name is i386-linux-gnu). Starting with 13.04, this is tri-arch with x32 multilibs are available.
- powerpc: bi-arch 32bit/64bit multilib, defaulting to powerpc-linux-gnu.
- ppc64el: ppc64 ELFv2 ABI, little endian, defaulting to powerpc64le-linux-gnu.
- armel: soft-float ABI / hard-float ABI, defaulting to arm-linux-gnueabi.
- armhf: hard-float ABI / soft-float ABI, defaulting to arm-linux-gnueabihf.
Starting with Ubuntu 11.10, the multiarch name can be queried using gcc --print-multiarch (integrated upstream in GCC 4.7).
Compiler search paths
Some configuration systems assume fixed paths for libraries and include files, which may not work with the new multiarch locations. Instead of directly searching a set of known directories, it's better to let the compiler search for these.
Libraries are searched by default in the libraries path ( gcc --print-search-dirs).
The include search path can be seen with gcc -v -E - < /dev/null 2>&1 | awk '/^#include/,/^End of search/' | grep '^ '.
The toolchain packages are built from upstream releases and include support to build from vendor branches as found in the upstream repositories.
- GCC is built from the FSF sources and currently (GCC 4.9) carries patches to build from the Linaro branch.
- binutils is built from the FSF sources, either from the current release branch, or the trunk. When built from the release branch, updates from vendor branches are incorporated.
- glibc is built from FSF sources (starting with 2.19).
- gdb is built from FSF sources, and includes patches from vendor branches.
The binutils and GCC packages are rarely updated in stable release updates. Newer versions of the toolchain packages can be found in PPAs instead.
Planning and decisions for updating binutils and GCC are usually made six months before a new release cycle starts. Initial uploads are done as part of the NewReleaseCycleProcess. GCC and binutils are updated during the release cycle.
- New Linaro GCC releases are incorporated until feature freeze. (These releases may introduce new features, optimizations, etc.) After feature freeze, the stable Linaro GCC releases are merged (bug fixes only).
- Merges from the stable GCC release branches are merged until around the first beta release (regression fixes only).
A new glibc version is usually packaged after the upstream release, which currently happens to be about two months after the start of an Ubuntu release cycle.
New patches to any of these packages should go upstream first, either to the FSF, or to a vendor branch.
Updated toolchain packages can be found in two PPAs.
https://launchpad.net/~ubuntu-toolchain-r/+archive/ppa hosts updates from release branches (e.g. Ubuntu 14.04 LTS released with gcc-4.8.2 and the PPA has gcc-4.8.3).
https://launchpad.net/~ubuntu-toolchain-r/+archive/test hosts newer upstream versions (e.g. gcc-4.9 is found here for Ubuntu 14.04 LTS).
The following tags are used for toolchain related bug reports:
- ice: An internal compiler error.
- work-around: A bug report which should be kept open when working around a toolchain issue in another package.
- ppa: An issue which is only seen with packages from the ubuntu-toolchain-r PPAs.
Cross development toolchain
Cross toolchain packages are built from the very same sources as native versions, and the same patches like the native toolchain packages.
Cross toolchain packages are available on i386 and amd64 starting with the Ubuntu 10.10 release (maverick), targeting armel (-mfloat-abi=softfp). Starting with Ubuntu 11.10 (oneiric) armhf (-mfloat-abi=hard) is also provided.
Starting with Ubuntu 13.04, cross toolchain packages are provided on amd64 and i386 targeting armel, armhf, arm64 and powerpc.
Starting with Ubuntu 14.04, cross toolchain packages are provided on amd64 and i386 targeting armel, armhf, arm64, ppc64el and powerpc; on ppc64el a cross toolchain is provided for powerpc, on arm64 a cross toolchain is provided for armhf.
The default (recommended) GCC version is packaged as the gcc-defaults-armel-cross package, building binary packages gcc-arm-linux-gnueabi, g++-arm-linux-gnueabi, gfortran-arm-linux-gnueabi, etc.
kernel headers for user space packages
Kernel headers for user space packages (linux-libc-dev-armel-cross) are built from the linux source package.