Co-installable Compilers

It is useful to be able to install compilers built for more than one architecture side by side (e.g. amd64 and i386). This page describes a rearrangement of the packaging which allows that. This scheme also nicely enables cross-compilers using the same layout.

<ver> on this page refers to the gcc version number, currently 4.7 or 4.8.

<triplet> refers to the GNU triplet (e.g. arm-linux-gnueabi)

Concept

Currently we can install gcc-<ver> and gcc-<ver>-<triplet> but you can't install gcc:i386 and gcc:amd64

This is useful (for example because ghc depends on gcc and wanting to install ghc:i386 or ghc:x32 to use less RAM makes a lot of sense). Not a high priority, but is useful and removes arbitrary distinction between compiler and cross-compiler. Makes things nice and orthogonal.

gcc-<ver> is MA:none and cannot simply be made MA:foreign, because it only works properly on the main arch.

ghc:i386 needs gcc(core):i386 but leaving gcc(core):amd64 installed

Currently we have:

so instead we have these packages containing the actual compilers:

gcc-<ver>-x86_64-linux-gnu
gcc-<ver>-i386-linux-gnu
gcc-<ver>-arm-linux-gnueabihf

etc

The user installs gcc-ver (arch:any) which is now just symlinks to gcc-<ver>-<triplet> with TARGET=HOST. so gcc-<ver>-TARGET:HOST ('actual compilers' packages) are MA:foreign

gcc-ver:HOST is MA:none, arch:any, depends on gcc-ver-HOST

So we should be able to install:

at the same time.

Example patch for tcc: 695354

gcc bug: 666743