Cross Toolchains in the archive
Debian has long had useful cross-building support, but has never had general cross-compilers for release architectures in the archive. They have always been built by users, or by outside entities like the long-standing emdebian.org cross-compiler collection.
It would be a lot more convenient for users if cross-toolchains were available within the archive like any other package.
We already have good support in dpkg, apt and sbuild for cross-building and installation of cross build-dependencies. And there is support for autotools and cmake cross-setup in dpkg-cross. It just needs the cross-toolchain packages themselves and some support bits and pieces (like a crosbuild-essential package) to make cross-building very slick in Debian. Much of this work has already been demonstrated in Ubuntu and it would be good to get it properly upstream.
The Cross Toolchain team on Alioth was re-invigorated at Debconf13 to get this work done.
The thing that has kept cross-compilers out for many years is that the build has cross-architecture dependencies (needs libc:$DEB_HOST_ARCH and libgcc:$DEB_HOST_HOST). Now that Multi-arch is done this problem can be cleanly solved. It is possible to build cross-compilers without multiarch support, as has been demonstrated in Ubuntu but using it provides cleaner support and simpler packaging.
- The hard parts have already been done in the Multiarch support.
- The cross-toolchain builds should not be part of the normal binutils and gcc packaging, as the large matrix of builds (potentially up to the square of all architectures, fortunately many are not really useful) provides too many opportunities for build failures which would get in the way of normal gcc and binutils updates.
- Buildds need to allow cross-architecture dependencies. This was agreed in a multi-arch meeting at Banja Luka
- Adding a crossbuild-essential package to easily bring in the right packages is very helpful, but not essential.
- A crossbuild-support package (or similar name) should be made from the useful parts of dpkg-cross, keeping the autoconf and cmake variable setup and cache seeding, but dropping the library-munging functionality.
Wookey Doko Paul Wise
mailing list: email@example.com
Support for crossbuild-essential already exists in build-essential. It just needs enabling and uploading once the packages it depends on exist. 766551
The Cross-binutils package went into unstable on 2014-07-02 and testing on 2014-09-22. The source is at https://alioth.debian.org/scm/browser.php?group_id=100609 which builds all the binutils-<triplet> packages
- Cross-gcc packages (one per host architecture) went into unstable on 2014-10-22. These packages have foreign-arch dependencies.
- The cross-gcc-defaults package provides versioning symlinks (so arm-linux-gnueabi-gcc points to arm-linux-gnueabi-gcc-4.9, for example). This entered unstable on 2014-10-26.
- Multiarch-enabled buildds are needed for the cross-gcc packages. Support was added in sbuild 0.64.3, which went into unstable on 2014-09-30, and testing on 2014-10-08. Better support is in sbuild 0.65, which went into unstable on 2014-10-17.
Dpkg support for cross-translatable build-deps (B-D: gcc-4.6 mapped to B-D: gcc-arm-linux-gnueabi-4.6) is not specced or done. Proposal here: CrossTranslatableBuildDeps, discussed, and changed as agreed in https://wiki.debian.org/Sprints/2014/BootstrapSprint/Results Section 4.1
Wanna-build needs to understand cross-arch dependencies to build more than the uploaded architecture (mostly just ask dose in the right way, which already knows about this). 770925
- Britney needs to understand cross-arch dependencies for packages with arch-specific dependencies to migrate. This work is not yet done.
Co-installable toolchains would be nice too, but is an optional extra: https://wiki.debian.org/CoinstallableToolchains . Also covered in https://wiki.debian.org/Sprints/2014/BootstrapSprint/Results section 3.11