config 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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: 8.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. linux_version: 4.10.1
  15. distdir: gcc
  16. deps:
  17. - build-essential
  18. - libmpc-dev
  19. setup: |
  20. mkdir -p /var/tmp/dist
  21. tar -C /var/tmp/dist -xf $rootdir/[% c("compiler_tarfile") %]
  22. export PATH="/var/tmp/dist/[% c("var/distdir") %]/bin:$PATH"
  23. [% IF ! c("var/linux-cross") -%]
  24. export LD_LIBRARY_PATH=/var/tmp/dist/[% c("var/distdir") %]/lib64:/var/tmp/dist/[% c("var/distdir") %]/lib32
  25. [% END -%]
  26. [% IF c("hardened_gcc") -%]
  27. # Config options for hardening-wrapper
  28. export DEB_BUILD_HARDENING=1
  29. export DEB_BUILD_HARDENING_STACKPROTECTOR=1
  30. export DEB_BUILD_HARDENING_FORTIFY=1
  31. export DEB_BUILD_HARDENING_FORMAT=1
  32. export DEB_BUILD_HARDENING_PIE=1
  33. # Make sure we use the hardening wrapper
  34. pushd /var/tmp/dist/[% c("var/distdir") %]/bin
  35. cp /usr/bin/hardened-cc ./
  36. mv [% c("var/target_prefix") %]gcc [% c("var/target_prefix") %]gcc.real
  37. mv [% c("var/target_prefix") %]c++ [% c("var/target_prefix") %]c++.real
  38. mv [% c("var/target_prefix") %]g++ [% c("var/target_prefix") %]g++.real
  39. ln -sf hardened-cc [% c("var/target_prefix") %]gcc
  40. ln -sf hardened-cc [% c("var/target_prefix") %]c++
  41. ln -sf hardened-cc [% c("var/target_prefix") %]g++
  42. popd
  43. [% END -%]
  44. targets:
  45. windows:
  46. var:
  47. configure_opt: --disable-multilib --enable-languages=c,c++
  48. arch_deps:
  49. - libc6-dev
  50. - zlib1g-dev
  51. linux:
  52. hardened_gcc: 1
  53. var:
  54. configure_opt: --enable-multilib --enable-languages=c,c++ --with-arch_32=i686
  55. arch_deps:
  56. - hardening-wrapper
  57. - libc6-dev-i386
  58. linux-cross:
  59. var:
  60. target_prefix: '[% c("var/crosstarget") %]-'
  61. distdir: gcc-cross
  62. arch_deps:
  63. - hardening-wrapper
  64. - libc6-dev-i386
  65. - gawk
  66. linux-arm:
  67. var:
  68. 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
  69. input_files:
  70. - project: container-image
  71. - URL: 'https://ftp.gnu.org/gnu/gcc/gcc-[% c("version") %]/gcc-[% c("version") %].tar.xz'
  72. sha256sum: 64baadfe6cc0f4947a84cb12d7f0dfaf45bb58b7e92461639596c21e02d97d2c
  73. - name: binutils
  74. project: binutils
  75. enable: '[% c("var/linux-cross") -%]'
  76. - URL: 'https://ftp.gnu.org/gnu/glibc/glibc-[% c("var/glibc_version") %].tar.xz'
  77. sha256sum: e54e0a934cd2bc94429be79da5e9385898d2306b9eaf3c92d5a77af96190f6bd
  78. enable: '[% c("var/linux-cross") -%]'
  79. - URL: 'https://www.kernel.org/pub/linux/kernel/v4.x/linux-[% c("var/linux_version") %].tar.xz'
  80. sha256sum: 6ca06bb5faf5f83600d7388bb623dae41df2a257de85ad5d1792e03302bc3543
  81. enable: '[% c("var/linux-cross") -%]'