config 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # vim: filetype=yaml sw=2
  2. filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'
  3. version: 6.4.0
  4. var:
  5. container:
  6. use_container: 1
  7. glibc_version: 2.25
  8. linux_version: 4.10.1
  9. deps:
  10. - build-essential
  11. - libmpc-dev
  12. - hardening-wrapper
  13. - libc6-dev-i386
  14. - gawk
  15. setup: |
  16. [% c("var/setarch") -%]
  17. mkdir -p /var/tmp/dist
  18. tar -C /var/tmp/dist -xf $rootdir/[% c("compiler_tarfile") %]
  19. export PATH="/var/tmp/dist/gcc-cross/bin:$PATH"
  20. #export LD_LIBRARY_PATH=/var/tmp/dist/gcc-cross/lib
  21. # Config options for hardening-wrapper
  22. export DEB_BUILD_HARDENING=1
  23. export DEB_BUILD_HARDENING_STACKPROTECTOR=1
  24. export DEB_BUILD_HARDENING_FORTIFY=1
  25. export DEB_BUILD_HARDENING_FORMAT=1
  26. export DEB_BUILD_HARDENING_PIE=1
  27. # Make sure we use the hardening wrapper
  28. # Cross-compiling...
  29. # First do the filename-prefixed ones...
  30. pushd /var/tmp/dist/gcc-cross/bin
  31. cp /usr/bin/hardened-cc ./
  32. mv [% c('var/crosstarget') %]-gcc [% c('var/crosstarget') %]-gcc.real
  33. mv [% c('var/crosstarget') %]-c++ [% c('var/crosstarget') %]-c++.real
  34. mv [% c('var/crosstarget') %]-g++ [% c('var/crosstarget') %]-g++.real
  35. ln -sf hardened-cc [% c('var/crosstarget') %]-gcc
  36. ln -sf hardened-cc [% c('var/crosstarget') %]-c++
  37. ln -sf hardened-cc [% c('var/crosstarget') %]-g++
  38. popd
  39. # Then do the directory-prefixed ones...
  40. # Or not... since they're not there...?!
  41. #pushd /var/tmp/dist/gcc-cross/[% c('var/crosstarget') %]/bin
  42. #cp /usr/bin/hardened-cc ./
  43. #mv gcc gcc.real
  44. #mv c++ c++.real
  45. #mv g++ g++.real
  46. #ln -sf hardened-cc gcc
  47. #ln -sf hardened-cc c++
  48. #ln -sf hardened-cc g++
  49. #popd
  50. targets:
  51. linux-arm:
  52. var:
  53. 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
  54. input_files:
  55. - project: container-image
  56. - URL: 'https://ftp.gnu.org/gnu/gcc/gcc-[% c("version") %]/gcc-[% c("version") %].tar.xz'
  57. sha256sum: 850bf21eafdfe5cd5f6827148184c08c4a0852a37ccf36ce69855334d2c914d4
  58. - name: binutils
  59. project: binutils
  60. - URL: 'https://ftp.gnu.org/gnu/glibc/glibc-[% c("var/glibc_version") %].tar.xz'
  61. sha256sum: 067bd9bb3390e79aa45911537d13c3721f1d9d3769931a30c2681bfee66f23a0
  62. - URL: 'https://www.kernel.org/pub/linux/kernel/v4.x/linux-[% c("var/linux_version") %].tar.xz'
  63. sha256sum: 6ca06bb5faf5f83600d7388bb623dae41df2a257de85ad5d1792e03302bc3543