# 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:/var/tmp/dist/[% c("var/distdir") %]/lib32
    [% IF c("hardened_gcc"); GET c("var/set_hardened_build_flags"); END %]

targets:
  windows:
    var:
      configure_opt: --disable-multilib --enable-languages=c,c++
      arch_deps:
        - libc6-dev
        - zlib1g-dev
  linux:
    hardened_gcc: 1
    var:
      configure_opt: --enable-multilib --enable-languages=c,c++ --with-arch_32=i686
      arch_deps:
        - libc6-dev-i386

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