- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        gcc-host-toolchain
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" https://github.com/Kitware/CMake/releases/download/v3.22.2/cmake-3.22.2.tar.gz
        cd "$BUILD_DIR" && ./bootstrap \
          --prefix="$ORCHESTRA_ROOT" \
          --parallel=16 \
          LDFLAGS="-static-libstdc++ -static-libgcc" \
          -- -DCMAKE_BUILD_TYPE=Release \
          -DCMAKE_INSTALL_PREFIX="$ORCHESTRA_ROOT" \
          -DCMAKE_SHARED_LINKER_FLAGS="-static-libstdc++ -static-libgcc" \
          -DCMAKE_MODULE_LINKER_FLAGS="-static-libstdc++ -static-libgcc" \
          -DCMAKE_EXE_LINKER_FLAGS="-static-libstdc++ -static-libgcc" \
          -DCMAKE_USE_OPENSSL=OFF
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make ${JOBS:+-j$JOBS} install DESTDIR="$DESTDIR"
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": |-
    Licenses/README.rst
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies": []
      "configure": |-
        mkdir -p "$BUILD_DIR"
      "dependencies":
      - |-
        toolchain/host/gcc
      - |-
        toolchain/host/binutils
      "install": |-
        exit 0
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": !!null |-
    null
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies": []
      "configure": |
        mkdir -p "$BUILD_DIR/source"
        extract.sh --into "$BUILD_DIR/source" https://ftp.gnu.org/gnu/glibc/glibc-2.13.tar.xz

        sed -i 's|test -n ".critic_missing"|false|g' "$BUILD_DIR/source/configure"
        sed -i 's|struct obstack ._obstack_compat|\0 = 0|g' "$BUILD_DIR/source/malloc/obstack.c"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/glibc-2.13-fix-isinf.patch" "$BUILD_DIR/source"

        cd $BUILD_DIR
        export CC="cc -no-pie -fuse-ld=bfd -Wl,-z,origin -Wl,--enable-new-dtags -Wl,-rpath,$RPATH_PLACEHOLDER/link-only/lib"
        ./source/configure \
          --disable-profile \
          --without-gd \
          --enable-crypt \
          --disable-static-pie \
          --disable-systemtap \
          --disable-nscd \
          --disable-timezone-tools \
          --enable-stack-protector=strong \
          --enable-stackguard-randomization \
          --disable-cet \
          --without-selinux \
          --without-cvs \
          --disable-werror \
          --enable-bind-now \
          --disable-sanity-checks \
          --prefix="$INSTALL_LINK_ONLY_PATH" \
          CFLAGS="-w -O2 -fno-stack-protector -DNDEBUG -march=core2 -U_FORTIFY_SOURCE"
      "dependencies": []
      "install": |+
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make ${JOBS:+-j$JOBS} install_root="$DESTDIR" install
        sed -i "s|$INSTALL_LINK_ONLY_PATH/lib/||g" \
          "$DESTDIR$INSTALL_LINK_ONLY_PATH/lib/libpthread.so" \
          "$DESTDIR$INSTALL_LINK_ONLY_PATH/lib/libc.so"
        ln -s . "$DESTDIR$INSTALL_LINK_ONLY_PATH/usr"
        rm -f "$DESTDIR$INSTALL_LINK_ONLY_PATH"/libexec/getconf/POSIX_V7_LP64_OFF64*
        rm -rf "$DESTDIR$INSTALL_LINK_ONLY_PATH"/bin
        cp -a "$DESTDIR$INSTALL_LINK_ONLY_PATH"/lib/*.o "$DESTDIR$ORCHESTRA_ROOT"/lib/

        # This file is needed because gcc fixinclude detects it when bootstrapping toolchains
        touch "$DESTDIR$INSTALL_LINK_ONLY_PATH/include/stdc-predef.h"

      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": |-
    source/COPYING
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        glibc
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" "https://gmplib.org/download/gmp/gmp-6.1.2.tar.xz"
        cd "$BUILD_DIR" && ./configure \
          --prefix="$ORCHESTRA_ROOT" \
          --enable-shared=no \
          --enable-fat \
          CFLAGS="-fPIC" \
          CXXFLAGS="-fPIC" \
          LDFLAGS="-static-libgcc"
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make ${JOBS:+-j$JOBS} install DESTDIR="$DESTDIR"
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": |-
    COPYING
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        glibc
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" https://ftp.gnu.org/gnu/mpc/mpc-1.2.1.tar.gz
        cd "$BUILD_DIR" && ./configure \
          --prefix="$ORCHESTRA_ROOT" \
          --with-gmp="$ORCHESTRA_ROOT" \
          --with-mpfr="$ORCHESTRA_ROOT" \
          --enable-shared=no \
          CFLAGS="-fPIC" \
          CXXFLAGS="-fPIC" \
          LDFLAGS="-static-libgcc"
      "dependencies":
      - |-
        gmp
      - |-
        mpfr
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make ${JOBS:+-j$JOBS} install DESTDIR="$DESTDIR"
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": |-
    COPYING.LESSER
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        glibc
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" https://www.mpfr.org/mpfr-4.1.0/mpfr-4.1.0.tar.xz
        cd "$BUILD_DIR" && ./configure \
          --prefix="$ORCHESTRA_ROOT" \
          --with-gmp="$ORCHESTRA_ROOT" \
          --enable-shared=no \
          CFLAGS="-fPIC" \
          CXXFLAGS="-fPIC" \
          LDFLAGS="-static-libgcc"
      "dependencies":
      - |-
        gmp
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make ${JOBS:+-j$JOBS} install DESTDIR="$DESTDIR"
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": |-
    COPYING
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path":
  - |-
    ${ORCHESTRA_ROOT}/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/binutils-bin/2.39
  "builds":
    "default":
      "build_dependencies":
      - |-
        glibc
      - |-
        toolchain/host/gcc
      "configure": |
        extract.sh --into "$SOURCE_DIR" https://ftp.gnu.org/gnu/binutils/binutils-2.39.tar.bz2
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR" && "$SOURCE_DIR/configure" \
          --build=x86_64-pc-linux-gnu \
          --host=x86_64-pc-linux-gnu \
          --target=x86_64-pc-linux-gnu \
          --with-sysroot="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu" \
          --prefix=$ORCHESTRA_ROOT \
          --datadir=$ORCHESTRA_ROOT/share/binutils-data/x86_64-pc-linux-gnu/2.39 \
          --infodir=$ORCHESTRA_ROOT/share/binutils-data/x86_64-pc-linux-gnu/2.39/info \
          --mandir=$ORCHESTRA_ROOT/share/binutils-data/x86_64-pc-linux-gnu/2.39/man \
          --bindir=$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/binutils-bin/2.39 \
          --libdir=$ORCHESTRA_ROOT/lib64/binutils/x86_64-pc-linux-gnu/2.39 \
          --libexecdir=$ORCHESTRA_ROOT/lib64/binutils/x86_64-pc-linux-gnu/2.39 \
          --includedir=$ORCHESTRA_ROOT/lib64/binutils/x86_64-pc-linux-gnu/2.39/include \
          --without-included-gettext \
          --with-zlib \
          --enable-poison-system-directories \
          --enable-secureplt \
          --enable-obsolete \
          --enable-gold \
          --disable-shared \
          --enable-threads \
          --enable-install-libiberty \
          --disable-werror \
          --disable-static \
          --disable-gdb \
          --disable-libdecnumber \
          --disable-readline \
          --disable-sim \
          --without-debuginfod \
          --without-stage1-ldflags \
          --enable-gold=default \
          CFLAGS="-w -ggdb3 -O3" \
          CXXFLAGS="-w -ggdb3 -O3"
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make ${JOBS:+-j$JOBS} install DESTDIR="$DESTDIR"
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": |-
    COPYING
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path":
  - |-
    ${ORCHESTRA_ROOT}/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/gcc-bin/11.2.0
  "builds":
    "stage1":
      "build_dependencies":
      - |-
        glibc
      - |-
        gmp
      - |-
        mpfr
      - |-
        mpc
      "configure": |
        extract.sh --into "$SOURCE_DIR" "https://ftp.gnu.org/gnu/gcc/gcc-11.2.0/gcc-11.2.0.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-11.2.0-cfns-fix-mismatch-in-gnu_inline-attributes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-11.2.0-cpp-musl-support.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-11.2.0-fixes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-11.2.0-remove-dependency-on-libc_single_threaded.patch" "$SOURCE_DIR"
        sed -i 's|gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"|gcc_gxx_include_dir="/${gcc_gxx_without_sysroot#/}"|' "$SOURCE_DIR/gcc/configure"

        sed -i "s|SHLIB_LINK = .(CC)|\0 -L$ORCHESTRA_ROOT/link-only/lib|" "$SOURCE_DIR/libgcc/config/t-slibgcc"
        sed -i 's|@multilib_flags@||' "$SOURCE_DIR/libgcc/config/t-slibgcc"


        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR"

        echo 'char __libc_single_threaded __attribute__ ((weak));' > fake-libc-single-threaded.c
        gcc -c -fPIC -x c fake-libc-single-threaded.c -o "$BUILD_DIR/fake-libc-single-threaded.o"

        "$SOURCE_DIR/configure" \
          --host=x86_64-pc-linux-gnu \
          --build=x86_64-pc-linux-gnu \
          --target=x86_64-pc-linux-gnu \
          --prefix=$ORCHESTRA_ROOT \
          --bindir=$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/gcc-bin/11.2.0 \
          --includedir=$ORCHESTRA_ROOT/lib/gcc/x86_64-pc-linux-gnu/11.2.0/include \
          --datadir=$ORCHESTRA_ROOT/share/gcc-data/x86_64-pc-linux-gnu/11.2.0 \
          --mandir=$ORCHESTRA_ROOT/share/gcc-data/x86_64-pc-linux-gnu/11.2.0/man \
          --infodir=$ORCHESTRA_ROOT/share/gcc-data/x86_64-pc-linux-gnu/11.2.0/info \
          --with-sysroot=/ \
          --enable-obsolete \
          --enable-secureplt \
          --disable-werror \
          --enable-nls \
          --without-included-gettext \
          --enable-checking=release \
          --enable-libstdcxx-time \
          --enable-poison-system-directories \
          --disable-host-shared \
          --enable-shared \
          --disable-libatomic \
          --disable-bootstrap \
          --disable-multilib \
          --disable-altivec \
          --disable-fixed-point \
          --disable-libgcj \
          --disable-libgomp \
          --disable-libmudflap \
          --disable-libssp \
          --disable-libcilkrts \
          --disable-vtable-verify \
          --disable-libvtv \
          --disable-libquadmath \
          --disable-rpath \
          --enable-lto \
          --disable-vtable-verify \
          --disable-libsanitizer \
          --with-gmp="$ORCHESTRA_ROOT" \
          --with-mpfr="$ORCHESTRA_ROOT" \
          --with-mpc="$ORCHESTRA_ROOT" \
          --without-zstd \
          --without-cloog \
          --enable-libsanitizer \
          --enable-libssp \
          --enable-shared \
          --enable-libatomic \
          --enable-libquadmath \
          --enable-esp \
          --disable-libstdcxx-pch \
          --enable-threads=posix \
          --enable-__cxa_atexit \
          --enable-clocale=gnu \
          --disable-altivec \
          --disable-fixed-point \
          --enable-targets=all \
          --enable-libgomp \
          --disable-libmudflap \
          --disable-libssp \
          --disable-systemtap \
          --enable-lto \
          --without-isl \
          --enable-default-pie \
          --enable-default-ssp \
          --enable-libmpx \
          CFLAGS_FOR_TARGET="-I/usr/include/tirpc -I$ORCHESTRA_ROOT/link-only/include" \
          CXXFLAGS_FOR_TARGET="-I/usr/include/tirpc -I$ORCHESTRA_ROOT/link-only/include" \
          LDFLAGS_FOR_TARGET="-L$INSTALL_LINK_ONLY_PATH/lib -L$ORCHESTRA_ROOT/lib -lrt --sysroot=/ -Wl,-z,origin -Wl,--enable-new-dtags -Wl,-rpath,$RPATH_PLACEHOLDER/lib" \
          --enable-languages=c \
          CFLAGS="-w -ggdb3 -O3 --sysroot $INSTALL_LINK_ONLY_PATH -idirafter $ORCHESTRA_ROOT/include -idirafter /usr/local/include -idirafter /usr/include/x86_64-linux-gnu -idirafter /usr/include" \
          CXXFLAGS="-w -ggdb3 -O3 --sysroot $INSTALL_LINK_ONLY_PATH -idirafter $ORCHESTRA_ROOT/include -idirafter /usr/local/include -idirafter /usr/include/x86_64-linux-gnu -idirafter /usr/include -std=gnu++11" \
          LDFLAGS="-L$INSTALL_LINK_ONLY_PATH/lib -L$ORCHESTRA_ROOT/lib -lrt --sysroot=/ -Wl,-z,origin -Wl,--enable-new-dtags -fuse-ld=gold -Wl,-rpath,$RPATH_PLACEHOLDER/lib -Wl,-rpath,$RPATH_PLACEHOLDER/lib64/llvm/clang-release/lib/clang/12.0.0/lib/linux -static-libgcc -static-libstdc++ $BUILD_DIR/fake-libc-single-threaded.o"
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS} LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
        make install LIBRARY_PATH=/usr/lib/x86_64-linux-gnu

        NEW_GCC_PATH="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/gcc-bin/11.2.0/"

        if test -e "${DESTDIR}${NEW_GCC_PATH}/gcc"; then

          if ! test -e "${DESTDIR}${NEW_GCC_PATH}/cc"; then
            ln -s gcc "${DESTDIR}${NEW_GCC_PATH}/cc"
          fi

          mkdir -p "${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin"
          cp "${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py" "${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/gcc"
          ln -s gcc "${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/cc"
          ln -s gcc "${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-cc"
          ln -s gcc "${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-gcc"

          cp -a "${DESTDIR}${ORCHESTRA_ROOT}"/lib/gcc/x86_64-pc-linux-gnu/11.2.0/*.{a,o} "${DESTDIR}${ORCHESTRA_ROOT}"/lib/

        fi

        if test -e "${DESTDIR}${NEW_GCC_PATH}/g++"; then

          if ! test -e "${DESTDIR}${NEW_GCC_PATH}/c++"; then
            ln -s g++ "${DESTDIR}${NEW_GCC_PATH}/c++"
          fi

          cp "${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py" "${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/g++"
          ln -s g++ "${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-g++"
          mkdir -p "${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin"
          ln -s g++ "${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/c++"
          ln -s g++ "${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-c++"

        fi

        rm -f "${DESTDIR}${ORCHESTRA_ROOT}"/lib64/libcc1.*

        # Fixinclude locates the wrong pthread.h
        find "${DESTDIR}${ORCHESTRA_ROOT}" -type d -name include-fixed -exec rm -f {}/pthread.h \;
      "ndebug": !!bool |-
        true
    "stage2":
      "build_dependencies":
      - |-
        glibc
      - |-
        gmp
      - |-
        mpfr
      - |-
        mpc
      "configure": |
        extract.sh --into "$SOURCE_DIR" "https://ftp.gnu.org/gnu/gcc/gcc-11.2.0/gcc-11.2.0.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-11.2.0-cfns-fix-mismatch-in-gnu_inline-attributes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-11.2.0-cpp-musl-support.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-11.2.0-fixes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-11.2.0-remove-dependency-on-libc_single_threaded.patch" "$SOURCE_DIR"
        sed -i 's|gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"|gcc_gxx_include_dir="/${gcc_gxx_without_sysroot#/}"|' "$SOURCE_DIR/gcc/configure"

        sed -i "s|SHLIB_LINK = .(CC)|\0 -L$ORCHESTRA_ROOT/link-only/lib|" "$SOURCE_DIR/libgcc/config/t-slibgcc"
        sed -i 's|@multilib_flags@||' "$SOURCE_DIR/libgcc/config/t-slibgcc"


        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR"

        echo 'char __libc_single_threaded __attribute__ ((weak));' > fake-libc-single-threaded.c
        gcc -c -fPIC -x c fake-libc-single-threaded.c -o "$BUILD_DIR/fake-libc-single-threaded.o"

        "$SOURCE_DIR/configure" \
          --host=x86_64-pc-linux-gnu \
          --build=x86_64-pc-linux-gnu \
          --target=x86_64-pc-linux-gnu \
          --prefix=$ORCHESTRA_ROOT \
          --bindir=$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/gcc-bin/11.2.0 \
          --includedir=$ORCHESTRA_ROOT/lib/gcc/x86_64-pc-linux-gnu/11.2.0/include \
          --datadir=$ORCHESTRA_ROOT/share/gcc-data/x86_64-pc-linux-gnu/11.2.0 \
          --mandir=$ORCHESTRA_ROOT/share/gcc-data/x86_64-pc-linux-gnu/11.2.0/man \
          --infodir=$ORCHESTRA_ROOT/share/gcc-data/x86_64-pc-linux-gnu/11.2.0/info \
          --with-sysroot=/ \
          --enable-obsolete \
          --enable-secureplt \
          --disable-werror \
          --enable-nls \
          --without-included-gettext \
          --enable-checking=release \
          --enable-libstdcxx-time \
          --enable-poison-system-directories \
          --disable-host-shared \
          --enable-shared \
          --disable-libatomic \
          --disable-bootstrap \
          --disable-multilib \
          --disable-altivec \
          --disable-fixed-point \
          --disable-libgcj \
          --disable-libgomp \
          --disable-libmudflap \
          --disable-libssp \
          --disable-libcilkrts \
          --disable-vtable-verify \
          --disable-libvtv \
          --disable-libquadmath \
          --disable-rpath \
          --enable-lto \
          --disable-vtable-verify \
          --disable-libsanitizer \
          --with-gmp="$ORCHESTRA_ROOT" \
          --with-mpfr="$ORCHESTRA_ROOT" \
          --with-mpc="$ORCHESTRA_ROOT" \
          --without-zstd \
          --without-cloog \
          --enable-libsanitizer \
          --enable-libssp \
          --enable-shared \
          --enable-libatomic \
          --enable-libquadmath \
          --enable-esp \
          --disable-libstdcxx-pch \
          --enable-threads=posix \
          --enable-__cxa_atexit \
          --enable-clocale=gnu \
          --disable-altivec \
          --disable-fixed-point \
          --enable-targets=all \
          --enable-libgomp \
          --disable-libmudflap \
          --disable-libssp \
          --disable-systemtap \
          --enable-lto \
          --without-isl \
          --enable-default-pie \
          --enable-default-ssp \
          --enable-libmpx \
          CFLAGS_FOR_TARGET="-I/usr/include/tirpc -I$ORCHESTRA_ROOT/link-only/include" \
          CXXFLAGS_FOR_TARGET="-I/usr/include/tirpc -I$ORCHESTRA_ROOT/link-only/include" \
          LDFLAGS_FOR_TARGET="-L$INSTALL_LINK_ONLY_PATH/lib -L$ORCHESTRA_ROOT/lib -lrt --sysroot=/ -Wl,-z,origin -Wl,--enable-new-dtags -Wl,-rpath,$RPATH_PLACEHOLDER/lib" \
          --enable-languages=c,c++ \
          CFLAGS="-w -ggdb3 -O3 --sysroot $INSTALL_LINK_ONLY_PATH -idirafter $ORCHESTRA_ROOT/include -idirafter /usr/local/include -idirafter /usr/include/x86_64-linux-gnu -idirafter /usr/include" \
          CXXFLAGS="-w -ggdb3 -O3 --sysroot $INSTALL_LINK_ONLY_PATH -idirafter $ORCHESTRA_ROOT/include -idirafter /usr/local/include -idirafter /usr/include/x86_64-linux-gnu -idirafter /usr/include -std=gnu++11" \
          LDFLAGS="-L$INSTALL_LINK_ONLY_PATH/lib -L$ORCHESTRA_ROOT/lib -lrt --sysroot=/ -Wl,-z,origin -Wl,--enable-new-dtags -fuse-ld=gold -Wl,-rpath,$RPATH_PLACEHOLDER/lib -Wl,-rpath,$RPATH_PLACEHOLDER/lib64/llvm/clang-release/lib/clang/12.0.0/lib/linux -static-libgcc -static-libstdc++ $BUILD_DIR/fake-libc-single-threaded.o"
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS} LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
        make install LIBRARY_PATH=/usr/lib/x86_64-linux-gnu

        NEW_GCC_PATH="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/gcc-bin/11.2.0/"

        if test -e "${DESTDIR}${NEW_GCC_PATH}/gcc"; then

          if ! test -e "${DESTDIR}${NEW_GCC_PATH}/cc"; then
            ln -s gcc "${DESTDIR}${NEW_GCC_PATH}/cc"
          fi

          mkdir -p "${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin"
          cp "${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py" "${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/gcc"
          ln -s gcc "${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/cc"
          ln -s gcc "${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-cc"
          ln -s gcc "${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-gcc"

          cp -a "${DESTDIR}${ORCHESTRA_ROOT}"/lib/gcc/x86_64-pc-linux-gnu/11.2.0/*.{a,o} "${DESTDIR}${ORCHESTRA_ROOT}"/lib/

        fi

        if test -e "${DESTDIR}${NEW_GCC_PATH}/g++"; then

          if ! test -e "${DESTDIR}${NEW_GCC_PATH}/c++"; then
            ln -s g++ "${DESTDIR}${NEW_GCC_PATH}/c++"
          fi

          cp "${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py" "${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/g++"
          ln -s g++ "${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-g++"
          mkdir -p "${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin"
          ln -s g++ "${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/c++"
          ln -s g++ "${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-c++"

        fi

        rm -f "${DESTDIR}${ORCHESTRA_ROOT}"/lib64/libcc1.*

        # Fixinclude locates the wrong pthread.h
        find "${DESTDIR}${ORCHESTRA_ROOT}" -type d -name include-fixed -exec rm -f {}/pthread.h \;
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    stage2
  "license": |-
    COPYING
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false