ToolChain

Differences between revisions 3 and 4
Revision 3 as of 2011-10-12 09:42:12
Size: 6751
Editor: 87-206-60-144
Comment: cross toolchain notes
Revision 4 as of 2011-10-12 16:00:03
Size: 6749
Editor: doko
Comment:
Deletions are marked like this. Additions are marked like this.
Line 21: Line 21:
[[https://launchpad.net/ubuntu/+source/binutils|binutils]] is built from upstream sources. The package is either built from an [[http://sourceware.org/binutils/|upstream] release, or from the [[http://sourceware.org/binutils/|upstream]] development trunk. [[https://launchpad.net/ubuntu/+source/binutils|binutils]] is built from upstream sources. The package is either built from an [[http://sourceware.org/binutils|upstream] release, or from the [[http://sourceware.org/binutils|upstream]] development trunk.

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

GCC

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.

Binutils

binutils is built from upstream sources. The package is either built from an upstream] release, or from the [[http://sourceware.org/binutils development trunk.

Glibc

Glibc is built from the Embedded GLIBC (EGLIBC) project, a variant of the GNU C Library (GLIBC). The source package in Ubuntu is called eglibc.

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.
  • i386: bi-arch 32bit/64bit multilib, defaulting to i686-linux-gnu (multiarch name is i386-linux-gnu).
  • 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 '^ '.

Toolchain Updates

The binutils and GCC packages are rarely update in stable release updates. Newer versions of the toolchain packages can be found in PPAs instead.

Distribution Packages

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.

PPA packages

Updated toolchain packages can be found in two PPAs.

Issue Tracking

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 usually same patches like the native toolchain packages (hardening patches were not enabled - bug 868924).

Available components

Since Ubuntu 10.10 (maverick) armel cross toolchain is available. For Ubuntu 11.10 (oneiric) armhf one is also provided.

GCC

GCC is packaged by major/minor version. The source packages are called gcc-4.4-armel-cross, gcc-4.6-armel-cross, etc.

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.

Packages are available starting with the Ubuntu 11.10 (maverick) release.

Binutils

binutils-arm-linux-gnueabi is built from upstream sources. The package is either built from an upstream] release, or from the [[http://sourceware.org/binutils/ development trunk.

kernel headers for user space packages

Kernel headers for user space packages (linux-libc-dev-armel-cross) are built from the linux source package.

ToolChain (last edited 2020-10-01 09:29:05 by rbalint)