# vim: filetype=yaml sw=2
filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.[% c("compress_tar") %]'
# Note: When updating the gcc version, if this includes a libstdc++
# ABI change we should also update projects/firefox/abicheck.cc to
# require the new version.
version: '[% pc("gcc-source", "version") %]'
container:
  use_container: 1
var:
  no_crosscompile: 1
  distdir: gcc
  deps:
    - build-essential
    - libmpc-dev
  setup: |
    mkdir -p /var/tmp/dist
    tar -C /var/tmp/dist -xf $rootdir/[% c("compiler_tarfile") %]
    export PATH="/var/tmp/dist/[% c("var/distdir") %]/bin:$PATH"
    export LD_LIBRARY_PATH=/var/tmp/dist/[% c("var/distdir") %]/lib64
    [% IF c("hardened_gcc"); GET c("var/set_hardened_build_flags"); END %]

targets:
  linux:
    hardened_gcc: 1
    var:
      configure_opt: --disable-multilib --enable-languages=c,c++

input_files:
  - project: container-image
  - project: gcc-source
    name: gcc
