config 3.0 KB

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