TEXT   39

arm m cross compilers

Guest on 28th May 2022 03:10:08 PM

  1. Improve packaging of cross-compilers
  2.  
  3. Overall goal: try to script creation of cross-compiler packages and allow in archive cross-compilers (and not out of archive + manually built)
  4.  
  5. - Improve support for -sysroot
  6. - Merge the binary-cross target into binary for e.g. gcc
  7. - Other simplifications of gcc/binutils etc. packaging to allow replacing these
  8. - Provide .dsc + .diff.gz etc. in the -source packages.
  9.  
  10. First goal:
  11.  
  12.  - have x-compiler packages of the same version and targeting the same toolchain as the native compilers
  13.  - compiler targeting arm running on x86 obvious first goal
  14.  - also can target e.g. uclibc
  15.  
  16. existing approach: dpkg-cross, other highly manual approaches.
  17.  
  18. Can't run it in build environment because you can't build-depend on arm versions
  19. of packages.
  20.  
  21. Bootstrap from source:
  22. linux
  23. binutils
  24. gcc
  25. eglibc
  26. gcc
  27. eglibc
  28. gcc
  29.  
  30. Emdebian bootstrap:
  31. dpkg-cross <long list>
  32. binutils
  33. gcc binary-cross
  34. eglibc binary-cross
  35.  
  36.  
  37. Bootstrap of cross-compiler requires building glibc-initial, then gcc-cross-initial, glibc, gcc-cross.
  38.  
  39. 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
  40.  
  41. Check how gcc-mingw32 is done?
  42. - support is split into few packages:
  43.   * mingw32-runtime (headers + libraries)
  44.   * mingw32-binutils
  45.   * mingw32 (cross compiler)
  46.  
  47. Want to have the native and cross- packaging for gcc as similar as possible.
  48.  - perhaps don't need to mangle the binary names and have things like gcc-defaults
  49.    - but maybe we want to anyway
  50.  
  51. Use case for build-depending on x-compiler: targeting nolibc (?)
  52.  -
  53.  
  54. Need/opportunity to refactor/simplify gcc packaging because we want the rules to build the cross compiler and native compiler to be similar.
  55.  
  56. We currently have binary packages gcc-4.4-source which contain the debianized source tree of the gcc build, but not the dsc.
  57. If we provide the .dsc we know that building the package is easier.
  58. Need to provide -source packages for build dependencies of the cross compiler, would be nice if they could all be built the same way.
  59.  
  60. Need to move to using sysroot rather than configuring the cross toolchain at build time and using dpkg -i a lot (?)
  61.  
  62. sysroot or multiarch?
  63.  
  64. gcc 4.5 packaging uses sysroot already
  65. OpenEmbedded moved to sysroot too
  66.  
  67.  
  68. Dependencies:
  69. # download armel toolchain debs to dpkg-cross them
  70. # linux headers
  71. wget http://ports.ubuntu.com/ubuntu-ports/pool/main/l/linux/linux-libc-dev_2.6.32-17.26_armel.deb
  72. # gcc-4.4 runtime lib (eglibc and gmp runtime dep)
  73. wget http://ports.ubuntu.com/ubuntu-ports/pool/main/g/gcc-4.4/libgcc1_4.4.3-4ubuntu4_armel.deb
  74. wget http://ports.ubuntu.com/ubuntu-ports/pool/main/g/gcc-4.4/libstdc++6_4.4.3-4ubuntu4_armel.deb
  75. # eglibc runtime lib and headers
  76. wget http://ports.ubuntu.com/ubuntu-ports/pool/main/e/eglibc/libc6_2.11.1-0ubuntu5_armel.deb
  77. wget http://ports.ubuntu.com/ubuntu-ports/pool/main/e/eglibc/libc6-dev_2.11.1-0ubuntu5_armel.deb
  78. # zlib1g runtime lib and headers (gcc-4.4 build-dep)
  79. wget http://ports.ubuntu.com/ubuntu-ports/pool/main/z/zlib/zlib1g_1.2.3.3.dfsg-15ubuntu1_armel.deb
  80. wget http://ports.ubuntu.com/ubuntu-ports/pool/main/z/zlib/zlib1g-dev_1.2.3.3.dfsg-15ubuntu1_armel.deb
  81. # mpfr runtime lib and headers (gcc-4.4 build-dep)
  82. wget http://ports.ubuntu.com/ubuntu-ports/pool/main/m/mpfr/libmpfr1ldbl_2.4.2-3ubuntu1_armel.deb
  83. wget http://ports.ubuntu.com/ubuntu-ports/pool/main/m/mpfr/libmpfr-dev_2.4.2-3ubuntu1_armel.deb
  84. # gmp runtime lib and headers (mpfr dep)
  85. wget http://ports.ubuntu.com/ubuntu-ports/pool/main/g/gmp/libgmp3c2_4.3.2+dfsg-1ubuntu1_armel.deb
  86. wget http://ports.ubuntu.com/ubuntu-ports/pool/main/g/gmp/libgmpxx4ldbl_4.3.2+dfsg-1ubuntu1_armel.deb
  87. wget http://ports.ubuntu.com/ubuntu-ports/pool/main/g/gmp/libgmp3-dev_4.3.2+dfsg-1ubuntu1_armel.deb
  88.  
  89. What languages to build cross compilers for?
  90.  - demand driven, or keep things equivalent?
  91.  - some things easy (obj-c) some things hard (java)
  92.  - really only needs C and C++
  93.  - could target everything which is in main: C, C++, Fortran
  94.  
  95. also see: discussion of how to break build-dependency loops
  96.  https://blueprints.edge.launchpad.net/ubuntu-arm/+spec/arm-m-automated-bootstrap
  97.  
  98. pbuilder?
  99. apt-cross?
  100.  
  101. Problem looming with gcc runtime libraries between
  102.  
  103. == ACTIONS ==
  104.  
  105.  * 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
  106.  * lool to look into replacing dh_movefiles in the gcc packaging

Raw Paste


Login or Register to edit or fork this paste. It's free.