- Improve packaging of cross-compilers
- Overall goal: try to script creation of cross-compiler packages and allow in archive cross-compilers (and not out of archive + manually built)
- - Improve support for -sysroot
- - Merge the binary-cross target into binary for e.g. gcc
- - Other simplifications of gcc/binutils etc. packaging to allow replacing these
- - Provide .dsc + .diff.gz etc. in the -source packages.
- First goal:
- - have x-compiler packages of the same version and targeting the same toolchain as the native compilers
- - compiler targeting arm running on x86 obvious first goal
- - also can target e.g. uclibc
- existing approach: dpkg-cross, other highly manual approaches.
- Can't run it in build environment because you can't build-depend on arm versions
- of packages.
- Bootstrap from source:
- linux
- binutils
- gcc
- eglibc
- gcc
- eglibc
- gcc
- Emdebian bootstrap:
- dpkg-cross <long list>
- binutils
- gcc binary-cross
- eglibc binary-cross
- Bootstrap of cross-compiler requires building glibc-initial, then gcc-cross-initial, glibc, gcc-cross.
- Could build e.g. glibc-arm package that could be installable on x86, but it would be ugly to provide an arm package as arch: all
- Check how gcc-mingw32 is done?
- - support is split into few packages:
- * mingw32-runtime (headers + libraries)
- * mingw32-binutils
- * mingw32 (cross compiler)
- Want to have the native and cross- packaging for gcc as similar as possible.
- - perhaps don't need to mangle the binary names and have things like gcc-defaults
- - but maybe we want to anyway
- Use case for build-depending on x-compiler: targeting nolibc (?)
- -
- Need/opportunity to refactor/simplify gcc packaging because we want the rules to build the cross compiler and native compiler to be similar.
- We currently have binary packages gcc-4.4-source which contain the debianized source tree of the gcc build, but not the dsc.
- If we provide the .dsc we know that building the package is easier.
- Need to provide -source packages for build dependencies of the cross compiler, would be nice if they could all be built the same way.
- Need to move to using sysroot rather than configuring the cross toolchain at build time and using dpkg -i a lot (?)
- sysroot or multiarch?
- gcc 4.5 packaging uses sysroot already
- OpenEmbedded moved to sysroot too
- Dependencies:
- # download armel toolchain debs to dpkg-cross them
- # linux headers
- wget http://ports.ubuntu.com/ubuntu-ports/pool/main/l/linux/linux-libc-dev_2.6.32-17.26_armel.deb
- # gcc-4.4 runtime lib (eglibc and gmp runtime dep)
- wget http://ports.ubuntu.com/ubuntu-ports/pool/main/g/gcc-4.4/libgcc1_4.4.3-4ubuntu4_armel.deb
- wget http://ports.ubuntu.com/ubuntu-ports/pool/main/g/gcc-4.4/libstdc++6_4.4.3-4ubuntu4_armel.deb
- # eglibc runtime lib and headers
- wget http://ports.ubuntu.com/ubuntu-ports/pool/main/e/eglibc/libc6_2.11.1-0ubuntu5_armel.deb
- wget http://ports.ubuntu.com/ubuntu-ports/pool/main/e/eglibc/libc6-dev_2.11.1-0ubuntu5_armel.deb
- # zlib1g runtime lib and headers (gcc-4.4 build-dep)
- wget http://ports.ubuntu.com/ubuntu-ports/pool/main/z/zlib/zlib1g_1.2.3.3.dfsg-15ubuntu1_armel.deb
- wget http://ports.ubuntu.com/ubuntu-ports/pool/main/z/zlib/zlib1g-dev_1.2.3.3.dfsg-15ubuntu1_armel.deb
- # mpfr runtime lib and headers (gcc-4.4 build-dep)
- wget http://ports.ubuntu.com/ubuntu-ports/pool/main/m/mpfr/libmpfr1ldbl_2.4.2-3ubuntu1_armel.deb
- wget http://ports.ubuntu.com/ubuntu-ports/pool/main/m/mpfr/libmpfr-dev_2.4.2-3ubuntu1_armel.deb
- # gmp runtime lib and headers (mpfr dep)
- wget http://ports.ubuntu.com/ubuntu-ports/pool/main/g/gmp/libgmp3c2_4.3.2+dfsg-1ubuntu1_armel.deb
- wget http://ports.ubuntu.com/ubuntu-ports/pool/main/g/gmp/libgmpxx4ldbl_4.3.2+dfsg-1ubuntu1_armel.deb
- wget http://ports.ubuntu.com/ubuntu-ports/pool/main/g/gmp/libgmp3-dev_4.3.2+dfsg-1ubuntu1_armel.deb
- What languages to build cross compilers for?
- - demand driven, or keep things equivalent?
- - some things easy (obj-c) some things hard (java)
- - really only needs C and C++
- - could target everything which is in main: C, C++, Fortran
- also see: discussion of how to break build-dependency loops
- https://blueprints.edge.launchpad.net/ubuntu-arm/+spec/arm-m-automated-bootstrap
- pbuilder?
- apt-cross?
- Problem looming with gcc runtime libraries between
- == ACTIONS ==
- * lool to check reverse-build-deps in Debian of the tools source packages, to verify whether they'll be ok to transition to a common approach of shipping full Debian source packages (.dsc) in the binary package
- * lool to look into replacing dh_movefiles in the gcc packaging