Summary

This specification describes the requirements for cross compilers packages.

Release Note

Rationale

  • review whether the current packages are meeting the needs of the target audience
  • identify any other high-demand targets that should be supported in the Ubuntu archive (linux-arm-none?)
  • integrate with multiarch for natty

Provide cross-compilers for various use cases such as:

  • building the kernel for kernel developers
  • building bootloaders on i386 into arch: all packages
  • cross build any particular package
  • cross build bare metal binaries for Cortex-M microcontrollers

User stories

  • Amit would like to cross-compile the kernel for ARM, he would like a cross-compiler as close to the native armel toolchain as possible, but just an apt-get install away. He simply installs the armel cross-compiler packages from the archive and voila!
  • Nicolas would like to cross-build a single package with xdeb (see the xdeb spec), he wants the results to be identical to a native build and doesn't want to have to build the toolchain by hand. He install the armel cross-compiler packages which were built using the same sources as the native armel toolchain and he can already start cross-building packages.
  • James would like to ship a cross-compiler disguised as a native compiler in the new ARM SDK he is working on. He can rely on the pre-build cross-compiler binaries for his SDK.
  • Srinivasa would like to build his own cross-compiler packages for a new architecture which doesn't exist yet and which needs to be bootstraped. He can easily create a new source package which will give him a full cross-compiler as .debs for his new architecture.
  • Michael would like to build application for his Cortex-M3 based microcontroller. He installs the bare metal armel cross-compiler packages which were built using the same sources as the native armel toolchain and he can already start cross-building.

Assumptions

  • Cross-compilers are built using the same rules as the native toolchain, extending the logic to cover for the cross-compiler use case rather than duplicating it.
  • Natty switches to be multiarch based.

Implementation

  • PPA with backports for 10.04 'lucid' LTS and 10.10 'maverick' will be provided
    • gcc-4.5 only (no gcc-4.4 as it will stop being supported in middle of 'natty' cycle)
    • versions from 'natty' will be used
  • tarballs with cross toolchain will be provided - probably using sysroot to make things easier
  • arm-linux-none compiler for building bootloaders/kernels

Test/Demo Plan

  • Cross-build the kernel and a couple of packages with the new cross-compilers.

Unresolved issues

  • --with-multilib-list support for ARM is missing - upstream has it only for SH architecture

BoF agenda and discussion

Agenda:

  • review whether the current packages are meeting the needs of the target audience
    • kernel compilation
    • packages compilation (using xdeb or other tools)
    • bootloaders compliation
    • other?
  • identify any other high-demand targets that should be supported in the Ubuntu archive
    • arm-linux-none? (for kernel, u-boot)
    • arm bare metal? (for Cortex-M/R families)
      • libmaple for integration
      • no estimation yet of how much work is involved - we should investigate this before committing to do the work, but it's potentially a low cost-benefit ratio and worth picking up
  • flavours of toolchain
    • softfp is default in Ubuntu
    • hardfp is used by Nokia for Maemo6 and will be default in MeeGo

    • armv5/6 toolchains?
  • why is multilib disabled for the linux targets in gcc?
    • desired multilib options:
      • armv4t
      • armv7, four flavors: NEON or vfp, softp or hardfp
  • current toolchain follows the Ubuntu versions, targeting the same ABI, options (softfp, armv7 etc)
    • this is a problem for users; they need a cross-compiler targeting the current linaro development work running on the most recent *stable* Ubuntu release. So it's important to continue providing backports of the toolchain packages.
    • 2-3 days of work the first time through to prepare a backport patch so that the eglibc, gcc packages included in the ppa only generate the -source binary packages instead of tainting the rest of the system when pulling from that ppa.
    • will always provide binaries for the current Ubuntu devel release, the most recent stable Ubuntu release, and the most recent Ubuntu LTS release
  • integrate with multiarch for natty (multiarch is other session)
    • (dpkg-cross to be replaced with multiarch)
  • people using scratchbox2 to cross-compile need compilers that install anywhere *other* that /usr/arm-linux-gnueabi
  • provide a cross-compiler that can be used in a "dumb" mode that ignores the system libraries, for use when targeting things other than the current linaro
  • relocatable tarball?

Actions

  • follow up on the possibility of multilib gcc builds
  • prepare backport patches to get only *-source binary packages
  • provide a tarball extracted from the .deb packages?

Platform/DevPlatform/Specs/LinaroCrossCompilers (last modified 2011-01-27 07:32:58)