config 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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: '[% pc("gcc-source", "version") %]'
  7. container:
  8. use_container: 1
  9. var:
  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. hardened_gcc: 0
  56. var:
  57. 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") %]
  58. arch_deps:
  59. #- hardening-wrapper
  60. - libc6-dev
  61. - zlib1g-dev
  62. linux-arm64:
  63. hardened_gcc: 0
  64. var:
  65. 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") %]
  66. arch_deps:
  67. #- hardening-wrapper
  68. - libc6-dev
  69. - zlib1g-dev
  70. input_files:
  71. - project: container-image
  72. - project: gcc-source
  73. name: gcc