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.
GCC is packaged by major/minor version. The source packages are called gcc-4.4, gcc-4.6, etc. Some language frontends are built from a separate "source" package to reduce the build and test time of these packages (gdc-4.4, gcj-4.6, gnat-4.4).
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.
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.
- 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 (currently a local patch only).
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 binutils and GCC packages are rarely update 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.
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 10.04 LTS released with gcc-4.4.4 and the PPA has gcc-4.4.6).
https://launchpad.net/~ubuntu-toolchain-r/+archive/test hosts newer upstream versions (e.g. gcc-4.6 is found here for Ubuntu 10.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.
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.