config 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. # vim: filetype=yaml sw=2
  2. filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'
  3. # Note: When updating the gcc version, if this includes a libstdc++
  4. # ABI change we should also update projects/firefox/abicheck.cc to
  5. # require the new version.
  6. version: 10.3.0
  7. var:
  8. container:
  9. use_container: 1
  10. # TODO: Upgrade to a glibc that works out of the box with GCC 8.3.0 (blocked
  11. # by upgrading Debian to something newer than Wheezy due to the GNU Make
  12. # dependency).
  13. glibc_version: 2.26
  14. glibc_hash: e54e0a934cd2bc94429be79da5e9385898d2306b9eaf3c92d5a77af96190f6bd
  15. linux_version: 4.10.1
  16. distdir: gcc
  17. deps:
  18. - build-essential
  19. - libmpc-dev
  20. setup: |
  21. mkdir -p /var/tmp/dist
  22. tar -C /var/tmp/dist -xf $rootdir/[% c("compiler_tarfile") %]
  23. export PATH="/var/tmp/dist/[% c("var/distdir") %]/bin:$PATH"
  24. [% IF ! c("var/linux-cross") -%]
  25. export LD_LIBRARY_PATH=/var/tmp/dist/[% c("var/distdir") %]/lib64:/var/tmp/dist/[% c("var/distdir") %]/lib32
  26. [% END -%]
  27. [% IF c("hardened_gcc") -%]
  28. # Config options for hardening-wrapper
  29. export DEB_BUILD_HARDENING=1
  30. export DEB_BUILD_HARDENING_STACKPROTECTOR=1
  31. export DEB_BUILD_HARDENING_FORTIFY=1
  32. export DEB_BUILD_HARDENING_FORMAT=1
  33. export DEB_BUILD_HARDENING_PIE=1
  34. # Make sure we use the hardening wrapper
  35. pushd /var/tmp/dist/[% c("var/distdir") %]/bin
  36. cp /usr/bin/hardened-cc ./
  37. mv [% c("var/target_prefix") %]gcc [% c("var/target_prefix") %]gcc.real
  38. mv [% c("var/target_prefix") %]c++ [% c("var/target_prefix") %]c++.real
  39. mv [% c("var/target_prefix") %]g++ [% c("var/target_prefix") %]g++.real
  40. ln -sf hardened-cc [% c("var/target_prefix") %]gcc
  41. ln -sf hardened-cc [% c("var/target_prefix") %]c++
  42. ln -sf hardened-cc [% c("var/target_prefix") %]g++
  43. popd
  44. [% END -%]
  45. targets:
  46. windows:
  47. var:
  48. configure_opt: --disable-multilib --enable-languages=c,c++
  49. arch_deps:
  50. - libc6-dev
  51. - zlib1g-dev
  52. linux:
  53. hardened_gcc: 1
  54. var:
  55. configure_opt: --enable-multilib --enable-languages=c,c++ --with-arch_32=i686
  56. arch_deps:
  57. - hardening-wrapper
  58. - libc6-dev-i386
  59. linux-cross:
  60. var:
  61. target_prefix: '[% c("var/crosstarget") %]-'
  62. distdir: gcc-cross
  63. arch_deps:
  64. - hardening-wrapper
  65. - libc6-dev-i386
  66. - gawk
  67. linux-arm:
  68. var:
  69. configure_opt: --disable-multilib --enable-languages=c,c++ --target=arm-linux-gnueabihf --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb
  70. linux-ppc64le:
  71. var:
  72. configure_opt: --disable-multilib --enable-languages=c,c++ --target=powerpc64le-linux-gnu --with-cpu=power8 --with-long-double-128
  73. glibc_version: 2.28
  74. glibc_hash: b1900051afad76f7a4f73e71413df4826dce085ef8ddb785a945b66d7d513082
  75. # bison required by glibc 2.28
  76. arch_deps:
  77. - hardening-wrapper
  78. - libc6-dev-i386
  79. - gawk
  80. - bison
  81. # Workaround for bug fixed by https://github.com/bminor/glibc/commit/18363b4f010da9ba459b13310b113ac0647c2fcc
  82. # TODO: Remove this workaround after we upgrade to glibc v2.31
  83. glibc_extra_configure_opt: "CFLAGS='-O2 -fcommon'"
  84. input_files:
  85. - project: container-image
  86. - URL: 'https://ftp.gnu.org/gnu/gcc/gcc-[% c("version") %]/gcc-[% c("version") %].tar.xz'
  87. sha256sum: 64f404c1a650f27fc33da242e1f2df54952e3963a49e06e73f6940f3223ac344
  88. - name: binutils
  89. project: binutils
  90. enable: '[% c("var/linux-cross") -%]'
  91. - URL: 'https://ftp.gnu.org/gnu/glibc/glibc-[% c("var/glibc_version") %].tar.xz'
  92. sha256sum: '[% c("var/glibc_hash") %]'
  93. enable: '[% c("var/linux-cross") -%]'
  94. - URL: 'https://www.kernel.org/pub/linux/kernel/v4.x/linux-[% c("var/linux_version") %].tar.xz'
  95. sha256sum: 6ca06bb5faf5f83600d7388bb623dae41df2a257de85ad5d1792e03302bc3543
  96. enable: '[% c("var/linux-cross") -%]'