config 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. deps:
  11. - build-essential
  12. - libmpc-dev
  13. setup: |
  14. mkdir -p /var/tmp/dist
  15. tar -C /var/tmp/dist -xf $rootdir/[% c("compiler_tarfile") %]
  16. export PATH="/var/tmp/dist/gcc/bin:$PATH"
  17. [% IF c("var/osname") == "linux-armhf" -%]
  18. export LD_LIBRARY_PATH=/var/tmp/dist/gcc/lib
  19. [% ELSE -%]
  20. export LD_LIBRARY_PATH=/var/tmp/dist/gcc/lib64:/var/tmp/dist/gcc/lib32
  21. [% END -%]
  22. [% IF c("hardened_gcc") -%]
  23. # Config options for hardening-wrapper
  24. export DEB_BUILD_HARDENING=1
  25. export DEB_BUILD_HARDENING_STACKPROTECTOR=1
  26. export DEB_BUILD_HARDENING_FORTIFY=1
  27. export DEB_BUILD_HARDENING_FORMAT=1
  28. export DEB_BUILD_HARDENING_PIE=1
  29. # Make sure we use the hardening wrapper
  30. pushd /var/tmp/dist/gcc/bin
  31. cp /usr/bin/hardened-cc ./
  32. mv gcc gcc.real
  33. mv c++ c++.real
  34. mv g++ g++.real
  35. ln -sf hardened-cc gcc
  36. ln -sf hardened-cc c++
  37. ln -sf hardened-cc g++
  38. popd
  39. [% END -%]
  40. targets:
  41. windows:
  42. var:
  43. configure_opt: --disable-multilib --enable-languages=c,c++
  44. arch_deps:
  45. - libc6-dev
  46. - zlib1g-dev
  47. linux:
  48. hardened_gcc: 1
  49. var:
  50. configure_opt: --enable-multilib --enable-languages=c,c++ --with-arch_32=i686
  51. arch_deps:
  52. - hardening-wrapper
  53. - libc6-dev-i386
  54. linux-armhf:
  55. var:
  56. configure_opt: --enable-multilib --enable-languages=c,c++ --with-system-zlib --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --build=[% c("var/gnu-build-triplet") %] --host=[% c("var/gnu-host-triplet") %] --target=[% c("var/gnu-host-triplet") %]
  57. arch_deps:
  58. - hardening-wrapper
  59. - libc6-dev
  60. - zlib1g-dev
  61. linux-arm64:
  62. hardened_gcc: 0
  63. var:
  64. configure_opt: --enable-multilib --enable-languages=c,c++ --with-system-zlib --build=[% c("var/gnu-build-triplet") %] --host=[% c("var/gnu-host-triplet") %] --target=[% c("var/gnu-host-triplet") %]
  65. arch_deps:
  66. #- hardening-wrapper
  67. - libc6-dev
  68. - zlib1g-dev
  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