- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        host-cxx-toolchain
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "https://downloads.sourceforge.net/project/boost/boost/1.72.0/boost_1_72_0.tar.bz2"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/boost-1.63.0-icl-disable-LessThanComparableConcept.patch" "$BUILD_DIR"
        cd "$BUILD_DIR"

        ./bootstrap.sh \
          --prefix="$ORCHESTRA_ROOT" \
          --with-libraries=regex,test \
          --without-icu
      "dependencies":
      - |-
        host-libcxx
      - |-
        libunwind
      "install": |+
        cd "$BUILD_DIR"

        ./b2 \
          --prefix="${DESTDIR}${ORCHESTRA_ROOT}" \
          --ignore-site-config toolset='clang'

        ./b2 \
          --prefix="${DESTDIR}${ORCHESTRA_ROOT}" \
          --ignore-site-config toolset='clang' \
          install

      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": |-
    LICENSE_1_0.txt
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        host-c-toolchain
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz

        sed 's/-Winline//g' -i "$BUILD_DIR"/Makefile*
      "dependencies": []
      "install": |+
        cd "$BUILD_DIR"

        # Build
        make ${JOBS:+-j$JOBS} -f Makefile-libbz2_so PREFIX=/
        make ${JOBS:+-j$JOBS} bzip2 bzip2recover PREFIX=/

        # Install
        INSTALLDIR="${DESTDIR}${ORCHESTRA_ROOT}"
        install -dm755 "$INSTALLDIR"/{bin,lib64,include,lib64/pkgconfig}

        install -m755 bzip2-shared "$INSTALLDIR"/bin/bzip2
        install -m755 bzip2recover bzdiff bzgrep bzmore "$INSTALLDIR"/bin
        ln -sf bzip2 "$INSTALLDIR"/bin/bunzip2
        ln -sf bzip2 "$INSTALLDIR"/bin/bzcat

        cp -a libbz2.so* "$INSTALLDIR"/lib64
        ln -s libbz2.so.1.0.8 "$INSTALLDIR"/lib64/libbz2.so
        install -m644 bzlib.h "$INSTALLDIR"/include/

        cat > "$INSTALLDIR"/lib64/pkgconfig/bzip2.pc <<'EOF'
        prefix=${pcfiledir}/../..
        exec_prefix=${prefix}
        bindir=${exec_prefix}/bin
        libdir=${exec_prefix}/lib64
        includedir=${prefix}/include

        Name: bzip2
        Description: A file compression library
        Version: 1.0.8
        Libs: -L${libdir} -lbz2
        Cflags: -I${includedir}
        EOF

      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": |-
    LICENSE
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        cmake
      - |-
        ninja
      - |-
        clang-vanilla
      "configure": |+
        extract.sh --into "$BUILD_DIR/source" "https://github.com/revng/llvm-project/archive/de75a69.tar.gz"

        SUPPORT_UNITTESTS="$BUILD_DIR/source/llvm/unittests/Support"
        rm "$SUPPORT_UNITTESTS/JSONTest.cpp"
        rm "$SUPPORT_UNITTESTS/DJBTest.cpp"
        grep -vE 'JSONTest.cpp|DJBTest.cpp' "$SUPPORT_UNITTESTS/CMakeLists.txt" > "$SUPPORT_UNITTESTS/CMakeLists.txt.tmp"
        mv "$SUPPORT_UNITTESTS/CMakeLists.txt.tmp" "$SUPPORT_UNITTESTS/CMakeLists.txt"

        sed -i 's|GIT_FOUND|FALSE|g' "$BUILD_DIR/source/llvm/cmake/modules/VersionFromVCS.cmake"
        export PATH="$ORCHESTRA_ROOT/clang-vanilla/wrapped-bin:$ORCHESTRA_ROOT/clang-vanilla/bin:$PATH"
        export HARD_FLAGS_CXX_CLANG=""
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR";
        cmake \
          -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
          -DCMAKE_INSTALL_SO_NO_EXE=0 \
          -DCMAKE_INSTALL_PREFIX="$ORCHESTRA_ROOT" \
          -DCMAKE_PREFIX_PATH="$ORCHESTRA_ROOT" \
          "$BUILD_DIR/source/llvm" \
          -GNinja \
          -DCMAKE_BUILD_RPATH="\$ORIGIN/../lib:$ORCHESTRA_ROOT/lib" \
          -DCMAKE_INSTALL_RPATH="$RPATH_PLACEHOLDER/lib" \
          -DCMAKE_BUILD_TYPE="Release" \
          -DCMAKE_EXE_LINKER_FLAGS="-w" \
          -DCMAKE_SHARED_LINKER_FLAGS="-w" \
          -DCMAKE_MODULE_LINKER_FLAGS="-w" \
          -DCMAKE_C_FLAGS="-w" \
          -DCMAKE_CXX_FLAGS="-w" \
          -DLLVM_TARGETS_TO_BUILD="AArch64;ARM;Mips;SystemZ;X86" \
          -DLLVM_INSTALL_UTILS=ON \
          -DLLVM_ENABLE_DUMP=ON \
          -DLLVM_ENABLE_TERMINFO=OFF \
          -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF \
          -DCMAKE_CXX_STANDARD=20 \
          -DLLVM_ENABLE_Z3_SOLVER=OFF \
          -DLLVM_INCLUDE_GO_TESTS=OFF \
          -DLLVM_ENABLE_ZLIB=ON \
          -DLLVM_ENABLE_LIBEDIT=ON \
          -DLLVM_ENABLE_PROJECTS="clang;compiler-rt;libcxxabi;libcxx;clang-tools-extra;lld" \
          -DBUILD_SHARED_LIBS=OFF \
          -DLLVM_ENABLE_LTO=Thin \
          -DLLVM_USE_LINKER=lld \
          -DLLVM_BUILD_INSTRUMENTED=IR \
          -DLLVM_BUILD_RUNTIME=No \
          -DCMAKE_AR=$ORCHESTRA_ROOT/clang-vanilla/bin/llvm-ar \
          -DCMAKE_RANLIB=$ORCHESTRA_ROOT/clang-vanilla/bin/llvm-ranlib \
          -DCMAKE_C_COMPILER=$ORCHESTRA_ROOT/clang-vanilla/wrapped-bin/clang \
          -DCMAKE_CXX_COMPILER=$ORCHESTRA_ROOT/clang-vanilla/wrapped-bin/clang++ \
          -DLIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL=0 \
          -DLLVM_TARGETS_TO_BUILD=X86 \
          -Wno-dev

      "dependencies":
      - |-
        gcc-host-toolchain
      - |-
        libunwind
      - |-
        libedit
      - |-
        zlib
      "install": |+
        export PATH="$ORCHESTRA_ROOT/clang-vanilla/wrapped-bin:$ORCHESTRA_ROOT/clang-vanilla/bin:$PATH"
        export HARD_FLAGS_CXX_CLANG=""
        cd "$BUILD_DIR"

        ninja ${JOBS:+-j$JOBS} clang
        ninja ${JOBS:+-j$JOBS} check-llvm || true
        ninja ${JOBS:+-j$JOBS} check-clang || true

        rm -rf build-for-profiling
        mkdir build-for-profiling
        cd build-for-profiling
        cmake \
          "$BUILD_DIR/source/llvm" \
          -GNinja \
          -DCMAKE_C_COMPILER="$BUILD_DIR/bin/clang" \
          -DCMAKE_CXX_COMPILER="$BUILD_DIR/bin/clang++" \
          -DLLVM_ENABLE_TERMINFO=OFF \
          -DCMAKE_CXX_STANDARD=20 \
          -DLLVM_ENABLE_Z3_SOLVER=OFF \
          -DLLVM_INCLUDE_GO_TESTS=OFF \
          -DLLVM_TARGETS_TO_BUILD=X86 \
          -DCMAKE_BUILD_TYPE=RelWithDebInfo
        ninja ${JOBS:+-j$JOBS}

        PROFDATA_DIR="${DESTDIR}${ORCHESTRA_ROOT}/share/profdata"
        mkdir -p "$PROFDATA_DIR"
        llvm-profdata merge -output="$PROFDATA_DIR/clang-release.prof" $BUILD_DIR/profiles/*.profraw

      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": |-
    source/llvm/LICENSE.TXT
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        cmake
      - |-
        ninja
      - |-
        clang-vanilla
      - |-
        clang-profiling-data
      "configure": |+
        extract.sh --into "$BUILD_DIR/source" "https://github.com/revng/llvm-project/archive/de75a69.tar.gz"

        # compiler-rt tests fail abundantly (in the CI only)
        find "$BUILD_DIR/source/compiler-rt/test" -name "lit.*" -type f | while read FILE; do
          echo > "$FILE"
        done

        sed -i 's|GIT_FOUND|FALSE|g' "$BUILD_DIR/source/llvm/cmake/modules/VersionFromVCS.cmake"

        export PATH="$ORCHESTRA_ROOT/clang-vanilla/wrapped-bin:$ORCHESTRA_ROOT/clang-vanilla/bin:$PATH"

        export HARD_FLAGS_CXX_CLANG=""
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR";
        cmake \
          -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
          -DCMAKE_INSTALL_SO_NO_EXE=0 \
          -DCMAKE_INSTALL_PREFIX="$ORCHESTRA_ROOT" \
          -DCMAKE_PREFIX_PATH="$ORCHESTRA_ROOT" \
          "$BUILD_DIR/source/llvm" \
          -GNinja \
          -DCMAKE_BUILD_RPATH="\$ORIGIN/../lib:$ORCHESTRA_ROOT/lib" \
          -DCMAKE_INSTALL_RPATH="$RPATH_PLACEHOLDER/lib" \
          -DCMAKE_BUILD_TYPE="Release" \
          -DCMAKE_EXE_LINKER_FLAGS="-w -pthread" \
          -DCMAKE_SHARED_LINKER_FLAGS="-w -pthread" \
          -DCMAKE_MODULE_LINKER_FLAGS="-w -pthread" \
          -DCMAKE_C_FLAGS="-w -pthread" \
          -DCMAKE_CXX_FLAGS="-w -pthread" \
          -DLLVM_TARGETS_TO_BUILD="AArch64;ARM;Mips;SystemZ;X86" \
          -DLLVM_INSTALL_UTILS=ON \
          -DLLVM_ENABLE_DUMP=ON \
          -DLLVM_ENABLE_TERMINFO=OFF \
          -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF \
          -DCMAKE_CXX_STANDARD=20 \
          -DLLVM_ENABLE_Z3_SOLVER=OFF \
          -DLLVM_INCLUDE_GO_TESTS=OFF \
          -DLLVM_ENABLE_ZLIB=ON \
          -DLLVM_ENABLE_LIBEDIT=ON \
          -DLLVM_ENABLE_PROJECTS="clang;compiler-rt;libcxxabi;libcxx;clang-tools-extra;lld" \
          -DBUILD_SHARED_LIBS=ON \
          -DLIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL=0 \
          -DCMAKE_INSTALL_PREFIX="$ORCHESTRA_ROOT/lib/llvm/clang-release" \
          -DCMAKE_INSTALL_RPATH="$RPATH_PLACEHOLDER/lib/llvm/clang-release/lib:$RPATH_PLACEHOLDER/lib" \
          -DLLVM_ENABLE_LTO=Thin \
          -DLLVM_USE_LINKER=lld \
          -DCMAKE_AR=$ORCHESTRA_ROOT/clang-vanilla/bin/llvm-ar \
          -DCMAKE_RANLIB=$ORCHESTRA_ROOT/clang-vanilla/bin/llvm-ranlib \
          -DCMAKE_C_COMPILER=$ORCHESTRA_ROOT/clang-vanilla/wrapped-bin/clang \
          -DCMAKE_CXX_COMPILER=$ORCHESTRA_ROOT/clang-vanilla/wrapped-bin/clang++ \
          -DLLVM_PROFDATA_FILE="$ORCHESTRA_ROOT/share/profdata/clang-release.prof" \
          -Wno-dev

      "dependencies":
      - |-
        gcc-host-toolchain
      - |-
        libunwind
      - |-
        libedit
      - |-
        zlib
      "install": |2+

        export PATH="$ORCHESTRA_ROOT/clang-vanilla/wrapped-bin:$ORCHESTRA_ROOT/clang-vanilla/bin:$PATH"

        export HARD_FLAGS_CXX_CLANG=""

        cd "$BUILD_DIR"

        # Build
        ninja ${JOBS:+-j$JOBS} install

        # Run tests
        export HARD_FLAGS_C_CLANG="-w"
        export HARD_FLAGS_CXX_CLANG="-w"
        if test "$RUN_TESTS" -eq 1; then
          ninja ${JOBS:+-j$JOBS} check-all
        fi

        # Fix libc++
        rm "${DESTDIR}${ORCHESTRA_ROOT}/lib/llvm/clang-release/lib/libc++.so" || true
        echo 'INPUT(libc++.so.1 -lc++abi -lpthread)' > "${DESTDIR}${ORCHESTRA_ROOT}/lib/llvm/clang-release/lib/libc++.so"

        # Symlink to /lib/llvm/clang-release/bin/* to /bin
        for EXECUTABLE in "${DESTDIR}${ORCHESTRA_ROOT}/lib/llvm/clang-release/bin/"*; do
          ln \
            -s $(
              realpath \
                --no-symlinks \
                --relative-to="${DESTDIR}${ORCHESTRA_ROOT}/bin" \
                "${EXECUTABLE}"
            ) \
            "${DESTDIR}${ORCHESTRA_ROOT}/bin"
        done

        # Save libc++ files for later
        "$ORCHESTRA_DOTDIR"/support/save-for-later \
          -i "${DESTDIR}${ORCHESTRA_ROOT}/lib/llvm/clang-release" \
          clang-runtime \
          '^lib\/libc\+\+[^/]*$'

        # Leave `opt`, `llvm-config` and `llvm-symbolizer` to the `llvm` component
        rm -f "${DESTDIR}${ORCHESTRA_ROOT}/bin/opt"*
        rm -f "${DESTDIR}${ORCHESTRA_ROOT}/bin/llvm-config"*
        rm -f "${DESTDIR}${ORCHESTRA_ROOT}/bin/llvm-symbolizer"*

        # Create wrappers
        mkdir -p "${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin"
        COMPILER_WRAPPER="${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py"
        cd "${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin"
        cp -a "$COMPILER_WRAPPER" clang
        cp -a "$COMPILER_WRAPPER" clang++
        cp -a "$COMPILER_WRAPPER" clang-tidy

      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": |-
    source/llvm/LICENSE.TXT
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        clang-release
      "configure": |
        mkdir -p "$BUILD_DIR"
      "dependencies": []
      "install": |+
        cd "$BUILD_DIR"
        cp -a "${ORCHESTRA_ROOT}/share/orchestra/clang-release.license" LICENSE.TXT
        tar xf "${ORCHESTRA_ROOT}/share/orchestra/save_for_later/clang-runtime.tar.xz" \
          -C "${DESTDIR}${ORCHESTRA_ROOT}"

        # Fix libc++
        rm "${DESTDIR}${ORCHESTRA_ROOT}/lib/libc++.so" || true
        echo 'INPUT(libc++.so.1 -lc++abi -lpthread)' > "${DESTDIR}${ORCHESTRA_ROOT}/lib/libc++.so"

      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": |-
    LICENSE.TXT
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        cmake
      - |-
        ninja
      "configure": |+
        extract.sh --into "$BUILD_DIR/source" "https://github.com/revng/llvm-project/archive/de75a69.tar.gz"
        sed -i 's|GIT_FOUND|FALSE|g' "$BUILD_DIR/source/llvm/cmake/modules/VersionFromVCS.cmake"
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR";
        cmake \
          -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
          -DCMAKE_INSTALL_SO_NO_EXE=0 \
          -DCMAKE_INSTALL_PREFIX="$ORCHESTRA_ROOT" \
          -DCMAKE_PREFIX_PATH="$ORCHESTRA_ROOT" \
          "$BUILD_DIR/source/llvm" \
          -GNinja \
          -DCMAKE_BUILD_RPATH="\$ORIGIN/../lib:$ORCHESTRA_ROOT/lib" \
          -DCMAKE_INSTALL_RPATH="$RPATH_PLACEHOLDER/lib" \
          -DCMAKE_BUILD_TYPE="Release" \
          -DCMAKE_EXE_LINKER_FLAGS="-w" \
          -DCMAKE_SHARED_LINKER_FLAGS="-w" \
          -DCMAKE_MODULE_LINKER_FLAGS="-w" \
          -DCMAKE_C_FLAGS="-w" \
          -DCMAKE_CXX_FLAGS="-w" \
          -DLLVM_TARGETS_TO_BUILD="AArch64;ARM;Mips;SystemZ;X86" \
          -DLLVM_INSTALL_UTILS=ON \
          -DLLVM_ENABLE_DUMP=ON \
          -DLLVM_ENABLE_TERMINFO=OFF \
          -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF \
          -DCMAKE_CXX_STANDARD=20 \
          -DLLVM_ENABLE_Z3_SOLVER=OFF \
          -DLLVM_INCLUDE_GO_TESTS=OFF \
          -DLLVM_ENABLE_ZLIB=ON \
          -DLLVM_ENABLE_LIBEDIT=ON \
          -DLLVM_ENABLE_PROJECTS="clang;lld;compiler-rt" \
          -DBUILD_SHARED_LIBS=OFF \
          -DCMAKE_INSTALL_PREFIX="$ORCHESTRA_ROOT/clang-vanilla" \
          -DLLVM_TARGETS_TO_BUILD="X86" \
          -Wno-dev

      "dependencies":
      - |-
        gcc-host-toolchain
      - |-
        libunwind
      - |-
        libedit
      - |-
        zlib
      "install": |+
        cd "$BUILD_DIR"

        ninja ${JOBS:+-j$JOBS} install

        COMPILER_WRAPPER="${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py"
        mkdir -p "${DESTDIR}${ORCHESTRA_ROOT}/clang-vanilla/wrapped-bin"
        cd "${DESTDIR}${ORCHESTRA_ROOT}/clang-vanilla/wrapped-bin"
        cp -a "$COMPILER_WRAPPER" clang
        cp -a "$COMPILER_WRAPPER" clang++
        cp -a "$COMPILER_WRAPPER" clang-tidy

      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": |-
    source/llvm/LICENSE.TXT
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        gcc-host-toolchain
      - |-
        ncurses
      "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"
        cd "$BUILD_DIR"
        cat > requirements.txt <<'EOF'
        Cython==0.29.32
        EOF

        pip-package-list.py \
          cython \
          -r requirements.txt \
          > packages.csv

        mkdir -p packages
        cd packages
        while IFS=, read -r NAME URL; do
          fetch.sh "$URL"
          echo "$NAME" >> "../package-list.txt"
        done < ../packages.csv
      "dependencies":
      - |-
        python-base-packages
      "install": |-
        cd "$BUILD_DIR"
        export HARD_FLAGS_COMPILE="-I"$("${ORCHESTRA_DOTDIR}/support/get-python-path" include)" $HARD_FLAGS_COMPILE"
        python \
          -m pip \
          --disable-pip-version-check \
          --no-python-version-warning \
          install \
          --compile \
          --no-index \
          --no-build-isolation \
          --no-warn-script-location \
          --ignore-installed \
          --root "$DESTDIR" \
          --verbose \
          packages/*

        PYTHON_PACKAGES_DIR="$DESTDIR$ORCHESTRA_ROOT/share/orchestra/python-packages/"
        mkdir -p "$PYTHON_PACKAGES_DIR"
        cp \
          -a \
          package-list.txt \
          "$PYTHON_PACKAGES_DIR/cython.txt"
      "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":
      - |-
        glibc
      - |-
        toolchain/host/linux-headers
      - |-
        gmp
      - |-
        mpc
      - |-
        mpfr
      "configure": |
        mkdir -p "$BUILD_DIR/source"
        extract.sh --into "$BUILD_DIR/source" https://ftp.gnu.org/gnu/gcc/gcc-11.2.0/gcc-11.2.0.tar.gz

        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/configure \
          --prefix="$INSTALL_LINK_ONLY_PATH/early-gcc" \
          --disable-multilib \
          --enable-languages=c,c++ \
          --disable-nls \
          --disable-libsanitizer \
          --with-glibc-version=2.13 \
          --disable-bootstrap \
          --with-sysroot=$INSTALL_LINK_ONLY_PATH \
          --with-gmp="$ORCHESTRA_ROOT" \
          --with-mpfr="$ORCHESTRA_ROOT" \
          --with-mpc="$ORCHESTRA_ROOT" \
          --disable-libgomp \
          CFLAGS_FOR_TARGET="--sysroot=$INSTALL_LINK_ONLY_PATH -I$ORCHESTRA_ROOT/include" \
          CXXFLAGS_FOR_TARGET="--sysroot=$INSTALL_LINK_ONLY_PATH -I$ORCHESTRA_ROOT/include" \
          LDFLAGS_FOR_TARGET="--sysroot=$INSTALL_LINK_ONLY_PATH -Wl,-z,origin -Wl,--enable-new-dtags -L$ORCHESTRA_ROOT/lib -L$INSTALL_LINK_ONLY_PATH/lib"
      "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": |-
    source/COPYING
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "debug":
      "build_dependencies":
      - |-
        cmake
      - |-
        ninja
      - |-
        host-c-toolchain
      "configure": |2+


        mkdir -p "$BUILD_DIR"


        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        extract.sh "https://github.com/libexpat/libexpat/releases/download/R_2_4_8/expat-2.4.8.tar.gz"


        cd "$BUILD_DIR";
        cmake \
          -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
          -DCMAKE_INSTALL_SO_NO_EXE=0 \
          -DCMAKE_INSTALL_PREFIX="$ORCHESTRA_ROOT" \
          -DCMAKE_PREFIX_PATH="$ORCHESTRA_ROOT" \
          "$SOURCE_DIR" \
          -G"Ninja" \
          -DCMAKE_C_COMPILER="$ORCHESTRA_ROOT/link-only/bin/clang" \
          -DCMAKE_CXX_COMPILER="$ORCHESTRA_ROOT/link-only/bin/clang++" \
          -DCMAKE_C_FLAGS="-ggdb3 -O0   " \
          -DCMAKE_CXX_FLAGS="-ggdb3 -O0   " \
          -DCMAKE_BUILD_RPATH="$RPATH_PLACEHOLDER/lib:$RPATH_PLACEHOLDER/lib64/clang/12.0.0/lib/linux:$RPATH_PLACEHOLDER/lib/revng/analyses" \
          -DCMAKE_INSTALL_RPATH="$RPATH_PLACEHOLDER/lib:$RPATH_PLACEHOLDER/lib64/clang/12.0.0/lib/linux:$RPATH_PLACEHOLDER/lib/revng/analyses" \
          -DCMAKE_BUILD_TYPE="Debug" \
          -DPython_FIND_VIRTUALENV=STANDARD


      "dependencies": []
      "install": |2+


        cmake --build "$BUILD_DIR" ${JOBS:+-j$JOBS}



        cmake --install "$BUILD_DIR"


      "ndebug": !!bool |-
        false
    "optimized":
      "build_dependencies":
      - |-
        cmake
      - |-
        ninja
      - |-
        host-c-toolchain
      "configure": |2+


        mkdir -p "$BUILD_DIR"


        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        extract.sh "https://github.com/libexpat/libexpat/releases/download/R_2_4_8/expat-2.4.8.tar.gz"


        cd "$BUILD_DIR";
        cmake \
          -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
          -DCMAKE_INSTALL_SO_NO_EXE=0 \
          -DCMAKE_INSTALL_PREFIX="$ORCHESTRA_ROOT" \
          -DCMAKE_PREFIX_PATH="$ORCHESTRA_ROOT" \
          "$SOURCE_DIR" \
          -G"Ninja" \
          -DCMAKE_C_COMPILER="$ORCHESTRA_ROOT/link-only/bin/clang" \
          -DCMAKE_CXX_COMPILER="$ORCHESTRA_ROOT/link-only/bin/clang++" \
          -DCMAKE_C_FLAGS="-ggdb3 -O2 -fno-omit-frame-pointer   " \
          -DCMAKE_CXX_FLAGS="-ggdb3 -O2 -fno-omit-frame-pointer   " \
          -DCMAKE_BUILD_RPATH="$RPATH_PLACEHOLDER/lib:$RPATH_PLACEHOLDER/lib64/clang/12.0.0/lib/linux:$RPATH_PLACEHOLDER/lib/revng/analyses" \
          -DCMAKE_INSTALL_RPATH="$RPATH_PLACEHOLDER/lib:$RPATH_PLACEHOLDER/lib64/clang/12.0.0/lib/linux:$RPATH_PLACEHOLDER/lib/revng/analyses" \
          -DCMAKE_BUILD_TYPE="Debug" \
          -DPython_FIND_VIRTUALENV=STANDARD


      "dependencies": []
      "install": |2+


        cmake --build "$BUILD_DIR" ${JOBS:+-j$JOBS}



        cmake --install "$BUILD_DIR"


      "ndebug": !!bool |-
        false
    "release":
      "build_dependencies":
      - |-
        cmake
      - |-
        ninja
      - |-
        host-c-toolchain
      "configure": |2+


        mkdir -p "$BUILD_DIR"


        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        extract.sh "https://github.com/libexpat/libexpat/releases/download/R_2_4_8/expat-2.4.8.tar.gz"


        cd "$BUILD_DIR";
        cmake \
          -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
          -DCMAKE_INSTALL_SO_NO_EXE=0 \
          -DCMAKE_INSTALL_PREFIX="$ORCHESTRA_ROOT" \
          -DCMAKE_PREFIX_PATH="$ORCHESTRA_ROOT" \
          "$SOURCE_DIR" \
          -G"Ninja" \
          -DCMAKE_C_COMPILER="$ORCHESTRA_ROOT/link-only/bin/clang" \
          -DCMAKE_CXX_COMPILER="$ORCHESTRA_ROOT/link-only/bin/clang++" \
          -DCMAKE_C_FLAGS="-ggdb3 -O2   " \
          -DCMAKE_CXX_FLAGS="-ggdb3 -O2   " \
          -DCMAKE_BUILD_RPATH="$RPATH_PLACEHOLDER/lib:$RPATH_PLACEHOLDER/lib64/clang/12.0.0/lib/linux:$RPATH_PLACEHOLDER/lib/revng/analyses" \
          -DCMAKE_INSTALL_RPATH="$RPATH_PLACEHOLDER/lib:$RPATH_PLACEHOLDER/lib64/clang/12.0.0/lib/linux:$RPATH_PLACEHOLDER/lib/revng/analyses" \
          -DCMAKE_BUILD_TYPE="Release" \
          -DPython_FIND_VIRTUALENV=STANDARD


      "dependencies": []
      "install": |2+


        cmake --build "$BUILD_DIR" ${JOBS:+-j$JOBS}



        cmake --install "$BUILD_DIR"


      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    optimized
  "license": |-
    source/COPYING
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies": []
      "configure": |-
        mkdir -p "$BUILD_DIR"
      "dependencies":
      - |-
        gcc-runtime
      - |-
        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":
      - |-
        toolchain/host/gcc
      "configure": |
        mkdir -p "$BUILD_DIR"
      "dependencies": []
      "install": |+
        cd "$BUILD_DIR"
        cp -a "${ORCHESTRA_ROOT}/share/orchestra/toolchain_host_gcc.license" LICENSE.TXT
        tar xf "${ORCHESTRA_ROOT}/share/orchestra/save_for_later/gcc-runtime.tar.xz" \
          -C "${DESTDIR}${ORCHESTRA_ROOT}"

      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": |-
    LICENSE.TXT
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        host-c-toolchain
      - |-
        meson
      - |-
        ninja
      "configure": |
        mkdir -p "$BUILD_DIR/source"
        extract.sh --into "$BUILD_DIR/source" https://download.gnome.org/sources/glib/2.64/glib-2.64.5.tar.xz
        find "$BUILD_DIR/source/" -name meson.build -exec sed -i "s|install\s*:\s*|install_rpath : '$RPATH_PLACEHOLDER/lib', \0|" {} \;
        sed -i 's|^.*HAVE_LANGINFO_.*1.*$||' "$BUILD_DIR/source/meson.build"
        sed -i -e '/subdir.*tests/d' "$BUILD_DIR"/source/{.,gio,glib}/meson.build

        CC=clang \
        CXX=clang++ \
        meson setup \
          --buildtype plain \
          --libdir=lib \
          --prefix "$ORCHESTRA_ROOT" \
          --wrap-mode nodownload \
          -Ddefault_library=shared \
          -Dselinux=disabled \
          -Dxattr=false \
          -Dlibmount=disabled \
          -Dinternal_pcre=true \
          -Dman=false \
          -Ddtrace=false \
          -Dsystemtap=false \
          -Dgtk_doc=false \
          -Dfam=false \
          -Dinstalled_tests=false \
          -Dnls=disabled \
          "$BUILD_DIR" \
          "$BUILD_DIR/source"
      "dependencies":
      - |-
        libffi
      - |-
        zlib
      "install": |+
        cd "$BUILD_DIR"
        export LANG=
        ninja ${JOBS:+-j$JOBS}
        ninja ${JOBS:+-j$JOBS} install

      "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":
      - |-
        libgcc
      "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 -L$INSTALL_LINK_ONLY_PATH/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

        # 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": []
      "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": []
      "configure": |-
        mkdir -p "$BUILD_DIR"
      "dependencies":
      - |-
        glibc
      - |-
        toolchain/host/binutils
      - |-
        clang-release
      "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"
      "dependencies":
      - |-
        glibc
      - |-
        toolchain/host/binutils
      - |-
        clang-runtime
      - |-
        clang-release
      "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"
      "dependencies":
      - |-
        clang-runtime
      - |-
        gcc-runtime
      "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":
      - |-
        host-cxx-toolchain
      - |-
        python
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" https://github.com/unicode-org/icu/releases/download/release-71-1/icu4c-71_1-src.tgz

        cd "$BUILD_DIR"
        ./source/configure \
          --disable-static \
          --disable-debug \
          --disable-samples \
          --disable-tests \
          --enable-shared \
          --enable-tools \
          --prefix="$ORCHESTRA_ROOT"
      "dependencies":
      - |-
        host-libcxx
      "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": |-
    LICENSE
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies": []
      "configure": |
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR"

        fetch.sh --no-copy "${NON_REDISTRIBUTABLE_BASE_URL}/ida-installer"
        fetch.sh --no-copy "${NON_REDISTRIBUTABLE_BASE_URL}/ida.reg"
        INSTALLER="${SOURCE_ARCHIVES}/ida-installer"
        chmod +x "$INSTALLER"
      "dependencies":
      - |-
        ncurses
      "install": |
        if test -z "${IDA_INSTALLER_PASSWORD:-}"; then
          echo 'IDA_INSTALLER_PASSWORD is not set'
          exit 1
        fi

        # Install IDA in /opt/ida
        INSTALLER="${SOURCE_ARCHIVES}/ida-installer"
        INSTALL_DIR="$DESTDIR$ORCHESTRA_ROOT"
        IDA_INSTALL_DIR="$INSTALL_DIR/opt/ida"
        mkdir -p "$IDA_INSTALL_DIR"
        OLDHOME="$HOME"
        export HOME="$BUILD_DIR"
        unshare -rn \
          "$INSTALLER" \
          --installpassword "$IDA_INSTALLER_PASSWORD" \
          --prefix "$IDA_INSTALL_DIR" \
          --mode unattended
        export HOME="$OLDHOME"

        # Cleanup
        rm -f /tmp/installbuilder_installer*.log

        # Disable Python plugin
        rm "$IDA_INSTALL_DIR/plugins/idapython"*".so"

        # Copy ida.reg
        cp -a "${SOURCE_ARCHIVES}/ida.reg" "$IDA_INSTALL_DIR"

        # Create a symlink to ncurses
        ln -s ../../lib64/libcurses.so "$IDA_INSTALL_DIR/libcurses.so"

        # Copy the license to the build directory
        mkdir -p "$BUILD_DIR"
        cp "$IDA_INSTALL_DIR/license.txt" "$BUILD_DIR"

        # Create wrapper scripts in /bin
        mkdir -p "$INSTALL_DIR/bin"
        find "$IDA_INSTALL_DIR" -maxdepth 1 -type f -executable -name "ida*" | while read EXECUTABLE; do
          NAME="$(basename "$EXECUTABLE")"
          cat > "$INSTALL_DIR/bin/$NAME" <<'EOF'
        #!/bin/bash
        SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
        export IDAUSR="$(mktemp -d tmp.IDAUSR.XXXXXXXXXX)"
        trap 'rm -rf -- "$IDAUSR"' EXIT;
        cp -a "$SCRIPT_DIR/../opt/ida/ida.reg" "$IDAUSR"
        unshare -rn "$SCRIPT_DIR/../opt/ida/$(basename $0)" "$@"
        EOF
          chmod +x "$INSTALL_DIR/bin/$NAME"
        done
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": |-
    license.txt
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        host-c-toolchain
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" https://github.com/BLAKE2/libb2/releases/download/v0.98.1/libb2-0.98.1.tar.gz

        cd "$BUILD_DIR"
        ./configure \
          --disable-static \
          --disable-native \
          --enable-shared \
          --enable-fat \
          --prefix="$ORCHESTRA_ROOT"
      "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":
      - |-
        gcc-host-toolchain
      - |-
        glibc
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" https://thrysoee.dk/editline/libedit-20221030-3.1.tar.gz
        cd "$BUILD_DIR"
        ./configure \
          --disable-examples \
          --disable-static \
          --enable-shared \
          --prefix="$ORCHESTRA_ROOT" \
          CFLAGS="-I$ORCHESTRA_ROOT/include/ncursesw"
      "dependencies":
      - |-
        ncurses
      "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":
      - |-
        host-c-toolchain
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" https://github.com/libffi/libffi/releases/download/v3.4.2/libffi-3.4.2.tar.gz

        cd "$BUILD_DIR"
        ./configure \
          --disable-multi-os-directory \
          --disable-static \
          --disable-pax_emutramp \
          --disable-debug \
          --prefix="$ORCHESTRA_ROOT"
      "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": |-
    LICENSE
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        toolchain/host/linux-headers
      - |-
        gmp
      - |-
        mpc
      - |-
        mpfr
      "configure": |
        mkdir -p "$BUILD_DIR/source"
        extract.sh --into "$BUILD_DIR/source" https://ftp.gnu.org/gnu/gcc/gcc-11.2.0/gcc-11.2.0.tar.gz

        cd "$BUILD_DIR"
        ./source/configure \
          --prefix="$INSTALL_LINK_ONLY_PATH" \
          --disable-multilib \
          --enable-languages=c \
          --disable-nls \
          --disable-libsanitizer \
          --with-glibc-version=2.13 \
          --with-gmp="$ORCHESTRA_ROOT" \
          --with-mpfr="$ORCHESTRA_ROOT" \
          --with-mpc="$ORCHESTRA_ROOT"
      "dependencies": []
      "install": |+
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS} all-gcc
        make ${JOBS:+-j$JOBS} all-target-libgcc
        make ${JOBS:+-j$JOBS} install-target-libgcc
        cp -a "${DESTDIR}${INSTALL_LINK_ONLY_PATH}"/lib/gcc/x86_64-pc-linux-gnu/11.2.0/*.{a,o} "${DESTDIR}${INSTALL_LINK_ONLY_PATH}"/lib/

        mkdir -p "${DESTDIR}${INSTALL_LINK_ONLY_PATH}"/include/
        cp -a "${DESTDIR}${INSTALL_LINK_ONLY_PATH}"/lib/gcc/x86_64-pc-linux-gnu/11.2.0/include/* "${DESTDIR}${INSTALL_LINK_ONLY_PATH}"/include/

      "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":
      - |-
        gcc-host-toolchain
      - |-
        glibc
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" https://download.savannah.nongnu.org/releases/libunwind/libunwind-1.6.2.tar.gz
        cd "$BUILD_DIR"
        export CC="cc -fcommon"
        ./configure \
          --enable-cxx-exceptions \
          --disable-coredump \
          --disable-ptrace \
          --enable-setjmp \
          --disable-debug-frame \
          --disable-documentation \
          --disable-minidebuginfo \
          --disable-static \
          --disable-conservative_checks \
          --disable-debug \
          --prefix="$ORCHESTRA_ROOT"
      "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":
      - |-
        host-c-toolchain
      - |-
        xtrans
      - |-
        x11/xproto
      - |-
        x11/xextproto
      - |-
        x11/kbproto
      - |-
        x11/inputproto
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" "https://www.x.org/releases/individual/lib/libX11-1.8.4.tar.xz"

        cd "$BUILD_DIR"
        ./configure \
          --prefix="$ORCHESTRA_ROOT" \
          --enable-shared \
          --disable-static \
          --disable-selective-werror \
          --without-xmlto --without-fop --without-xsltproc --disable-specs --enable-ipv6
      "dependencies":
      - |-
        libxcb
      "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":
      - |-
        host-c-toolchain
      "configure": "mkdir -p \"$BUILD_DIR\"\nextract.sh --into \"$BUILD_DIR\" \"https://xorg.freedesktop.org/releases/individual/lib/libXau-1.0.11.tar.xz\"\n\ncd \"$BUILD_DIR\"\n./configure \\\n  --prefix=\"$ORCHESTRA_ROOT\" \\\n  --enable-shared \\\n  --disable-static \\\n  --disable-selective-werror\n  \n"
      "dependencies":
      - |-
        x11/xproto
      "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":
      - |-
        host-c-toolchain
      - |-
        python
      - |-
        x11/xcb-proto
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" "https://xorg.freedesktop.org/archive/individual/lib/libxcb-1.15.tar.xz"

        cd "$BUILD_DIR"
        ./configure \
          --prefix="$ORCHESTRA_ROOT" \
          --enable-shared \
          --disable-static \
          --disable-selective-werror \
          --disable-devel-docs --disable-selinux
      "dependencies":
      - |-
        libxau
      "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":
      - |-
        host-c-toolchain
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" https://github.com/besser82/libxcrypt/releases/download/v4.4.28/libxcrypt-4.4.28.tar.xz

        cd "$BUILD_DIR"
        # By specifying --enable-obsolete-api=glibc we're providing libcrypt.so.1
        # and not libcrypt.so.2. Python seems to link only to the former.
        # The latter should be preferred but we'd rather not ship both.
        ./configure \
          --prefix="$ORCHESTRA_ROOT" \
          --disable-static \
          --enable-hashes=strong,glibc \
          --enable-obsolete-api=glibc \
          --disable-failure-tokens
      "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.LIB
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        host-c-toolchain
      "configure": "mkdir -p \"$BUILD_DIR\"\nextract.sh --into \"$BUILD_DIR\" \"https://www.x.org/releases/individual/lib/libxkbfile-1.1.2.tar.xz\"\n\ncd \"$BUILD_DIR\"\n./configure \\\n  --prefix=\"$ORCHESTRA_ROOT\" \\\n  --enable-shared \\\n  --disable-static \\\n  --disable-selective-werror\n  \n"
      "dependencies":
      - |-
        libx11
      "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":
      - |-
        ninja
      - |-
        host-c-toolchain
      - |-
        cmake
      "configure": "mkdir -p \"$BUILD_DIR/source\"\nextract.sh --into \"$BUILD_DIR/source\" \"https://github.com/yaml/libyaml/archive/refs/tags/0.2.5.tar.gz\"\ncd \"$BUILD_DIR\"\ncmake \"$BUILD_DIR/source\" \\\n  -GNinja \\\n  -DCMAKE_BUILD_TYPE=Release \\\n  -DBUILD_SHARED_LIBS=On \\\n  -DCMAKE_INSTALL_PREFIX=\"$ORCHESTRA_ROOT\"    \n"
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        ninja ${JOBS:+-j$JOBS} install
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": |-
    source/License
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies": []
      "configure": |-
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR"
        cat > requirements.txt <<'EOF'
        # lit version should always match clang-release and llvm version
        lit==12.0.0
        EOF

        pip-package-list.py \
          lit \
          -r requirements.txt \
          > packages.csv

        mkdir -p packages
        cd packages
        while IFS=, read -r NAME URL; do
          fetch.sh "$URL"
          echo "$NAME" >> "../package-list.txt"
        done < ../packages.csv
      "dependencies":
      - |-
        python-base-packages
      "install": |-
        cd "$BUILD_DIR"
        export HARD_FLAGS_COMPILE="-I"$("${ORCHESTRA_DOTDIR}/support/get-python-path" include)" $HARD_FLAGS_COMPILE"
        python \
          -m pip \
          --disable-pip-version-check \
          --no-python-version-warning \
          install \
          --compile \
          --no-index \
          --no-build-isolation \
          --no-warn-script-location \
          --ignore-installed \
          --root "$DESTDIR" \
          --verbose \
          packages/*

        PYTHON_PACKAGES_DIR="$DESTDIR$ORCHESTRA_ROOT/share/orchestra/python-packages/"
        mkdir -p "$PYTHON_PACKAGES_DIR"
        cp \
          -a \
          package-list.txt \
          "$PYTHON_PACKAGES_DIR/lit.txt"
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": !!null |-
    null
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "debug":
      "build_dependencies":
      - |-
        cmake
      - |-
        ninja
      - |-
        host-cxx-toolchain
      "configure": |
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR";
        cmake \
          -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
          -DCMAKE_INSTALL_SO_NO_EXE=0 \
          -DCMAKE_INSTALL_PREFIX="$ORCHESTRA_ROOT" \
          -DCMAKE_PREFIX_PATH="$ORCHESTRA_ROOT" \
          "$SOURCE_DIR/llvm" \
          -GNinja \
          -DCMAKE_BUILD_RPATH="\$ORIGIN/../lib:$ORCHESTRA_ROOT/lib" \
          -DCMAKE_INSTALL_RPATH="$RPATH_PLACEHOLDER/lib" \
          -DCMAKE_BUILD_TYPE="Debug" \
          -DCMAKE_EXE_LINKER_FLAGS="-ggdb3 -O0 " \
          -DCMAKE_SHARED_LINKER_FLAGS="-ggdb3 -O0 " \
          -DCMAKE_MODULE_LINKER_FLAGS="-ggdb3 -O0 " \
          -DCMAKE_C_FLAGS="-ggdb3 -O0 " \
          -DCMAKE_CXX_FLAGS="-ggdb3 -O0 " \
          -DLLVM_TARGETS_TO_BUILD="AArch64;ARM;Mips;SystemZ;X86" \
          -DLLVM_INSTALL_UTILS=ON \
          -DLLVM_ENABLE_DUMP=ON \
          -DLLVM_ENABLE_TERMINFO=OFF \
          -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF \
          -DCMAKE_CXX_STANDARD=20 \
          -DLLVM_ENABLE_Z3_SOLVER=OFF \
          -DLLVM_INCLUDE_GO_TESTS=OFF \
          -DLLVM_ENABLE_ZLIB=ON \
          -DLLVM_ENABLE_LIBEDIT=ON \
          -DBUILD_SHARED_LIBS=ON \
          -DLLVM_ENABLE_PROJECTS="clang;mlir" \
          -DCMAKE_C_COMPILER="$ORCHESTRA_ROOT/link-only/bin/clang" \
          -DCMAKE_CXX_COMPILER="$ORCHESTRA_ROOT/link-only/bin/clang++" \
          -DLLVM_ENABLE_OCAMLDOC=OFF \
          -Wno-dev
      "dependencies":
      - |-
        host-libcxx
      - |-
        libunwind
      - |-
        libedit
      - |-
        zlib
      - |-
        lit
      "install": |
        cd "$BUILD_DIR"
        ninja ${JOBS:+-j$JOBS} install

        if test "$RUN_TESTS" -eq 1; then
          ninja ${JOBS:+-j$JOBS} check-all
        fi

        # Keep only `opt`, `llvm-config` and mlir executables from `/bin`
        mkdir "${DESTDIR}${ORCHESTRA_ROOT}/bin-tmp"

        for EXECUTABLE_PREFIX in opt llvm-config llvm-symbolizer mlir-; do
          mv \
            "${DESTDIR}${ORCHESTRA_ROOT}/bin/$EXECUTABLE_PREFIX"* \
            "${DESTDIR}${ORCHESTRA_ROOT}/bin-tmp"
        done

        rm -rf "${DESTDIR}${ORCHESTRA_ROOT}/bin"

        mv \
          "${DESTDIR}${ORCHESTRA_ROOT}/bin-tmp" \
          "${DESTDIR}${ORCHESTRA_ROOT}/bin"
      "ndebug": !!bool |-
        false
    "optimized":
      "build_dependencies":
      - |-
        cmake
      - |-
        ninja
      - |-
        host-cxx-toolchain
      "configure": |
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR";
        cmake \
          -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
          -DCMAKE_INSTALL_SO_NO_EXE=0 \
          -DCMAKE_INSTALL_PREFIX="$ORCHESTRA_ROOT" \
          -DCMAKE_PREFIX_PATH="$ORCHESTRA_ROOT" \
          "$SOURCE_DIR/llvm" \
          -GNinja \
          -DCMAKE_BUILD_RPATH="\$ORIGIN/../lib:$ORCHESTRA_ROOT/lib" \
          -DCMAKE_INSTALL_RPATH="$RPATH_PLACEHOLDER/lib" \
          -DCMAKE_BUILD_TYPE="Debug" \
          -DCMAKE_EXE_LINKER_FLAGS="-ggdb3 -O2 -fno-omit-frame-pointer " \
          -DCMAKE_SHARED_LINKER_FLAGS="-ggdb3 -O2 -fno-omit-frame-pointer " \
          -DCMAKE_MODULE_LINKER_FLAGS="-ggdb3 -O2 -fno-omit-frame-pointer " \
          -DCMAKE_C_FLAGS="-ggdb3 -O2 -fno-omit-frame-pointer " \
          -DCMAKE_CXX_FLAGS="-ggdb3 -O2 -fno-omit-frame-pointer " \
          -DLLVM_TARGETS_TO_BUILD="AArch64;ARM;Mips;SystemZ;X86" \
          -DLLVM_INSTALL_UTILS=ON \
          -DLLVM_ENABLE_DUMP=ON \
          -DLLVM_ENABLE_TERMINFO=OFF \
          -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF \
          -DCMAKE_CXX_STANDARD=20 \
          -DLLVM_ENABLE_Z3_SOLVER=OFF \
          -DLLVM_INCLUDE_GO_TESTS=OFF \
          -DLLVM_ENABLE_ZLIB=ON \
          -DLLVM_ENABLE_LIBEDIT=ON \
          -DBUILD_SHARED_LIBS=ON \
          -DLLVM_ENABLE_PROJECTS="clang;mlir" \
          -DCMAKE_C_COMPILER="$ORCHESTRA_ROOT/link-only/bin/clang" \
          -DCMAKE_CXX_COMPILER="$ORCHESTRA_ROOT/link-only/bin/clang++" \
          -DLLVM_ENABLE_OCAMLDOC=OFF \
          -Wno-dev
      "dependencies":
      - |-
        host-libcxx
      - |-
        libunwind
      - |-
        libedit
      - |-
        zlib
      - |-
        lit
      "install": |
        cd "$BUILD_DIR"
        ninja ${JOBS:+-j$JOBS} install

        if test "$RUN_TESTS" -eq 1; then
          ninja ${JOBS:+-j$JOBS} check-all
        fi

        # Keep only `opt`, `llvm-config` and mlir executables from `/bin`
        mkdir "${DESTDIR}${ORCHESTRA_ROOT}/bin-tmp"

        for EXECUTABLE_PREFIX in opt llvm-config llvm-symbolizer mlir-; do
          mv \
            "${DESTDIR}${ORCHESTRA_ROOT}/bin/$EXECUTABLE_PREFIX"* \
            "${DESTDIR}${ORCHESTRA_ROOT}/bin-tmp"
        done

        rm -rf "${DESTDIR}${ORCHESTRA_ROOT}/bin"

        mv \
          "${DESTDIR}${ORCHESTRA_ROOT}/bin-tmp" \
          "${DESTDIR}${ORCHESTRA_ROOT}/bin"
      "ndebug": !!bool |-
        false
    "release":
      "build_dependencies":
      - |-
        cmake
      - |-
        ninja
      - |-
        host-cxx-toolchain
      "configure": |
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR";
        cmake \
          -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
          -DCMAKE_INSTALL_SO_NO_EXE=0 \
          -DCMAKE_INSTALL_PREFIX="$ORCHESTRA_ROOT" \
          -DCMAKE_PREFIX_PATH="$ORCHESTRA_ROOT" \
          "$SOURCE_DIR/llvm" \
          -GNinja \
          -DCMAKE_BUILD_RPATH="\$ORIGIN/../lib:$ORCHESTRA_ROOT/lib" \
          -DCMAKE_INSTALL_RPATH="$RPATH_PLACEHOLDER/lib" \
          -DCMAKE_BUILD_TYPE="Release" \
          -DCMAKE_EXE_LINKER_FLAGS="-ggdb3 -O2 " \
          -DCMAKE_SHARED_LINKER_FLAGS="-ggdb3 -O2 " \
          -DCMAKE_MODULE_LINKER_FLAGS="-ggdb3 -O2 " \
          -DCMAKE_C_FLAGS="-ggdb3 -O2 " \
          -DCMAKE_CXX_FLAGS="-ggdb3 -O2 " \
          -DLLVM_TARGETS_TO_BUILD="AArch64;ARM;Mips;SystemZ;X86" \
          -DLLVM_INSTALL_UTILS=ON \
          -DLLVM_ENABLE_DUMP=ON \
          -DLLVM_ENABLE_TERMINFO=OFF \
          -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF \
          -DCMAKE_CXX_STANDARD=20 \
          -DLLVM_ENABLE_Z3_SOLVER=OFF \
          -DLLVM_INCLUDE_GO_TESTS=OFF \
          -DLLVM_ENABLE_ZLIB=ON \
          -DLLVM_ENABLE_LIBEDIT=ON \
          -DBUILD_SHARED_LIBS=ON \
          -DLLVM_ENABLE_PROJECTS="clang;mlir" \
          -DCMAKE_C_COMPILER="$ORCHESTRA_ROOT/link-only/bin/clang" \
          -DCMAKE_CXX_COMPILER="$ORCHESTRA_ROOT/link-only/bin/clang++" \
          -DLLVM_ENABLE_OCAMLDOC=OFF \
          -Wno-dev
      "dependencies":
      - |-
        host-libcxx
      - |-
        libunwind
      - |-
        libedit
      - |-
        zlib
      - |-
        lit
      "install": |
        cd "$BUILD_DIR"
        ninja ${JOBS:+-j$JOBS} install

        if test "$RUN_TESTS" -eq 1; then
          ninja ${JOBS:+-j$JOBS} check-all
        fi

        # Keep only `opt`, `llvm-config` and mlir executables from `/bin`
        mkdir "${DESTDIR}${ORCHESTRA_ROOT}/bin-tmp"

        for EXECUTABLE_PREFIX in opt llvm-config llvm-symbolizer mlir-; do
          mv \
            "${DESTDIR}${ORCHESTRA_ROOT}/bin/$EXECUTABLE_PREFIX"* \
            "${DESTDIR}${ORCHESTRA_ROOT}/bin-tmp"
        done

        rm -rf "${DESTDIR}${ORCHESTRA_ROOT}/bin"

        mv \
          "${DESTDIR}${ORCHESTRA_ROOT}/bin-tmp" \
          "${DESTDIR}${ORCHESTRA_ROOT}/bin"
      "ndebug": !!bool |-
        true
  "commit": |-
    6e1f5f0fd75d7e9f0f2532dffa19969459641ea2
  "default_build": |-
    optimized
  "license": |-
    llvm/LICENSE.TXT
  "repository": |-
    llvm-project
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        cmake
      "configure": |
        rm -rf "$BUILD_DIR"
        mkdir -p $(dirname "$BUILD_DIR")
        cp -far --reflink=auto "$SOURCE_DIR" "$BUILD_DIR"
        mkdir -p "$BUILD_DIR/build"

        sed 's|FILE_PATTERNS|#FILE_PATTERNS|' -i "$BUILD_DIR"/*/docs/doxygen.cfg.in

        cd "$BUILD_DIR/build";
        cmake "$BUILD_DIR/llvm" \
          -DCMAKE_BUILD_TYPE="Debug" \
          -DLLVM_BUILD_DOCS=ON \
          -DLLVM_ENABLE_DOXYGEN=ON \
          -DLLVM_DOXYGEN_SVG=ON \
          -DLLVM_TARGETS_TO_BUILD="X86" \
          -DBUILD_SHARED_LIBS=ON \
          -DLLVM_ENABLE_PROJECTS="clang;mlir" \
          -Wno-dev
      "dependencies":
      - |-
        llvm
      "install": |
        if ! test -s "$BUILD_DIR/build/docs/doxygen/html/Makefile"; then
          make ${JOBS:+-j$JOBS} -C "$BUILD_DIR/build" doxygen-llvm
          make ${JOBS:+-j$JOBS} -C "$BUILD_DIR/build" doxygen-clang
          make ${JOBS:+-j$JOBS} -C "$BUILD_DIR/build" doxygen-mlir
        fi

        function make_docset {
          cd "$1"
          sed -i 's|$(XCODE_INSTALL)/usr/bin/docsetutil|'$ORCHESTRA_DOTDIR'/support/docsetutil|' Makefile
          sed -i 's|XCODE_INSTALL="$(shell xcode-select -print-path)"||' Makefile
          sed -i 's|<string>doxygen</string>|<string>'"$2"'</string>|' Info.plist
          sed -i 's|</dict>|<key>isJavaScriptEnabled</key><true/>\n</dict>|' Info.plist
          make ${JOBS:+-j$JOBS}
          find "$2.docset/Contents/Resources/Documents" -iname "*.html" | xargs -n 10 sed -i -s 's/ inherit / /'

          download_file.sh "$2.docset/Contents/Resources/Documents" \
                           "https://opensource.apple.com/source/lldb/lldb-310.2.36/www/cpp_reference/html" \
                           "dynsections.js"
        }

        make_docset $BUILD_DIR/build/docs/doxygen/html/ llvm
        make_docset $BUILD_DIR/build/tools/clang/docs/doxygen/html/ clang
        make_docset $BUILD_DIR/build/tools/mlir/docs/doxygen/html/ mlir

        mkdir -p "${DESTDIR}${ORCHESTRA_ROOT}/share/doc/"{llvm,clang,mlir}
        cp -far --reflink=auto "$BUILD_DIR/build/docs/doxygen/html/llvm.docset" "${DESTDIR}${ORCHESTRA_ROOT}/share/doc/llvm"
        cp -far --reflink=auto "$BUILD_DIR/build/tools/clang/docs/doxygen/html/clang.docset" "${DESTDIR}${ORCHESTRA_ROOT}/share/doc/clang"
        cp -far --reflink=auto "$BUILD_DIR/build/tools/mlir/docs/doxygen/html/mlir.docset" "${DESTDIR}${ORCHESTRA_ROOT}/share/doc/mlir"

        cat <<EOF
        To install the Zeal docset run the following commands from command line:
        ZEAL_PATH="\${XDG_DATA_HOME:-\$HOME/.local/share}/Zeal/Zeal/docsets/"
        ln -s \$(realpath -m --relative-to "\$ZEAL_PATH" \$ORCHESTRA_ROOT/share/doc/llvm/llvm.docset) "\$ZEAL_PATH"
        ln -s \$(realpath -m --relative-to "\$ZEAL_PATH" \$ORCHESTRA_ROOT/share/doc/clang/clang.docset) "\$ZEAL_PATH"
        ln -s \$(realpath -m --relative-to "\$ZEAL_PATH" \$ORCHESTRA_ROOT/share/doc/clang/mlir.docset) "\$ZEAL_PATH"
        EOF
      "ndebug": !!bool |-
        true
  "commit": |-
    6e1f5f0fd75d7e9f0f2532dffa19969459641ea2
  "default_build": |-
    default
  "license": |-
    llvm/LICENSE.TXT
  "repository": |-
    llvm-project
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies": []
      "configure": |-
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR"
        cat > requirements.txt <<'EOF'
        meson==0.56.2
        EOF

        pip-package-list.py \
          meson \
          -r requirements.txt \
          > packages.csv

        mkdir -p packages
        cd packages
        while IFS=, read -r NAME URL; do
          fetch.sh "$URL"
          echo "$NAME" >> "../package-list.txt"
        done < ../packages.csv
      "dependencies":
      - |-
        python-base-packages
      "install": |-
        cd "$BUILD_DIR"
        export HARD_FLAGS_COMPILE="-I"$("${ORCHESTRA_DOTDIR}/support/get-python-path" include)" $HARD_FLAGS_COMPILE"
        python \
          -m pip \
          --disable-pip-version-check \
          --no-python-version-warning \
          install \
          --compile \
          --no-index \
          --no-build-isolation \
          --no-warn-script-location \
          --ignore-installed \
          --root "$DESTDIR" \
          --verbose \
          packages/*

        PYTHON_PACKAGES_DIR="$DESTDIR$ORCHESTRA_ROOT/share/orchestra/python-packages/"
        mkdir -p "$PYTHON_PACKAGES_DIR"
        cp \
          -a \
          package-list.txt \
          "$PYTHON_PACKAGES_DIR/meson.txt"
      "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"
        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": []
      "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": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        gcc-host-toolchain
      - |-
        glibc
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.3.tar.gz
        cd "$BUILD_DIR"
        ./configure \
          --enable-pc-files \
          --enable-widec \
          --with-cxx \
          --with-cxx-binding \
          --with-cxx-shared \
          --with-shared \
          --with-versioned-syms \
          --with-xterm-kbs=del \
          --with-manpage-format=normal \
          --without-ada \
          --without-assertions \
          --without-debug \
          --without-dlsym \
          --without-expanded \
          --without-gpm \
          --without-hashed-db \
          --without-profile \
          --without-tack \
          --without-tests \
          --without-trace \
          --prefix="$ORCHESTRA_ROOT" \
          --with-pkg-config-libdir="$ORCHESTRA_ROOT/lib/pkgconfig"
      "dependencies": []
      "install": |+
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make ${JOBS:+-j$JOBS} install DESTDIR="$DESTDIR"

        INSTALLDIR="${DESTDIR}${ORCHESTRA_ROOT}"

        # Adapted from ArchLinux PKGBUILD
        # fool packages looking to link to non-wide-character ncurses libraries
        for lib in ncurses ncurses++ form panel menu; do
          printf "INPUT(-l%sw)\n" "${lib}" > "$INSTALLDIR/lib/lib${lib}.so"
          ln -sv lib${lib}w.so.6.3 "$INSTALLDIR/lib/lib${lib}.so.6.3"
          ln -sv lib${lib}w.so.6.3 "$INSTALLDIR/lib/lib${lib}.so.6"
          ln -sv ${lib}w.pc "$INSTALLDIR/lib/pkgconfig/${lib}.pc"
        done

        # some packages look for -lcurses during build
        printf 'INPUT(-lncursesw)\n' > "$INSTALLDIR/lib/libcursesw.so"
        ln -sv libncurses.so "$INSTALLDIR/lib/libcurses.so"

        # tic and ticinfo functionality is built in by default
        # make sure that anything linking against it links against libncursesw.so instead
        for lib in tic tinfo; do
          printf "INPUT(libncursesw.so.6)\n" > "$INSTALLDIR/lib/lib${lib}.so"
          ln -sv libncursesw.so.6.3 "$INSTALLDIR/lib/lib${lib}.so.6.3"
          ln -sv libncursesw.so.6.3 "$INSTALLDIR/lib/lib${lib}.so.6"
          ln -sv ncursesw.pc "$INSTALLDIR/lib/pkgconfig/${lib}.pc"
        done

      "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":
      - |-
        cmake
      "configure": |
        mkdir -p "$BUILD_DIR/build"
        extract.sh --into "$BUILD_DIR" https://github.com/ninja-build/ninja/archive/refs/tags/v1.11.0.tar.gz
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/ninja-shell-for-rule.patch" "$BUILD_DIR"
        cd "$BUILD_DIR/build"
        cmake \
          "$BUILD_DIR" \
          -Wno-dev \
          -DCMAKE_BUILD_TYPE=Release \
          -DCMAKE_INSTALL_PREFIX=$ORCHESTRA_ROOT
      "dependencies": []
      "install": |
        cd "$BUILD_DIR/build"
        make ${JOBS:+-j$JOBS}
        make ${JOBS:+-j$JOBS} install
      "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":
      - |-
        host-c-toolchain
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" https://github.com/openssl/openssl/archive/refs/tags/OpenSSL_1_1_1q.tar.gz

        #@ # Note: openssldir is set to /etc/ssl; we assume that distros provide this.
        #@ # On distros that don't, the following check will fail at build-time,
        #@ # but unfortunately not at install-time when binary archives are used.
        if ! [[ -d /etc/ssl ]]; then
          echo "Error: openssldir /etc/ssl is missing in host root!" >&2
          exit 1
        fi

        cd "$BUILD_DIR"
        ./Configure \
          --prefix="$ORCHESTRA_ROOT" \
          --openssldir="/etc/ssl" \
          --libdir=lib64 \
          linux-x86_64 \
          enable-camellia \
          enable-ec \
          enable-ec2m \
          enable-sm2 \
          enable-srp \
          enable-idea \
          enable-mdc2 \
          enable-rc5 \
          no-ssl3 \
          no-ssl3-method \
          enable-asm \
          no-rfc3779 \
          no-sctp \
          no-tests \
          no-zlib \
          no-heartbeats \
          no-weak-ssl-ciphers \
          shared \
          threads
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make ${JOBS:+-j$JOBS} install_sw DESTDIR="$DESTDIR"
        find "$DESTDIR" -name "*.a" -delete
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": |-
    LICENSE
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        host-c-toolchain
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" https://www.python.org/ftp/python/3.11.0/Python-3.11.0.tar.xz

        # Implicitly force PYTHONNOUSERSITE
        sed -i \
          's/if (no_user_site_directory)/if (1)/' \
          "$BUILD_DIR/Python/initconfig.c"

        cd "$BUILD_DIR"

        # orchestra's libc has a buggy getaddrinfo; we expect users to have a newer libc
        ac_cv_buggy_getaddrinfo=no ./configure \
          --prefix="$ORCHESTRA_ROOT" \
          --libdir="${ORCHESTRA_ROOT}/lib64" \
          --enable-optimizations \
          --enable-shared \
          --enable-ipv6 \
          --disable-test-modules \
          --with-ensurepip=install \
          --with-lto \
          --with-readline \
          --with-system-ffi \
          --with-system-expat \
          --without-static-libpython

        grep -v HAVE_SYS_AUXV_H pyconfig.h > pyconfig.h.tmp
        mv pyconfig.h.tmp pyconfig.h
      "dependencies":
      - |-
        bzip2
      - |-
        expat
      - |-
        libffi
      - |-
        libxcrypt
      - |-
        openssl
      - |-
        readline
      - |-
        sqlite
      - |-
        libb2
      - |-
        xz
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make ${JOBS:+-j$JOBS} install DESTDIR="$DESTDIR"

        INSTALLDIR="${DESTDIR}${ORCHESTRA_ROOT}"
        ln -s python3 "${INSTALLDIR}"/bin/python
        ln -s python3-config "${INSTALLDIR}"/bin/python-config
        ln -s idle3 "${INSTALLDIR}"/bin/idle
        ln -s pydoc3 "${INSTALLDIR}"/bin/pydoc
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": |-
    LICENSE
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies": []
      "configure": |-
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR"
        cat > requirements.txt <<'EOF'
        wheel
        no-manylinux
        EOF

        pip-package-list.py \
          python-base-packages \
          -r requirements.txt \
          > packages.csv

        mkdir -p packages
        cd packages
        while IFS=, read -r NAME URL; do
          fetch.sh "$URL"
          echo "$NAME" >> "../package-list.txt"
        done < ../packages.csv
      "dependencies":
      - |-
        python
      "install": |-
        cd "$BUILD_DIR"
        export HARD_FLAGS_COMPILE="-I"$("${ORCHESTRA_DOTDIR}/support/get-python-path" include)" $HARD_FLAGS_COMPILE"
        python \
          -m pip \
          --disable-pip-version-check \
          --no-python-version-warning \
          install \
          --compile \
          --no-index \
          --no-build-isolation \
          --no-warn-script-location \
          --ignore-installed \
          --root "$DESTDIR" \
          --verbose \
          packages/*

        PYTHON_PACKAGES_DIR="$DESTDIR$ORCHESTRA_ROOT/share/orchestra/python-packages/"
        mkdir -p "$PYTHON_PACKAGES_DIR"
        cp \
          -a \
          package-list.txt \
          "$PYTHON_PACKAGES_DIR/python-base-packages.txt"
      "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"
        cd "$BUILD_DIR"
        cat > requirements.txt <<'EOF'
        --global-option=--with-libyaml
        pyyaml
        EOF

        pip-package-list.py \
          pyyaml \
          -r requirements.txt \
          > packages.csv

        mkdir -p packages
        cd packages
        while IFS=, read -r NAME URL; do
          fetch.sh "$URL"
          echo "$NAME" >> "../package-list.txt"
        done < ../packages.csv
      "dependencies":
      - |-
        libyaml
      - |-
        cython
      "install": |-
        cd "$BUILD_DIR"
        export HARD_FLAGS_COMPILE="-I"$("${ORCHESTRA_DOTDIR}/support/get-python-path" include)" $HARD_FLAGS_COMPILE"
        python \
          -m pip \
          --disable-pip-version-check \
          --no-python-version-warning \
          install \
          --compile \
          --no-index \
          --no-build-isolation \
          --no-warn-script-location \
          --ignore-installed \
          --root "$DESTDIR" \
          --verbose \
          packages/*

        PYTHON_PACKAGES_DIR="$DESTDIR$ORCHESTRA_ROOT/share/orchestra/python-packages/"
        mkdir -p "$PYTHON_PACKAGES_DIR"
        cp \
          -a \
          package-list.txt \
          "$PYTHON_PACKAGES_DIR/pyyaml.txt"
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": !!null |-
    null
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "debug":
      "build_dependencies":
      - |-
        host-c-toolchain
      "configure": |
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR";
        "$SOURCE_DIR/configure" \
          --cc="$ORCHESTRA_ROOT/link-only/bin/clang" \
          --prefix="$ORCHESTRA_ROOT" \
          --target-list=" arm-libtinycode arm-linux-user aarch64-libtinycode aarch64-linux-user i386-libtinycode i386-linux-user mips-libtinycode mips-linux-user mipsel-libtinycode mipsel-linux-user s390x-libtinycode s390x-linux-user x86_64-libtinycode x86_64-linux-user " \
          --disable-werror \
          --enable-llvm-helpers \
          --disable-kvm \
          --without-pixman \
          --disable-tools \
          --disable-system \
          --disable-libnfs \
          --disable-vde \
          --disable-gnutls \
          --disable-smartcard-nss \
          --disable-uuid \
          --disable-cap-ng \
          --python="$(which python2)" \
          --enable-debug \
          --extra-cflags="-ggdb3 -O0 "
      "dependencies":
      - |-
        zlib
      - |-
        glib
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS} install
      "ndebug": !!bool |-
        false
    "optimized":
      "build_dependencies":
      - |-
        host-c-toolchain
      "configure": |
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR";
        "$SOURCE_DIR/configure" \
          --cc="$ORCHESTRA_ROOT/link-only/bin/clang" \
          --prefix="$ORCHESTRA_ROOT" \
          --target-list=" arm-libtinycode arm-linux-user aarch64-libtinycode aarch64-linux-user i386-libtinycode i386-linux-user mips-libtinycode mips-linux-user mipsel-libtinycode mipsel-linux-user s390x-libtinycode s390x-linux-user x86_64-libtinycode x86_64-linux-user " \
          --disable-werror \
          --enable-llvm-helpers \
          --disable-kvm \
          --without-pixman \
          --disable-tools \
          --disable-system \
          --disable-libnfs \
          --disable-vde \
          --disable-gnutls \
          --disable-smartcard-nss \
          --disable-uuid \
          --disable-cap-ng \
          --python="$(which python2)" \
          --enable-debug \
          --extra-cflags="-ggdb3 -O2 -fno-omit-frame-pointer "
      "dependencies":
      - |-
        zlib
      - |-
        glib
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS} install
      "ndebug": !!bool |-
        false
    "release":
      "build_dependencies":
      - |-
        host-c-toolchain
      "configure": |
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR";
        "$SOURCE_DIR/configure" \
          --cc="$ORCHESTRA_ROOT/link-only/bin/clang" \
          --prefix="$ORCHESTRA_ROOT" \
          --target-list=" arm-libtinycode arm-linux-user aarch64-libtinycode aarch64-linux-user i386-libtinycode i386-linux-user mips-libtinycode mips-linux-user mipsel-libtinycode mipsel-linux-user s390x-libtinycode s390x-linux-user x86_64-libtinycode x86_64-linux-user " \
          --disable-werror \
          --enable-llvm-helpers \
          --disable-kvm \
          --without-pixman \
          --disable-tools \
          --disable-system \
          --disable-libnfs \
          --disable-vde \
          --disable-gnutls \
          --disable-smartcard-nss \
          --disable-uuid \
          --disable-cap-ng \
          --python="$(which python2)" \
          \
          --extra-cflags="-ggdb3 -O2 "
      "dependencies":
      - |-
        zlib
      - |-
        glib
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS} install
      "ndebug": !!bool |-
        true
  "commit": |-
    d884777c444291f056a0aca6ca799b28c28901b0
  "default_build": |-
    optimized
  "license": |-
    LICENSE
  "repository": |-
    qemu
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        host-c-toolchain
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" https://ftp.gnu.org/gnu/readline/readline-8.1.2.tar.gz

        cd "$BUILD_DIR"
        ./configure \
          --prefix="$ORCHESTRA_ROOT" \
          --enable-multibyte \
          --disable-static \
          --disable-install-examples \
          --with-curses
      "dependencies":
      - |-
        ncurses
      "install": |+
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS} SHLIB_LIBS=-lncurses
        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":
    "debug":
      "build_dependencies":
      - |-
        cmake
      - |-
        ninja
      - |-
        host-cxx-toolchain
      "configure": |2+


        mkdir -p "$BUILD_DIR"



        cd "$BUILD_DIR";
        cmake \
          -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
          -DCMAKE_INSTALL_SO_NO_EXE=0 \
          -DCMAKE_INSTALL_PREFIX="$ORCHESTRA_ROOT" \
          -DCMAKE_PREFIX_PATH="$ORCHESTRA_ROOT" \
          "$SOURCE_DIR" \
          -G"Ninja" \
          -DCMAKE_C_COMPILER="$ORCHESTRA_ROOT/link-only/bin/clang" \
          -DCMAKE_CXX_COMPILER="$ORCHESTRA_ROOT/link-only/bin/clang++" \
          -DCMAKE_C_FLAGS="-ggdb3 -O0  -fplugin=libclangTidyPlugin.so -Wl,--no-undefined -Wno-unused-command-line-argument -stdlib=libc++ -fuse-ld=lld " \
          -DCMAKE_CXX_FLAGS="-ggdb3 -O0  -fplugin=libclangTidyPlugin.so -Wl,--no-undefined -Wno-unused-command-line-argument -stdlib=libc++ -fuse-ld=lld " \
          -DCMAKE_BUILD_RPATH="$RPATH_PLACEHOLDER/lib:$RPATH_PLACEHOLDER/lib64/clang/12.0.0/lib/linux:$RPATH_PLACEHOLDER/lib/revng/analyses" \
          -DCMAKE_INSTALL_RPATH="$RPATH_PLACEHOLDER/lib:$RPATH_PLACEHOLDER/lib64/clang/12.0.0/lib/linux:$RPATH_PLACEHOLDER/lib/revng/analyses" \
          -DCMAKE_BUILD_TYPE="Debug" \
          -DPython_FIND_VIRTUALENV=STANDARD \
          -DBOOST_ROOT="$ORCHESTRA_ROOT" \
          -DBoost_NO_BOOST_CMAKE=On \
          -DBoost_NO_SYSTEM_PATHS=On


      "dependencies":
      - |-
        boost
      - |-
        host-libcxx
      - |-
        llvm
      - |-
        qemu
      - |-
        revng-python-dependencies
      - |-
        toolchain/host/binutils
      - |-
        revng-js-prerequisites
      "install": |2+


        cmake --build "$BUILD_DIR" ${JOBS:+-j$JOBS}


        if test "$RUN_TESTS" -eq 1; then
          cd "$BUILD_DIR"
          ctest --output-on-failure ${JOBS:+-j$JOBS}
          cd -
        fi


        cmake --install "$BUILD_DIR"


        if [ "$RUN_TESTS" -eq 1 ]; then
          cd "$SOURCE_DIR"
          ./libexec/revng/revng-check-conventions
        fi


      "ndebug": !!bool |-
        false
    "optimized":
      "build_dependencies":
      - |-
        cmake
      - |-
        ninja
      - |-
        host-cxx-toolchain
      "configure": |2+


        mkdir -p "$BUILD_DIR"



        cd "$BUILD_DIR";
        cmake \
          -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
          -DCMAKE_INSTALL_SO_NO_EXE=0 \
          -DCMAKE_INSTALL_PREFIX="$ORCHESTRA_ROOT" \
          -DCMAKE_PREFIX_PATH="$ORCHESTRA_ROOT" \
          "$SOURCE_DIR" \
          -G"Ninja" \
          -DCMAKE_C_COMPILER="$ORCHESTRA_ROOT/link-only/bin/clang" \
          -DCMAKE_CXX_COMPILER="$ORCHESTRA_ROOT/link-only/bin/clang++" \
          -DCMAKE_C_FLAGS="-ggdb3 -O2 -fno-omit-frame-pointer  -fplugin=libclangTidyPlugin.so -Wl,--no-undefined -Wno-unused-command-line-argument -stdlib=libc++ -fuse-ld=lld " \
          -DCMAKE_CXX_FLAGS="-ggdb3 -O2 -fno-omit-frame-pointer  -fplugin=libclangTidyPlugin.so -Wl,--no-undefined -Wno-unused-command-line-argument -stdlib=libc++ -fuse-ld=lld " \
          -DCMAKE_BUILD_RPATH="$RPATH_PLACEHOLDER/lib:$RPATH_PLACEHOLDER/lib64/clang/12.0.0/lib/linux:$RPATH_PLACEHOLDER/lib/revng/analyses" \
          -DCMAKE_INSTALL_RPATH="$RPATH_PLACEHOLDER/lib:$RPATH_PLACEHOLDER/lib64/clang/12.0.0/lib/linux:$RPATH_PLACEHOLDER/lib/revng/analyses" \
          -DCMAKE_BUILD_TYPE="Debug" \
          -DPython_FIND_VIRTUALENV=STANDARD \
          -DBOOST_ROOT="$ORCHESTRA_ROOT" \
          -DBoost_NO_BOOST_CMAKE=On \
          -DBoost_NO_SYSTEM_PATHS=On


      "dependencies":
      - |-
        boost
      - |-
        host-libcxx
      - |-
        llvm
      - |-
        qemu
      - |-
        revng-python-dependencies
      - |-
        toolchain/host/binutils
      - |-
        revng-js-prerequisites
      "install": |2+


        cmake --build "$BUILD_DIR" ${JOBS:+-j$JOBS}


        if test "$RUN_TESTS" -eq 1; then
          cd "$BUILD_DIR"
          ctest --output-on-failure ${JOBS:+-j$JOBS}
          cd -
        fi


        cmake --install "$BUILD_DIR"


        if [ "$RUN_TESTS" -eq 1 ]; then
          cd "$SOURCE_DIR"
          ./libexec/revng/revng-check-conventions
        fi


      "ndebug": !!bool |-
        false
    "release":
      "build_dependencies":
      - |-
        cmake
      - |-
        ninja
      - |-
        host-cxx-toolchain
      "configure": |2+


        mkdir -p "$BUILD_DIR"



        cd "$BUILD_DIR";
        cmake \
          -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
          -DCMAKE_INSTALL_SO_NO_EXE=0 \
          -DCMAKE_INSTALL_PREFIX="$ORCHESTRA_ROOT" \
          -DCMAKE_PREFIX_PATH="$ORCHESTRA_ROOT" \
          "$SOURCE_DIR" \
          -G"Ninja" \
          -DCMAKE_C_COMPILER="$ORCHESTRA_ROOT/link-only/bin/clang" \
          -DCMAKE_CXX_COMPILER="$ORCHESTRA_ROOT/link-only/bin/clang++" \
          -DCMAKE_C_FLAGS="-ggdb3 -O2  -fplugin=libclangTidyPlugin.so -Wl,--no-undefined -Wno-unused-command-line-argument -stdlib=libc++ -fuse-ld=lld " \
          -DCMAKE_CXX_FLAGS="-ggdb3 -O2  -fplugin=libclangTidyPlugin.so -Wl,--no-undefined -Wno-unused-command-line-argument -stdlib=libc++ -fuse-ld=lld " \
          -DCMAKE_BUILD_RPATH="$RPATH_PLACEHOLDER/lib:$RPATH_PLACEHOLDER/lib64/clang/12.0.0/lib/linux:$RPATH_PLACEHOLDER/lib/revng/analyses" \
          -DCMAKE_INSTALL_RPATH="$RPATH_PLACEHOLDER/lib:$RPATH_PLACEHOLDER/lib64/clang/12.0.0/lib/linux:$RPATH_PLACEHOLDER/lib/revng/analyses" \
          -DCMAKE_BUILD_TYPE="Release" \
          -DPython_FIND_VIRTUALENV=STANDARD \
          -DBOOST_ROOT="$ORCHESTRA_ROOT" \
          -DBoost_NO_BOOST_CMAKE=On \
          -DBoost_NO_SYSTEM_PATHS=On


      "dependencies":
      - |-
        boost
      - |-
        host-libcxx
      - |-
        llvm
      - |-
        qemu
      - |-
        revng-python-dependencies
      - |-
        toolchain/host/binutils
      - |-
        revng-js-prerequisites
      "install": |2+


        cmake --build "$BUILD_DIR" ${JOBS:+-j$JOBS}


        if test "$RUN_TESTS" -eq 1; then
          cd "$BUILD_DIR"
          ctest --output-on-failure ${JOBS:+-j$JOBS}
          cd -
        fi


        cmake --install "$BUILD_DIR"


        if [ "$RUN_TESTS" -eq 1 ]; then
          cd "$SOURCE_DIR"
          ./libexec/revng/revng-check-conventions
        fi


      "ndebug": !!bool |-
        true
  "commit": |-
    4d0eb7eecb78135db0a966ecb987506d357dd84e
  "default_build": |-
    optimized
  "license": |-
    LICENSE.md
  "repository": |-
    revng
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "debug":
      "build_dependencies":
      - |-
        cmake
      - |-
        ninja
      - |-
        host-cxx-toolchain
      "configure": |2+


        mkdir -p "$BUILD_DIR"



        cd "$BUILD_DIR";
        cmake \
          -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
          -DCMAKE_INSTALL_SO_NO_EXE=0 \
          -DCMAKE_INSTALL_PREFIX="$ORCHESTRA_ROOT" \
          -DCMAKE_PREFIX_PATH="$ORCHESTRA_ROOT" \
          "$SOURCE_DIR" \
          -G"Ninja" \
          -DCMAKE_C_COMPILER="$ORCHESTRA_ROOT/link-only/bin/clang" \
          -DCMAKE_CXX_COMPILER="$ORCHESTRA_ROOT/link-only/bin/clang++" \
          -DCMAKE_C_FLAGS="-ggdb3 -O0  -fplugin=libclangTidyPlugin.so -Wl,--no-undefined -Wno-unused-command-line-argument -stdlib=libc++ -fuse-ld=lld " \
          -DCMAKE_CXX_FLAGS="-ggdb3 -O0  -fplugin=libclangTidyPlugin.so -Wl,--no-undefined -Wno-unused-command-line-argument -stdlib=libc++ -fuse-ld=lld " \
          -DCMAKE_BUILD_RPATH="$RPATH_PLACEHOLDER/lib:$RPATH_PLACEHOLDER/lib64/clang/12.0.0/lib/linux:$RPATH_PLACEHOLDER/lib/revng/analyses" \
          -DCMAKE_INSTALL_RPATH="$RPATH_PLACEHOLDER/lib:$RPATH_PLACEHOLDER/lib64/clang/12.0.0/lib/linux:$RPATH_PLACEHOLDER/lib/revng/analyses" \
          -DCMAKE_BUILD_TYPE="Debug" \
          -DPython_FIND_VIRTUALENV=STANDARD \
          -DBOOST_ROOT="$ORCHESTRA_ROOT" \
          -DBoost_NO_BOOST_CMAKE=On \
          -DBoost_NO_SYSTEM_PATHS=On


      "dependencies":
      - |-
        host-libcxx
      - |-
        revng
      - |-
        boost
      "install": |2+


        cmake --build "$BUILD_DIR" ${JOBS:+-j$JOBS}


        if test "$RUN_TESTS" -eq 1; then
          cd "$BUILD_DIR"
          ctest --output-on-failure ${JOBS:+-j$JOBS}
          cd -
        fi


        cmake --install "$BUILD_DIR"


        if [ "$RUN_TESTS" -eq 1 ]; then
          cd "$SOURCE_DIR"
          revng check-conventions
        fi


      "ndebug": !!bool |-
        false
    "optimized":
      "build_dependencies":
      - |-
        cmake
      - |-
        ninja
      - |-
        host-cxx-toolchain
      "configure": |2+


        mkdir -p "$BUILD_DIR"



        cd "$BUILD_DIR";
        cmake \
          -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
          -DCMAKE_INSTALL_SO_NO_EXE=0 \
          -DCMAKE_INSTALL_PREFIX="$ORCHESTRA_ROOT" \
          -DCMAKE_PREFIX_PATH="$ORCHESTRA_ROOT" \
          "$SOURCE_DIR" \
          -G"Ninja" \
          -DCMAKE_C_COMPILER="$ORCHESTRA_ROOT/link-only/bin/clang" \
          -DCMAKE_CXX_COMPILER="$ORCHESTRA_ROOT/link-only/bin/clang++" \
          -DCMAKE_C_FLAGS="-ggdb3 -O2 -fno-omit-frame-pointer  -fplugin=libclangTidyPlugin.so -Wl,--no-undefined -Wno-unused-command-line-argument -stdlib=libc++ -fuse-ld=lld " \
          -DCMAKE_CXX_FLAGS="-ggdb3 -O2 -fno-omit-frame-pointer  -fplugin=libclangTidyPlugin.so -Wl,--no-undefined -Wno-unused-command-line-argument -stdlib=libc++ -fuse-ld=lld " \
          -DCMAKE_BUILD_RPATH="$RPATH_PLACEHOLDER/lib:$RPATH_PLACEHOLDER/lib64/clang/12.0.0/lib/linux:$RPATH_PLACEHOLDER/lib/revng/analyses" \
          -DCMAKE_INSTALL_RPATH="$RPATH_PLACEHOLDER/lib:$RPATH_PLACEHOLDER/lib64/clang/12.0.0/lib/linux:$RPATH_PLACEHOLDER/lib/revng/analyses" \
          -DCMAKE_BUILD_TYPE="Debug" \
          -DPython_FIND_VIRTUALENV=STANDARD \
          -DBOOST_ROOT="$ORCHESTRA_ROOT" \
          -DBoost_NO_BOOST_CMAKE=On \
          -DBoost_NO_SYSTEM_PATHS=On


      "dependencies":
      - |-
        host-libcxx
      - |-
        revng
      - |-
        boost
      "install": |2+


        cmake --build "$BUILD_DIR" ${JOBS:+-j$JOBS}


        if test "$RUN_TESTS" -eq 1; then
          cd "$BUILD_DIR"
          ctest --output-on-failure ${JOBS:+-j$JOBS}
          cd -
        fi


        cmake --install "$BUILD_DIR"


        if [ "$RUN_TESTS" -eq 1 ]; then
          cd "$SOURCE_DIR"
          revng check-conventions
        fi


      "ndebug": !!bool |-
        false
    "release":
      "build_dependencies":
      - |-
        cmake
      - |-
        ninja
      - |-
        host-cxx-toolchain
      "configure": |2+


        mkdir -p "$BUILD_DIR"



        cd "$BUILD_DIR";
        cmake \
          -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
          -DCMAKE_INSTALL_SO_NO_EXE=0 \
          -DCMAKE_INSTALL_PREFIX="$ORCHESTRA_ROOT" \
          -DCMAKE_PREFIX_PATH="$ORCHESTRA_ROOT" \
          "$SOURCE_DIR" \
          -G"Ninja" \
          -DCMAKE_C_COMPILER="$ORCHESTRA_ROOT/link-only/bin/clang" \
          -DCMAKE_CXX_COMPILER="$ORCHESTRA_ROOT/link-only/bin/clang++" \
          -DCMAKE_C_FLAGS="-ggdb3 -O2  -fplugin=libclangTidyPlugin.so -Wl,--no-undefined -Wno-unused-command-line-argument -stdlib=libc++ -fuse-ld=lld " \
          -DCMAKE_CXX_FLAGS="-ggdb3 -O2  -fplugin=libclangTidyPlugin.so -Wl,--no-undefined -Wno-unused-command-line-argument -stdlib=libc++ -fuse-ld=lld " \
          -DCMAKE_BUILD_RPATH="$RPATH_PLACEHOLDER/lib:$RPATH_PLACEHOLDER/lib64/clang/12.0.0/lib/linux:$RPATH_PLACEHOLDER/lib/revng/analyses" \
          -DCMAKE_INSTALL_RPATH="$RPATH_PLACEHOLDER/lib:$RPATH_PLACEHOLDER/lib64/clang/12.0.0/lib/linux:$RPATH_PLACEHOLDER/lib/revng/analyses" \
          -DCMAKE_BUILD_TYPE="Release" \
          -DPython_FIND_VIRTUALENV=STANDARD \
          -DBOOST_ROOT="$ORCHESTRA_ROOT" \
          -DBoost_NO_BOOST_CMAKE=On \
          -DBoost_NO_SYSTEM_PATHS=On


      "dependencies":
      - |-
        host-libcxx
      - |-
        revng
      - |-
        boost
      "install": |2+


        cmake --build "$BUILD_DIR" ${JOBS:+-j$JOBS}


        if test "$RUN_TESTS" -eq 1; then
          cd "$BUILD_DIR"
          ctest --output-on-failure ${JOBS:+-j$JOBS}
          cd -
        fi


        cmake --install "$BUILD_DIR"


        if [ "$RUN_TESTS" -eq 1 ]; then
          cd "$SOURCE_DIR"
          revng check-conventions
        fi


      "ndebug": !!bool |-
        true
  "commit": |-
    7edfffbbf8c3caa38ffcafcee739375245f0da56
  "default_build": |-
    optimized
  "license": |-
    LICENSE.md
  "repository": |-
    revng-c
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies": []
      "configure": |-
        mkdir -p "$BUILD_DIR"
      "dependencies":
      - |-
        test/revng
      - |-
        test/revng-c
      - |-
        toolchain/host/gdb
      - |-
        revng-vscode-web
      - |-
        llvm-documentation
      - |-
        revng-distributable
      "install": |-
        echo "Nothing to do"
      "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":
      - |-
        test/revng-qa
      - |-
        revng-c
      "configure": |
        mkdir -p "$BUILD_DIR"
      "dependencies": []
      "install": |+
        INSTALLER="$ORCHESTRA_DOTDIR/support/revng-distributable/install.sh"
        echo "78b71bd00bad92f99ba18d3c37a6653709615a2d26b600ea68dd3f556fcdc5b4 $INSTALLER" | \
          sha256sum --quiet -c -
        "$INSTALLER" revng-c

      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": ""
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    true
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies": []
      "configure": |
        JS_DIR="$ORCHESTRA_DOTDIR/support/js-prerequisites"
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR"
        cp -a "$JS_DIR/package.json" .

        # check that package.json has the right hash, this is to trigger a rebuild in orchestra
        # whenever we change the file
        echo 'fcb10a1055a762b77f844baf8348212fe7478d06c45427d70c2c2abd53d70229 package.json' | sha256sum -c -

        # Generate package lock
        "$ORCHESTRA_DOTDIR"/support/js-prerequisites/system-npm install --package-lock-only --silent

        # NOTE: until we install this component fetch-js-dependencies will only work with npm lockfiles
        #       due to yarn lockfiles needing the `@yarnpkg/lockfile` dependency installed to be read
        "$ORCHESTRA_DOTDIR"/support/fetch-js-dependencies npm -o ./.cache
      "dependencies": []
      "install": |+
        JS_DIR="$ORCHESTRA_DOTDIR/support/js-prerequisites"

        cd "$BUILD_DIR"
        mkdir "${DESTDIR}${ORCHESTRA_ROOT}/share/node_cache"

        # copy all download packages to node_cache
        cp -a .cache/*.tgz "${DESTDIR}${ORCHESTRA_ROOT}/share/node_cache"

        # copy the npm_static_repository tool
        cp -a "$JS_DIR/static-npm-registry" "${DESTDIR}${ORCHESTRA_ROOT}/libexec"
        cp -a "$JS_DIR/npm" "$JS_DIR/system-npm" \
          "${DESTDIR}${ORCHESTRA_ROOT}/bin"

        # Create npmrc
        cat - > "${DESTDIR}${ORCHESTRA_ROOT}/share/npmrc" << EOF
        EOF

        # Install packages needed for building
        export ORCHESTRA_NODE_CACHE="$BUILD_DIR/.cache:$ORCHESTRA_NODE_CACHE"

        # TODO: once we import node in orchestra, outline in its own component
        npm --global \
            --prefix="${DESTDIR}${ORCHESTRA_ROOT}" \
            install \
              yarn @yarnpkg/lockfile \
              prettier eslint lint-staged gts \
              eslint-plugin-node eslint-plugin-prettier \
              @typescript-eslint/eslint-plugin @typescript-eslint/parser

        # Overwrite yarn with our wrapper
        rm "${DESTDIR}${ORCHESTRA_ROOT}/bin/"{yarn,yarnpkg}
        cp -a "$JS_DIR/yarn" "${DESTDIR}${ORCHESTRA_ROOT}/bin/yarn"
        ln -s "yarn" "${DESTDIR}${ORCHESTRA_ROOT}/bin/yarnpkg"

      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": ""
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies": []
      "configure": |-
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR"
        cat > requirements.txt <<'EOF'
        # Python language checkers/formatters
        black>=22.12.0,<23.0
        flake8>=5.0.4,<6.0
        flake8-breakpoint>=1.1.0,<2.0
        flake8-builtins>=2.1.0,<3.0
        flake8-comprehensions>=3.10.1,<4.0
        flake8-eradicate>=1.4.0,<2.0
        flake8-return>=1.2.0,<2.0
        flake8-simplify>=0.19.3,<1.0
        pep8-naming>=0.13.3,<1.0
        isort>=5.11.4,<6.0
        mypy==0.982

        # Python types, needed for mypy to work correctly
        types-backports
        types-PyYAML
        types-requests
        types-urllib3

        # cmake-format executable
        cmakelang

        # Applications/Script dependencies
        aiodataloader
        ariadne[asgi-file-uploads]>=0.16
        cffi
        Jinja2
        gql[aiohttp]
        grandiso
        jsonschema
        networkx
        pefile
        pydot
        pyelftools

        # This is our fork of the python-idb package that includes some fixes.
        https://github.com/revng/python-idb/archive/08ba07a.tar.gz

        # pydot 3.0.2 introduced an incompatibility with pydot which is supposed to be
        # resolved in a later version, but still causes problems to us (for instance,
        # monotone framework headers generation fails), so we request v2.4.7.  See
        # https://github.com/pydot/pydot/issues/277
        pyparsing==2.4.7

        pytest
        pytest-asyncio
        requests
        requests-toolbelt
        rich

        # uvicorn[standard] but without watchfiles (since it requires rust)
        uvicorn==0.18.3
        httptools>=0.5.0
        python-dotenv>=0.13
        uvloop>=0.14.0,!=0.15.0,!=0.15.1
        websockets>=10.0

        xdg
        EOF

        pip-package-list.py \
          revng-python-dependencies \
          -r requirements.txt \
          > packages.csv

        mkdir -p packages
        cd packages
        while IFS=, read -r NAME URL; do
          fetch.sh "$URL"
          echo "$NAME" >> "../package-list.txt"
        done < ../packages.csv
      "dependencies":
      - |-
        python-base-packages
      - |-
        pyyaml
      - |-
        cython
      "install": |-
        cd "$BUILD_DIR"
        export HARD_FLAGS_COMPILE="-I"$("${ORCHESTRA_DOTDIR}/support/get-python-path" include)" $HARD_FLAGS_COMPILE"
        python \
          -m pip \
          --disable-pip-version-check \
          --no-python-version-warning \
          install \
          --compile \
          --no-index \
          --no-build-isolation \
          --no-warn-script-location \
          --ignore-installed \
          --root "$DESTDIR" \
          --verbose \
          packages/*

        PYTHON_PACKAGES_DIR="$DESTDIR$ORCHESTRA_ROOT/share/orchestra/python-packages/"
        mkdir -p "$PYTHON_PACKAGES_DIR"
        cp \
          -a \
          package-list.txt \
          "$PYTHON_PACKAGES_DIR/revng-python-dependencies.txt"
      "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":
      - |-
        cmake
      - |-
        ninja
      - |-
        host-cxx-toolchain
      "configure": |
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR"
        cmake \
          -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
          -DCMAKE_INSTALL_SO_NO_EXE=0 \
          -DCMAKE_INSTALL_PREFIX="$ORCHESTRA_ROOT" \
          -DCMAKE_PREFIX_PATH="$ORCHESTRA_ROOT" "$SOURCE_DIR"
      "dependencies":
      - |-
        revng-qa-python-dependencies
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make ${JOBS:+-j$JOBS} install DESTDIR="$DESTDIR"
      "ndebug": !!bool |-
        true
  "commit": |-
    6e555bed221d2659c36a594803d6ca15a5adc032
  "default_build": |-
    default
  "license": |-
    LICENSE
  "repository": |-
    revng-qa
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies": []
      "configure": |-
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR"
        cat > requirements.txt <<'EOF'
        expandvars
        jinja2
        EOF

        pip-package-list.py \
          revng-qa-python-dependencies \
          -r requirements.txt \
          > packages.csv

        mkdir -p packages
        cd packages
        while IFS=, read -r NAME URL; do
          fetch.sh "$URL"
          echo "$NAME" >> "../package-list.txt"
        done < ../packages.csv
      "dependencies":
      - |-
        pyyaml
      - |-
        python-base-packages
      "install": |-
        cd "$BUILD_DIR"
        export HARD_FLAGS_COMPILE="-I"$("${ORCHESTRA_DOTDIR}/support/get-python-path" include)" $HARD_FLAGS_COMPILE"
        python \
          -m pip \
          --disable-pip-version-check \
          --no-python-version-warning \
          install \
          --compile \
          --no-index \
          --no-build-isolation \
          --no-warn-script-location \
          --ignore-installed \
          --root "$DESTDIR" \
          --verbose \
          packages/*

        PYTHON_PACKAGES_DIR="$DESTDIR$ORCHESTRA_ROOT/share/orchestra/python-packages/"
        mkdir -p "$PYTHON_PACKAGES_DIR"
        cp \
          -a \
          package-list.txt \
          "$PYTHON_PACKAGES_DIR/revng-qa-python-dependencies.txt"
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": !!null |-
    null
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "debug":
      "build_dependencies":
      - |-
        revng-js-prerequisites
      "configure": |
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR"
        cp -a "$SOURCE_DIR/"package{,-lock}.json .
        "$ORCHESTRA_DOTDIR"/support/fetch-js-dependencies npm -o cache/
      "dependencies": []
      "install": "cd \"$BUILD_DIR\"\n\nfunction do_install() {\n  cd \"$BUILD_DIR\"\n  # Copy vsix to /share/vscode-extensions\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/share/vscode-extensions\"\n  cp -a build/*.vsix \"${DESTDIR}${ORCHESTRA_ROOT}/share/vscode-extensions\"\n}\n\nif [ -f source-hash ] && cmp -s source-hash <(\"$ORCHESTRA_DOTDIR\"/support/directory-hash \"$SOURCE_DIR\"); then\n  do_install\n  exit 0\nfi\n\n\"$ORCHESTRA_DOTDIR\"/support/directory-hash \"$SOURCE_DIR\" > source-hash.tmp\n\nrsync \\\n  --archive --delete --quiet \\\n  --exclude=.git \\\n  --exclude-from=<(\n    git \\\n      -C \"$SOURCE_DIR\" \\\n      ls-files \\\n      --exclude-standard \\\n      --others \\\n      --ignored \\\n      --directory\n  ) \\\n  \"$SOURCE_DIR/\" \"$BUILD_DIR/build/\"\n\ncd \"$BUILD_DIR/build\"\nexport ORCHESTRA_NODE_CACHE=\"$BUILD_DIR/cache:$ORCHESTRA_NODE_CACHE\"\n\nnpm install --no-audit --omit peer \n\n# vsce will try to do an update check if in a tty, we use cat to suppress this\nNODE_ENV=development npm run package | cat\n\nif [ \"$RUN_TESTS\" -eq 1 ]; then\n  npm run --if-present lint\n  npm run --if-present test\nfi\n\ndo_install\n\nmv source-hash{.tmp,}\n"
      "ndebug": !!bool |-
        true
    "default":
      "build_dependencies":
      - |-
        revng-js-prerequisites
      "configure": |
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR"
        cp -a "$SOURCE_DIR/"package{,-lock}.json .
        "$ORCHESTRA_DOTDIR"/support/fetch-js-dependencies npm -o cache/
      "dependencies": []
      "install": "cd \"$BUILD_DIR\"\n\nfunction do_install() {\n  cd \"$BUILD_DIR\"\n  # Copy vsix to /share/vscode-extensions\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/share/vscode-extensions\"\n  cp -a build/*.vsix \"${DESTDIR}${ORCHESTRA_ROOT}/share/vscode-extensions\"\n}\n\nif [ -f source-hash ] && cmp -s source-hash <(\"$ORCHESTRA_DOTDIR\"/support/directory-hash \"$SOURCE_DIR\"); then\n  do_install\n  exit 0\nfi\n\n\"$ORCHESTRA_DOTDIR\"/support/directory-hash \"$SOURCE_DIR\" > source-hash.tmp\n\nrsync \\\n  --archive --delete --quiet \\\n  --exclude=.git \\\n  --exclude-from=<(\n    git \\\n      -C \"$SOURCE_DIR\" \\\n      ls-files \\\n      --exclude-standard \\\n      --others \\\n      --ignored \\\n      --directory\n  ) \\\n  \"$SOURCE_DIR/\" \"$BUILD_DIR/build/\"\n\ncd \"$BUILD_DIR/build\"\nexport ORCHESTRA_NODE_CACHE=\"$BUILD_DIR/cache:$ORCHESTRA_NODE_CACHE\"\n\nnpm install --no-audit --omit peer \n\n# vsce will try to do an update check if in a tty, we use cat to suppress this\nNODE_ENV=production npm run package | cat\n\nif [ \"$RUN_TESTS\" -eq 1 ]; then\n  npm run --if-present lint\n  npm run --if-present test\nfi\n\ndo_install\n\nmv source-hash{.tmp,}\n"
      "ndebug": !!bool |-
        true
  "commit": |-
    acfbfe74436ea823085d1f4d5b5b8274e5970087
  "default_build": |-
    default
  "license": |-
    LICENSE.md
  "repository": |-
    revng-vscode-theme
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "debug":
      "build_dependencies":
      - |-
        revng-js-prerequisites
      - |-
        revng
      "configure": |
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR"
        cp -a "$SOURCE_DIR/"package{,-lock}.json .
        "$ORCHESTRA_DOTDIR"/support/fetch-js-dependencies npm -o cache/
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"

        function do_install() {
          cd "$BUILD_DIR"
          # Copy vsix to /share/vscode-extensions
          mkdir -p "${DESTDIR}${ORCHESTRA_ROOT}/share/vscode-extensions"
          cp -a build/*.vsix "${DESTDIR}${ORCHESTRA_ROOT}/share/vscode-extensions"
        }

        if [ -f source-hash ] && cmp -s source-hash <("$ORCHESTRA_DOTDIR"/support/directory-hash "$SOURCE_DIR"); then
          do_install
          exit 0
        fi

        "$ORCHESTRA_DOTDIR"/support/directory-hash "$SOURCE_DIR" > source-hash.tmp

        rsync \
          --archive --delete --quiet \
          --exclude=.git \
          --exclude-from=<(
            git \
              -C "$SOURCE_DIR" \
              ls-files \
              --exclude-standard \
              --others \
              --ignored \
              --directory
          ) \
          "$SOURCE_DIR/" "$BUILD_DIR/build/"

        cd "$BUILD_DIR/build"
        export ORCHESTRA_NODE_CACHE="$BUILD_DIR/cache:$ORCHESTRA_NODE_CACHE"

        npm install --no-audit --omit peer revng-model

        # vsce will try to do an update check if in a tty, we use cat to suppress this
        NODE_ENV=development npm run package | cat

        if [ "$RUN_TESTS" -eq 1 ]; then
          npm run --if-present lint
          npm run --if-present test
        fi

        do_install

        mv source-hash{.tmp,}
      "ndebug": !!bool |-
        true
    "default":
      "build_dependencies":
      - |-
        revng-js-prerequisites
      - |-
        revng
      "configure": |
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR"
        cp -a "$SOURCE_DIR/"package{,-lock}.json .
        "$ORCHESTRA_DOTDIR"/support/fetch-js-dependencies npm -o cache/
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"

        function do_install() {
          cd "$BUILD_DIR"
          # Copy vsix to /share/vscode-extensions
          mkdir -p "${DESTDIR}${ORCHESTRA_ROOT}/share/vscode-extensions"
          cp -a build/*.vsix "${DESTDIR}${ORCHESTRA_ROOT}/share/vscode-extensions"
        }

        if [ -f source-hash ] && cmp -s source-hash <("$ORCHESTRA_DOTDIR"/support/directory-hash "$SOURCE_DIR"); then
          do_install
          exit 0
        fi

        "$ORCHESTRA_DOTDIR"/support/directory-hash "$SOURCE_DIR" > source-hash.tmp

        rsync \
          --archive --delete --quiet \
          --exclude=.git \
          --exclude-from=<(
            git \
              -C "$SOURCE_DIR" \
              ls-files \
              --exclude-standard \
              --others \
              --ignored \
              --directory
          ) \
          "$SOURCE_DIR/" "$BUILD_DIR/build/"

        cd "$BUILD_DIR/build"
        export ORCHESTRA_NODE_CACHE="$BUILD_DIR/cache:$ORCHESTRA_NODE_CACHE"

        npm install --no-audit --omit peer revng-model

        # vsce will try to do an update check if in a tty, we use cat to suppress this
        NODE_ENV=production npm run package | cat

        if [ "$RUN_TESTS" -eq 1 ]; then
          npm run --if-present lint
          npm run --if-present test
        fi

        do_install

        mv source-hash{.tmp,}
      "ndebug": !!bool |-
        true
  "commit": |-
    a5e3bcf04f41c2a37456241189ca66df1c2cc5d9
  "default_build": |-
    default
  "license": |-
    LICENSE.md
  "repository": |-
    revng-ui
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        revng-ui
      - |-
        revng-theme
      - |-
        vscode-web
      "configure": |
        mkdir -p "$BUILD_DIR"
      "dependencies":
      - |-
        revng-c
      "install": |+
        PYTHON_PACKAGE_BASE=$("${ORCHESTRA_DOTDIR}/support/get-python-path" purelib)
        COMMANDS_DIR="${DESTDIR}${PYTHON_PACKAGE_BASE}/revng/cli/_commands"
        mkdir -p "$COMMANDS_DIR"
        cp -a "${ORCHESTRA_DOTDIR}/support/vscode-web/web-ui.py" \
              "$COMMANDS_DIR"

        INSTALL_DIR="${DESTDIR}${ORCHESTRA_ROOT}/share/vscode-web"
        mkdir -p "$INSTALL_DIR/static"
        tar -xf "${ORCHESTRA_ROOT}/share/vscode-web-vanilla.tar.xz" -C"$INSTALL_DIR"

        # Repackage vsixs inside the destionation directory
        # If the EXTENSIONS_DIR has been specified and exists we'll take each vsix file and unzip it,
        # as this is the format needed by vscode-web to load extensions properly
        for extension in "$ORCHESTRA_ROOT"/share/vscode-extensions/*.vsix; do
          # We need a temporary directory since:
          # * unzip does not have the equivalent of --strip-components
          # * we need to read the extension's name from the package.json file
          TEMP=$(mktemp -d --tmpdir tmp.revng.vscode-web-ext-unpack.XXXXXXXXXX)
          # Inside the vsix there's a couple of manifest files in the root, these are for the
          # marketplace, whereas the `extension` directory contains the actual extension files
          # that need to be included
          unzip -qq "$extension" 'extension/*' -d"$TEMP"
          NAME=$(jq -r .name "$TEMP/extension/package.json")
          cp -raT "$TEMP/extension" "$INSTALL_DIR/static/extensions/$NAME"
          rm -rf "$TEMP"
        done

        # Copy product.json and icons to to INSTALL_DIR
        cp -a "$ORCHESTRA_DOTDIR/support/vscode-web/product.json" "$INSTALL_DIR/product.json"
        cp -a "$ORCHESTRA_DOTDIR/support/logo.ico" "$INSTALL_DIR/static/favicon.ico"
        cp -a "$ORCHESTRA_DOTDIR/support/logo.png" "$INSTALL_DIR/static/code-192.png"
        cp -a "$ORCHESTRA_DOTDIR/support/logo.png" "$INSTALL_DIR/static/code-512.png"

        # Since all extensions are explicitly specified in `product.json`, we can
        # remove all the other extensions that are not specified there
        EXTENSIONS=$(jq -r '.builtinExtensions[]' "$INSTALL_DIR/product.json")

        pushd "$INSTALL_DIR/static/extensions" &> /dev/null || exit

        # We compare the list of folders in the current directory (the extensions directory) to the list
        # of extensions that we specified in builtinExtensions, and we'll delete any that do not appear in
        # the latter
        readarray -t EXTRANEOUS_EXTENSIONS < \
          <(comm -23 \
            <(find . -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | sort) \
            <(echo "$EXTENSIONS" | sort))
        rm -rf "${EXTRANEOUS_EXTENSIONS[@]}"

        popd &> /dev/null || exit

      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": ""
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        host-cxx-toolchain
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" https://ftp.gnu.org/gnu/src-highlite/source-highlight-3.1.9.tar.gz

        cd "$BUILD_DIR"
        sed 's/ throw [(]IOException[)]//g' -i lib/srchilite/fileutil.h lib/srchilite/fileutil.cc

        CC=clang CXX=clang++ ./configure \
          --prefix="$ORCHESTRA_ROOT" \
          --with-boost="$ORCHESTRA_ROOT" \
          --with-sysroot="$ORCHESTRA_ROOT" \
          --without-bash-completion \
          --without-doxygen \
          --disable-static
      "dependencies":
      - |-
        boost
      - |-
        host-libcxx
      "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":
      - |-
        host-c-toolchain
      - |-
        tcl
      "configure": |
        mkdir -p "$BUILD_DIR/source"
        extract.sh --into "$BUILD_DIR/source" "https://github.com/sqlite/sqlite/archive/refs/tags/version-3.39.4.tar.gz"
        cd "$BUILD_DIR" && ./source/configure \
          --prefix="$ORCHESTRA_ROOT" \
          --enable-shared \
          --enable-all \
          --with-pic \
          --disable-tcl
      "dependencies":
      - |-
        readline
      "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": |-
    source/LICENSE.md
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        host-c-toolchain
      "configure": |
        mkdir -p "$BUILD_DIR/source"
        extract.sh --into "$BUILD_DIR/source" "https://prdownloads.sourceforge.net/tcl/tcl8.6.12-src.tar.gz"
        cd "$BUILD_DIR" && ./source/unix/configure \
          --prefix="$ORCHESTRA_ROOT" \
          --enable-shared
      "dependencies": []
      "install": |+
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make ${JOBS:+-j$JOBS} install DESTDIR="$DESTDIR"
        ln -s tclsh8.6 "$DESTDIR$ORCHESTRA_ROOT/bin/tclsh"
        ls "$DESTDIR$ORCHESTRA_ROOT/bin/tclsh"

      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": |-
    source/license.terms
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        ninja
      - |-
        revng
      - |-
        revng-qa
      - |-
        test/revng-qa
      - |-
        clang-release
      "configure": |
        mkdir -p "$BUILD_DIR"
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        rm -rf *
        "$ORCHESTRA_ROOT/libexec/revng/revng-test-configure" \
          "$ORCHESTRA_ROOT/share/revng/test/configuration"/**/*.yml \
          --install-path "$ORCHESTRA_ROOT/share/revng/test" \
          --destination . \
          --target-type 'revng\..*'
        ninja run-all
        ninja install
      "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":
      - |-
        ninja
      - |-
        revng-c
      - |-
        revng-qa
      - |-
        test/revng
      - |-
        test/revng-qa
      - |-
        clang-release
      "configure": |
        mkdir -p "$BUILD_DIR"
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        rm -rf *
        "$ORCHESTRA_ROOT/libexec/revng/revng-test-configure" \
          "$ORCHESTRA_ROOT/share/revng/test/configuration"/**/*.yml \
          --install-path "$ORCHESTRA_ROOT/share/revng/test" \
          --destination . \
          --target-type 'revng-c\..*'
        ninja run-all
        ninja install
      "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":
      - |-
        ninja
      - |-
        revng-qa
      - |-
        toolchain/win32-vc16/vc
      - |-
        toolchain/arm/gcc
      - |-
        toolchain/x86-64/gcc
      - |-
        toolchain/i386/gcc
      - |-
        toolchain/s390x/gcc
      - |-
        toolchain/aarch64/gcc
      - |-
        toolchain/mips/gcc
      - |-
        toolchain/mipsel/gcc
      - |-
        toolchain/host/gcc
      - |-
        ida
      "configure": |
        mkdir -p "$BUILD_DIR"
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        rm -rf *
        "$ORCHESTRA_ROOT/libexec/revng/revng-test-configure" \
          "$ORCHESTRA_ROOT/share/revng/test/configuration"/**/*.yml \
          --install-path "$ORCHESTRA_ROOT/share/revng/test" \
          --destination . \
          --target-type 'revng-qa\..*'
        ninja run-all
        ninja install
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": !!null |-
    null
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path":
  - |-
    ${ORCHESTRA_ROOT}/x86_64-pc-linux-gnu/aarch64-unknown-linux-musl/binutils-bin/2.35
  "builds":
    "default":
      "build_dependencies":
      - |-
        glibc
      - |-
        toolchain/host/gcc
      - |-
        toolchain/host/binutils
      "configure": |
        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        extract.sh --into "$SOURCE_DIR" https://ftp.gnu.org/gnu/binutils/binutils-2.35.tar.bz2
        cd "$BUILD_DIR" && "$SOURCE_DIR/configure" \
          --build=x86_64-pc-linux-gnu \
          --host=x86_64-pc-linux-gnu \
          --target=aarch64-unknown-linux-musl \
          --with-sysroot="$ORCHESTRA_ROOT/aarch64-unknown-linux-musl" \
          --prefix=$ORCHESTRA_ROOT \
          --datadir=$ORCHESTRA_ROOT/share/binutils-data/aarch64-unknown-linux-musl/2.35 \
          --infodir=$ORCHESTRA_ROOT/share/binutils-data/aarch64-unknown-linux-musl/2.35/info \
          --mandir=$ORCHESTRA_ROOT/share/binutils-data/aarch64-unknown-linux-musl/2.35/man \
          --bindir=$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/aarch64-unknown-linux-musl/binutils-bin/2.35 \
          --libdir=$ORCHESTRA_ROOT/lib64/binutils/aarch64-unknown-linux-musl/2.35 \
          --libexecdir=$ORCHESTRA_ROOT/lib64/binutils/aarch64-unknown-linux-musl/2.35 \
          --includedir=$ORCHESTRA_ROOT/lib64/binutils/aarch64-unknown-linux-musl/2.35/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 \
           \
          CFLAGS="-w -ggdb3 -O3" \
          CXXFLAGS="-w -ggdb3 -O3"
      "dependencies":
      - |-
        gcc-runtime
      "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": |-
    source/COPYING
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path":
  - |-
    ${ORCHESTRA_ROOT}/x86_64-pc-linux-gnu/aarch64-unknown-linux-musl/gcc-bin/7.3.0
  "builds":
    "stage1":
      "build_dependencies":
      - |-
        glibc
      - |-
        gmp
      - |-
        mpfr
      - |-
        mpc
      "configure": |
        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        extract.sh --into "$SOURCE_DIR" https://ftp.gnu.org/gnu/gcc/gcc-7.3.0/gcc-7.3.0.tar.gz
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-7.3.0-cfns-fix-mismatch-in-gnu_inline-attributes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-7.3.0-cpp-musl-support.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-7.3.0-fixes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-7.3.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"


        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=aarch64-unknown-linux-musl \
          --prefix=$ORCHESTRA_ROOT \
          --bindir=$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/aarch64-unknown-linux-musl/gcc-bin/7.3.0 \
          --includedir=$ORCHESTRA_ROOT/lib/gcc/aarch64-unknown-linux-musl/7.3.0/include \
          --datadir=$ORCHESTRA_ROOT/share/gcc-data/aarch64-unknown-linux-musl/7.3.0 \
          --mandir=$ORCHESTRA_ROOT/share/gcc-data/aarch64-unknown-linux-musl/7.3.0/man \
          --infodir=$ORCHESTRA_ROOT/share/gcc-data/aarch64-unknown-linux-musl/7.3.0/info \
          --with-sysroot=$ORCHESTRA_ROOT/aarch64-unknown-linux-musl \
          --enable-obsolete \
          --enable-secureplt \
          --disable-werror \
          --disable-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 \
          --without-isl \
          --disable-libsanitizer \
          --disable-libssp \
          --disable-shared \
          --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=$INSTALL_LINK_ONLY_PATH -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 -L$INSTALL_LINK_ONLY_PATH/lib64 --sysroot=$INSTALL_LINK_ONLY_PATH"
      "dependencies":
      - |-
        toolchain/aarch64/binutils
      - |-
        toolchain/host/binutils
      - |-
        toolchain/aarch64/musl~headers
      - |-
        toolchain/aarch64/linux-headers
      "install": "cd \"$BUILD_DIR\"\nmake ${JOBS:+-j$JOBS} \nmake install \n\nNEW_GCC_PATH=\"$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/aarch64-unknown-linux-musl/gcc-bin/7.3.0/\"\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/gcc\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/cc\"; then\n    ln -s gcc \"${DESTDIR}${NEW_GCC_PATH}/cc\"\n  fi\n\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/gcc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-gcc\"\n\n  cp -a \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/gcc/x86_64-pc-linux-gnu/7.3.0/*.{a,o} \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/\n\nfi\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/g++\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/c++\"; then\n    ln -s g++ \"${DESTDIR}${NEW_GCC_PATH}/c++\"\n  fi\n\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/g++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-g++\"\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/c++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-c++\"\n\nfi\n\nrm -f \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib64/libcc1.*\n\n# Fixinclude locates the wrong pthread.h\nfind \"${DESTDIR}${ORCHESTRA_ROOT}\" -type d -name include-fixed -exec rm -f {}/pthread.h \\;\n"
      "ndebug": !!bool |-
        true
    "stage2":
      "build_dependencies":
      - |-
        toolchain/aarch64/gcc~stage1
      - |-
        glibc
      - |-
        gmp
      - |-
        mpfr
      - |-
        mpc
      "configure": |
        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        extract.sh --into "$SOURCE_DIR" https://ftp.gnu.org/gnu/gcc/gcc-7.3.0/gcc-7.3.0.tar.gz
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-7.3.0-cfns-fix-mismatch-in-gnu_inline-attributes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-7.3.0-cpp-musl-support.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-7.3.0-fixes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-7.3.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"


        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=aarch64-unknown-linux-musl \
          --prefix=$ORCHESTRA_ROOT \
          --bindir=$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/aarch64-unknown-linux-musl/gcc-bin/7.3.0 \
          --includedir=$ORCHESTRA_ROOT/lib/gcc/aarch64-unknown-linux-musl/7.3.0/include \
          --datadir=$ORCHESTRA_ROOT/share/gcc-data/aarch64-unknown-linux-musl/7.3.0 \
          --mandir=$ORCHESTRA_ROOT/share/gcc-data/aarch64-unknown-linux-musl/7.3.0/man \
          --infodir=$ORCHESTRA_ROOT/share/gcc-data/aarch64-unknown-linux-musl/7.3.0/info \
          --with-sysroot=$ORCHESTRA_ROOT/aarch64-unknown-linux-musl \
          --enable-obsolete \
          --enable-secureplt \
          --disable-werror \
          --disable-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 \
          --without-isl \
          --disable-libsanitizer \
          --disable-libssp \
          --disable-shared \
          --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=$INSTALL_LINK_ONLY_PATH -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 -L$INSTALL_LINK_ONLY_PATH/lib64 --sysroot=$INSTALL_LINK_ONLY_PATH"
      "dependencies":
      - |-
        toolchain/aarch64/binutils
      - |-
        toolchain/host/binutils
      - |-
        toolchain/aarch64/musl
      - |-
        toolchain/aarch64/linux-headers
      "install": "cd \"$BUILD_DIR\"\nmake ${JOBS:+-j$JOBS} \nmake install \n\nNEW_GCC_PATH=\"$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/aarch64-unknown-linux-musl/gcc-bin/7.3.0/\"\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/gcc\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/cc\"; then\n    ln -s gcc \"${DESTDIR}${NEW_GCC_PATH}/cc\"\n  fi\n\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/gcc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-gcc\"\n\n  cp -a \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/gcc/x86_64-pc-linux-gnu/7.3.0/*.{a,o} \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/\n\nfi\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/g++\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/c++\"; then\n    ln -s g++ \"${DESTDIR}${NEW_GCC_PATH}/c++\"\n  fi\n\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/g++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-g++\"\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/c++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-c++\"\n\nfi\n\nrm -f \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib64/libcc1.*\n\n# Fixinclude locates the wrong pthread.h\nfind \"${DESTDIR}${ORCHESTRA_ROOT}\" -type d -name include-fixed -exec rm -f {}/pthread.h \\;\n"
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    stage2
  "license": |-
    source/COPYING
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies": []
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.1.4.tar.xz
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS} -C "$BUILD_DIR" \
          ARCH=arm64 \
          INSTALL_HDR_PATH="${DESTDIR}${ORCHESTRA_ROOT}/aarch64-unknown-linux-musl/usr" headers_install
      "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":
      - |-
        toolchain/aarch64/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.19.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.19-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/aarch64-unknown-linux-musl/gcc-bin/7.3.0//aarch64-unknown-linux-musl-gcc" CFLAGS=" -ggdb3" "$BUILD_DIR/configure" \
          --target=aarch64-unknown-linux-musl \
          --prefix="$ORCHESTRA_ROOT/aarch64-unknown-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/aarch64-unknown-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
    "headers":
      "build_dependencies": []
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.19.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.19-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="true" "$BUILD_DIR/configure" \
          --target=aarch64-unknown-linux-musl \
          --prefix="$ORCHESTRA_ROOT/aarch64-unknown-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/aarch64-unknown-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS} include/bits/alltypes.h || make ${JOBS:+-j$JOBS} obj/include/bits/alltypes.h
        make ${JOBS:+-j$JOBS} install-headers
      "ndebug": !!bool |-
        true
    "o0":
      "build_dependencies":
      - |-
        toolchain/aarch64/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.19.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.19-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/aarch64-unknown-linux-musl/gcc-bin/7.3.0//aarch64-unknown-linux-musl-gcc" CFLAGS=" -ggdb3 -Wl,--gc-sections -ffunction-sections -O0" "$BUILD_DIR/configure" \
          --target=aarch64-unknown-linux-musl \
          --prefix="$ORCHESTRA_ROOT/aarch64-unknown-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/aarch64-unknown-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
    "o1":
      "build_dependencies":
      - |-
        toolchain/aarch64/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.19.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.19-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/aarch64-unknown-linux-musl/gcc-bin/7.3.0//aarch64-unknown-linux-musl-gcc" CFLAGS=" -ggdb3 -Wl,--gc-sections -ffunction-sections -O1" "$BUILD_DIR/configure" \
          --target=aarch64-unknown-linux-musl \
          --prefix="$ORCHESTRA_ROOT/aarch64-unknown-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/aarch64-unknown-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
    "o2":
      "build_dependencies":
      - |-
        toolchain/aarch64/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.19.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.19-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/aarch64-unknown-linux-musl/gcc-bin/7.3.0//aarch64-unknown-linux-musl-gcc" CFLAGS=" -ggdb3 -Wl,--gc-sections -ffunction-sections -O2" "$BUILD_DIR/configure" \
          --target=aarch64-unknown-linux-musl \
          --prefix="$ORCHESTRA_ROOT/aarch64-unknown-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/aarch64-unknown-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
    "o3":
      "build_dependencies":
      - |-
        toolchain/aarch64/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.19.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.19-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/aarch64-unknown-linux-musl/gcc-bin/7.3.0//aarch64-unknown-linux-musl-gcc" CFLAGS=" -ggdb3 -Wl,--gc-sections -ffunction-sections -O3" "$BUILD_DIR/configure" \
          --target=aarch64-unknown-linux-musl \
          --prefix="$ORCHESTRA_ROOT/aarch64-unknown-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/aarch64-unknown-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": |-
    COPYRIGHT
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path":
  - |-
    ${ORCHESTRA_ROOT}/x86_64-pc-linux-gnu/armv7a-hardfloat-linux-uclibceabi/binutils-bin/2.35
  "builds":
    "default":
      "build_dependencies":
      - |-
        glibc
      - |-
        toolchain/host/gcc
      - |-
        toolchain/host/binutils
      "configure": |
        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        extract.sh --into "$SOURCE_DIR" https://ftp.gnu.org/gnu/binutils/binutils-2.35.tar.bz2
        cd "$BUILD_DIR" && "$SOURCE_DIR/configure" \
          --build=x86_64-pc-linux-gnu \
          --host=x86_64-pc-linux-gnu \
          --target=armv7a-hardfloat-linux-uclibceabi \
          --with-sysroot="$ORCHESTRA_ROOT/armv7a-hardfloat-linux-uclibceabi" \
          --prefix=$ORCHESTRA_ROOT \
          --datadir=$ORCHESTRA_ROOT/share/binutils-data/armv7a-hardfloat-linux-uclibceabi/2.35 \
          --infodir=$ORCHESTRA_ROOT/share/binutils-data/armv7a-hardfloat-linux-uclibceabi/2.35/info \
          --mandir=$ORCHESTRA_ROOT/share/binutils-data/armv7a-hardfloat-linux-uclibceabi/2.35/man \
          --bindir=$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/armv7a-hardfloat-linux-uclibceabi/binutils-bin/2.35 \
          --libdir=$ORCHESTRA_ROOT/lib64/binutils/armv7a-hardfloat-linux-uclibceabi/2.35 \
          --libexecdir=$ORCHESTRA_ROOT/lib64/binutils/armv7a-hardfloat-linux-uclibceabi/2.35 \
          --includedir=$ORCHESTRA_ROOT/lib64/binutils/armv7a-hardfloat-linux-uclibceabi/2.35/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 \
           \
          CFLAGS="-w -ggdb3 -O3" \
          CXXFLAGS="-w -ggdb3 -O3"
      "dependencies":
      - |-
        gcc-runtime
      "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": |-
    source/COPYING
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path":
  - |-
    ${ORCHESTRA_ROOT}/x86_64-pc-linux-gnu/armv7a-hardfloat-linux-uclibceabi/gcc-bin/9.2.0
  "builds":
    "stage1":
      "build_dependencies":
      - |-
        glibc
      - |-
        gmp
      - |-
        mpfr
      - |-
        mpc
      "configure": |
        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        extract.sh --into "$SOURCE_DIR" https://ftp.gnu.org/gnu/gcc/gcc-9.2.0/gcc-9.2.0.tar.gz
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-cfns-fix-mismatch-in-gnu_inline-attributes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-cpp-musl-support.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-fixes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.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"


        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=armv7a-hardfloat-linux-uclibceabi \
          --prefix=$ORCHESTRA_ROOT \
          --bindir=$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/armv7a-hardfloat-linux-uclibceabi/gcc-bin/9.2.0 \
          --includedir=$ORCHESTRA_ROOT/lib/gcc/armv7a-hardfloat-linux-uclibceabi/9.2.0/include \
          --datadir=$ORCHESTRA_ROOT/share/gcc-data/armv7a-hardfloat-linux-uclibceabi/9.2.0 \
          --mandir=$ORCHESTRA_ROOT/share/gcc-data/armv7a-hardfloat-linux-uclibceabi/9.2.0/man \
          --infodir=$ORCHESTRA_ROOT/share/gcc-data/armv7a-hardfloat-linux-uclibceabi/9.2.0/info \
          --with-sysroot=$ORCHESTRA_ROOT/armv7a-hardfloat-linux-uclibceabi \
          --enable-obsolete \
          --enable-secureplt \
          --disable-werror \
          --disable-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 \
          --enable-__cxa_atexit \
          --enable-tls \
          --enable-clocale=gnu \
          --with-float=softfp \
          --with-arch=armv7-a \
          --without-cloog \
          --disable-libsanitizer \
          --disable-libssp \
          --disable-shared \
          --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=$INSTALL_LINK_ONLY_PATH -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 -L$INSTALL_LINK_ONLY_PATH/lib64 --sysroot=$INSTALL_LINK_ONLY_PATH"
      "dependencies":
      - |-
        toolchain/arm/binutils
      - |-
        toolchain/host/binutils
      - |-
        toolchain/arm/uclibc~headers
      - |-
        toolchain/arm/linux-headers
      "install": "cd \"$BUILD_DIR\"\nmake ${JOBS:+-j$JOBS} \nmake install \n\nNEW_GCC_PATH=\"$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/armv7a-hardfloat-linux-uclibceabi/gcc-bin/9.2.0/\"\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/gcc\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/cc\"; then\n    ln -s gcc \"${DESTDIR}${NEW_GCC_PATH}/cc\"\n  fi\n\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/gcc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-gcc\"\n\n  cp -a \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/gcc/x86_64-pc-linux-gnu/9.2.0/*.{a,o} \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/\n\nfi\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/g++\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/c++\"; then\n    ln -s g++ \"${DESTDIR}${NEW_GCC_PATH}/c++\"\n  fi\n\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/g++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-g++\"\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/c++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-c++\"\n\nfi\n\nrm -f \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib64/libcc1.*\n\n# Fixinclude locates the wrong pthread.h\nfind \"${DESTDIR}${ORCHESTRA_ROOT}\" -type d -name include-fixed -exec rm -f {}/pthread.h \\;\n"
      "ndebug": !!bool |-
        true
    "stage2":
      "build_dependencies":
      - |-
        toolchain/arm/gcc~stage1
      - |-
        glibc
      - |-
        gmp
      - |-
        mpfr
      - |-
        mpc
      "configure": |
        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        extract.sh --into "$SOURCE_DIR" https://ftp.gnu.org/gnu/gcc/gcc-9.2.0/gcc-9.2.0.tar.gz
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-cfns-fix-mismatch-in-gnu_inline-attributes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-cpp-musl-support.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-fixes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.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"


        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=armv7a-hardfloat-linux-uclibceabi \
          --prefix=$ORCHESTRA_ROOT \
          --bindir=$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/armv7a-hardfloat-linux-uclibceabi/gcc-bin/9.2.0 \
          --includedir=$ORCHESTRA_ROOT/lib/gcc/armv7a-hardfloat-linux-uclibceabi/9.2.0/include \
          --datadir=$ORCHESTRA_ROOT/share/gcc-data/armv7a-hardfloat-linux-uclibceabi/9.2.0 \
          --mandir=$ORCHESTRA_ROOT/share/gcc-data/armv7a-hardfloat-linux-uclibceabi/9.2.0/man \
          --infodir=$ORCHESTRA_ROOT/share/gcc-data/armv7a-hardfloat-linux-uclibceabi/9.2.0/info \
          --with-sysroot=$ORCHESTRA_ROOT/armv7a-hardfloat-linux-uclibceabi \
          --enable-obsolete \
          --enable-secureplt \
          --disable-werror \
          --disable-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 \
          --enable-__cxa_atexit \
          --enable-tls \
          --enable-clocale=gnu \
          --with-float=softfp \
          --with-arch=armv7-a \
          --without-cloog \
          --disable-libsanitizer \
          --disable-libssp \
          --disable-shared \
          --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=$INSTALL_LINK_ONLY_PATH -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 -L$INSTALL_LINK_ONLY_PATH/lib64 --sysroot=$INSTALL_LINK_ONLY_PATH"
      "dependencies":
      - |-
        toolchain/arm/binutils
      - |-
        toolchain/host/binutils
      - |-
        toolchain/arm/uclibc
      - |-
        toolchain/arm/linux-headers
      "install": "cd \"$BUILD_DIR\"\nmake ${JOBS:+-j$JOBS} \nmake install \n\nNEW_GCC_PATH=\"$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/armv7a-hardfloat-linux-uclibceabi/gcc-bin/9.2.0/\"\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/gcc\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/cc\"; then\n    ln -s gcc \"${DESTDIR}${NEW_GCC_PATH}/cc\"\n  fi\n\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/gcc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-gcc\"\n\n  cp -a \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/gcc/x86_64-pc-linux-gnu/9.2.0/*.{a,o} \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/\n\nfi\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/g++\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/c++\"; then\n    ln -s g++ \"${DESTDIR}${NEW_GCC_PATH}/c++\"\n  fi\n\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/g++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-g++\"\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/c++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-c++\"\n\nfi\n\nrm -f \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib64/libcc1.*\n\n# Fixinclude locates the wrong pthread.h\nfind \"${DESTDIR}${ORCHESTRA_ROOT}\" -type d -name include-fixed -exec rm -f {}/pthread.h \\;\n"
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    stage2
  "license": |-
    source/COPYING
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies": []
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.1.4.tar.xz
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS} -C "$BUILD_DIR" \
          ARCH=arm \
          INSTALL_HDR_PATH="${DESTDIR}${ORCHESTRA_ROOT}/armv7a-hardfloat-linux-uclibceabi/usr" headers_install
      "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":
      - |-
        toolchain/arm/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" "https://uclibc.org/downloads/uClibc-0.9.33.2.tar.bz2"
        cd "$BUILD_DIR"
        patch -p1 < "${ORCHESTRA_DOTDIR}/patches/blt-blo.patch"
        patch -p1 < "${ORCHESTRA_DOTDIR}/patches/uclibc-0071-Fix-libgcc_s_resume-issue.patch"
        echo 'false' > extra/config/lxdialog/check-lxdialog.sh
        make ARCH=arm defconfig
        cp "${ORCHESTRA_DOTDIR}/patches/uClibc.config" .config
        sed 's|$INSTALL_PATH|'"$ORCHESTRA_ROOT"'|g' .config -i
        sed 's|$FLAGS|-ggdb3|g' .config -i
        true | make oldconfig
        sed 's|^typedef __kernel_dev_t\s*__kernel_old_dev_t;$|\0\ntypedef long __kernel_long_t;\ntypedef unsigned long __kernel_ulong_t;|' libc/sysdeps/linux/arm/bits/kernel_types.h -i
      "dependencies": []
      "install": |
        export PATH="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/armv7a-hardfloat-linux-uclibceabi/gcc-bin/9.2.0/:$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/armv7a-hardfloat-linux-uclibceabi/binutils-bin/2.35:$PATH"
        make -C "$BUILD_DIR"
        make -C "$BUILD_DIR" install DESTDIR="${DESTDIR}${ORCHESTRA_ROOT}/armv7a-hardfloat-linux-uclibceabi"
      "ndebug": !!bool |-
        true
    "headers":
      "build_dependencies": []
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" "https://uclibc.org/downloads/uClibc-0.9.33.2.tar.bz2"
        cd "$BUILD_DIR"
        patch -p1 < "${ORCHESTRA_DOTDIR}/patches/blt-blo.patch"
        patch -p1 < "${ORCHESTRA_DOTDIR}/patches/uclibc-0071-Fix-libgcc_s_resume-issue.patch"
        echo 'false' > extra/config/lxdialog/check-lxdialog.sh
        make ARCH=arm defconfig
        cp "${ORCHESTRA_DOTDIR}/patches/uClibc.config" .config
        sed 's|$INSTALL_PATH|'"$ORCHESTRA_ROOT"'|g' .config -i
        sed 's|$FLAGS||g' .config -i
        true | make oldconfig
        sed 's|^typedef __kernel_dev_t\s*__kernel_old_dev_t;$|\0\ntypedef long __kernel_long_t;\ntypedef unsigned long __kernel_ulong_t;|' libc/sysdeps/linux/arm/bits/kernel_types.h -i
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make headers
        make DESTDIR="${DESTDIR}${ORCHESTRA_ROOT}/armv7a-hardfloat-linux-uclibceabi" install_headers
      "ndebug": !!bool |-
        true
    "o0":
      "build_dependencies":
      - |-
        toolchain/arm/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" "https://uclibc.org/downloads/uClibc-0.9.33.2.tar.bz2"
        cd "$BUILD_DIR"
        patch -p1 < "${ORCHESTRA_DOTDIR}/patches/blt-blo.patch"
        patch -p1 < "${ORCHESTRA_DOTDIR}/patches/uclibc-0071-Fix-libgcc_s_resume-issue.patch"
        echo 'false' > extra/config/lxdialog/check-lxdialog.sh
        make ARCH=arm defconfig
        cp "${ORCHESTRA_DOTDIR}/patches/uClibc.config" .config
        sed 's|$INSTALL_PATH|'"$ORCHESTRA_ROOT"'|g' .config -i
        sed 's|$FLAGS|-ggdb3 -Wl,--gc-sections -ffunction-sections -O0|g' .config -i
        true | make oldconfig
        sed 's|^typedef __kernel_dev_t\s*__kernel_old_dev_t;$|\0\ntypedef long __kernel_long_t;\ntypedef unsigned long __kernel_ulong_t;|' libc/sysdeps/linux/arm/bits/kernel_types.h -i
      "dependencies": []
      "install": |
        export PATH="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/armv7a-hardfloat-linux-uclibceabi/gcc-bin/9.2.0/:$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/armv7a-hardfloat-linux-uclibceabi/binutils-bin/2.35:$PATH"
        make -C "$BUILD_DIR"
        make -C "$BUILD_DIR" install DESTDIR="${DESTDIR}${ORCHESTRA_ROOT}/armv7a-hardfloat-linux-uclibceabi"
      "ndebug": !!bool |-
        true
    "o1":
      "build_dependencies":
      - |-
        toolchain/arm/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" "https://uclibc.org/downloads/uClibc-0.9.33.2.tar.bz2"
        cd "$BUILD_DIR"
        patch -p1 < "${ORCHESTRA_DOTDIR}/patches/blt-blo.patch"
        patch -p1 < "${ORCHESTRA_DOTDIR}/patches/uclibc-0071-Fix-libgcc_s_resume-issue.patch"
        echo 'false' > extra/config/lxdialog/check-lxdialog.sh
        make ARCH=arm defconfig
        cp "${ORCHESTRA_DOTDIR}/patches/uClibc.config" .config
        sed 's|$INSTALL_PATH|'"$ORCHESTRA_ROOT"'|g' .config -i
        sed 's|$FLAGS|-ggdb3 -Wl,--gc-sections -ffunction-sections -O1|g' .config -i
        true | make oldconfig
        sed 's|^typedef __kernel_dev_t\s*__kernel_old_dev_t;$|\0\ntypedef long __kernel_long_t;\ntypedef unsigned long __kernel_ulong_t;|' libc/sysdeps/linux/arm/bits/kernel_types.h -i
      "dependencies": []
      "install": |
        export PATH="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/armv7a-hardfloat-linux-uclibceabi/gcc-bin/9.2.0/:$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/armv7a-hardfloat-linux-uclibceabi/binutils-bin/2.35:$PATH"
        make -C "$BUILD_DIR"
        make -C "$BUILD_DIR" install DESTDIR="${DESTDIR}${ORCHESTRA_ROOT}/armv7a-hardfloat-linux-uclibceabi"
      "ndebug": !!bool |-
        true
    "o2":
      "build_dependencies":
      - |-
        toolchain/arm/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" "https://uclibc.org/downloads/uClibc-0.9.33.2.tar.bz2"
        cd "$BUILD_DIR"
        patch -p1 < "${ORCHESTRA_DOTDIR}/patches/blt-blo.patch"
        patch -p1 < "${ORCHESTRA_DOTDIR}/patches/uclibc-0071-Fix-libgcc_s_resume-issue.patch"
        echo 'false' > extra/config/lxdialog/check-lxdialog.sh
        make ARCH=arm defconfig
        cp "${ORCHESTRA_DOTDIR}/patches/uClibc.config" .config
        sed 's|$INSTALL_PATH|'"$ORCHESTRA_ROOT"'|g' .config -i
        sed 's|$FLAGS|-ggdb3 -Wl,--gc-sections -ffunction-sections -O2|g' .config -i
        true | make oldconfig
        sed 's|^typedef __kernel_dev_t\s*__kernel_old_dev_t;$|\0\ntypedef long __kernel_long_t;\ntypedef unsigned long __kernel_ulong_t;|' libc/sysdeps/linux/arm/bits/kernel_types.h -i
      "dependencies": []
      "install": |
        export PATH="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/armv7a-hardfloat-linux-uclibceabi/gcc-bin/9.2.0/:$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/armv7a-hardfloat-linux-uclibceabi/binutils-bin/2.35:$PATH"
        make -C "$BUILD_DIR"
        make -C "$BUILD_DIR" install DESTDIR="${DESTDIR}${ORCHESTRA_ROOT}/armv7a-hardfloat-linux-uclibceabi"
      "ndebug": !!bool |-
        true
    "o3":
      "build_dependencies":
      - |-
        toolchain/arm/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" "https://uclibc.org/downloads/uClibc-0.9.33.2.tar.bz2"
        cd "$BUILD_DIR"
        patch -p1 < "${ORCHESTRA_DOTDIR}/patches/blt-blo.patch"
        patch -p1 < "${ORCHESTRA_DOTDIR}/patches/uclibc-0071-Fix-libgcc_s_resume-issue.patch"
        echo 'false' > extra/config/lxdialog/check-lxdialog.sh
        make ARCH=arm defconfig
        cp "${ORCHESTRA_DOTDIR}/patches/uClibc.config" .config
        sed 's|$INSTALL_PATH|'"$ORCHESTRA_ROOT"'|g' .config -i
        sed 's|$FLAGS|-ggdb3 -Wl,--gc-sections -ffunction-sections -O3|g' .config -i
        true | make oldconfig
        sed 's|^typedef __kernel_dev_t\s*__kernel_old_dev_t;$|\0\ntypedef long __kernel_long_t;\ntypedef unsigned long __kernel_ulong_t;|' libc/sysdeps/linux/arm/bits/kernel_types.h -i
      "dependencies": []
      "install": |
        export PATH="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/armv7a-hardfloat-linux-uclibceabi/gcc-bin/9.2.0/:$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/armv7a-hardfloat-linux-uclibceabi/binutils-bin/2.35:$PATH"
        make -C "$BUILD_DIR"
        make -C "$BUILD_DIR" install DESTDIR="${DESTDIR}${ORCHESTRA_ROOT}/armv7a-hardfloat-linux-uclibceabi"
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": |-
    COPYING.LIB
  "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": |
        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        extract.sh --into "$SOURCE_DIR" https://ftp.gnu.org/gnu/binutils/binutils-2.39.tar.bz2
        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":
      - |-
        gcc-runtime
      "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": |-
    source/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": |
        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        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=$INSTALL_LINK_ONLY_PATH \
          --enable-obsolete \
          --enable-secureplt \
          --disable-werror \
          --disable-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 \
          --disable-libmpx \
          --with-glibc-version=2.13 \
          CC=$INSTALL_LINK_ONLY_PATH/early-gcc/bin/gcc \
          CXX=$INSTALL_LINK_ONLY_PATH/early-gcc/bin/g++ \
          CFLAGS_FOR_TARGET="--sysroot=$INSTALL_LINK_ONLY_PATH -I$ORCHESTRA_ROOT/include" \
          CXXFLAGS_FOR_TARGET="--sysroot=$INSTALL_LINK_ONLY_PATH -I$ORCHESTRA_ROOT/include" \
          LDFLAGS_FOR_TARGET="--sysroot=$INSTALL_LINK_ONLY_PATH -Wl,-z,origin -Wl,--enable-new-dtags -L$ORCHESTRA_ROOT/lib -L$INSTALL_LINK_ONLY_PATH/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=$INSTALL_LINK_ONLY_PATH -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 -L$INSTALL_LINK_ONLY_PATH/lib64 --sysroot=$INSTALL_LINK_ONLY_PATH"
      "dependencies":
      - |-
        toolchain/host/linux-headers
      "install": "cd \"$BUILD_DIR\"\nmake ${JOBS:+-j$JOBS} \nmake install \n\nNEW_GCC_PATH=\"$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/gcc-bin/11.2.0/\"\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/gcc\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/cc\"; then\n    ln -s gcc \"${DESTDIR}${NEW_GCC_PATH}/cc\"\n  fi\n\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/gcc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-gcc\"\n\n  cp -a \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/gcc/x86_64-pc-linux-gnu/11.2.0/*.{a,o} \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/\n\nfi\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/g++\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/c++\"; then\n    ln -s g++ \"${DESTDIR}${NEW_GCC_PATH}/c++\"\n  fi\n\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/g++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-g++\"\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/c++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-c++\"\n\nfi\n\nrm -f \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib64/libcc1.*\n\n# Fixinclude locates the wrong pthread.h\nfind \"${DESTDIR}${ORCHESTRA_ROOT}\" -type d -name include-fixed -exec rm -f {}/pthread.h \\;\n\"$ORCHESTRA_DOTDIR\"/support/save-for-later \\\n  -i \"${DESTDIR}${ORCHESTRA_ROOT}\" \\\n  gcc-runtime \\\n  '^lib(|32|64)\\/lib[^/]*$' '^lib(|32|64)\\/crt[^/]*\\.o$'\n"
      "ndebug": !!bool |-
        true
    "stage2":
      "build_dependencies":
      - |-
        early-gcc
      - |-
        glibc
      - |-
        gmp
      - |-
        mpfr
      - |-
        mpc
      "configure": |
        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        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=$INSTALL_LINK_ONLY_PATH \
          --enable-obsolete \
          --enable-secureplt \
          --disable-werror \
          --disable-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 \
          --disable-libmpx \
          --with-glibc-version=2.13 \
          CC=$INSTALL_LINK_ONLY_PATH/early-gcc/bin/gcc \
          CXX=$INSTALL_LINK_ONLY_PATH/early-gcc/bin/g++ \
          CFLAGS_FOR_TARGET="--sysroot=$INSTALL_LINK_ONLY_PATH -I$ORCHESTRA_ROOT/include" \
          CXXFLAGS_FOR_TARGET="--sysroot=$INSTALL_LINK_ONLY_PATH -I$ORCHESTRA_ROOT/include" \
          LDFLAGS_FOR_TARGET="--sysroot=$INSTALL_LINK_ONLY_PATH -Wl,-z,origin -Wl,--enable-new-dtags -L$ORCHESTRA_ROOT/lib -L$INSTALL_LINK_ONLY_PATH/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=$INSTALL_LINK_ONLY_PATH -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 -L$INSTALL_LINK_ONLY_PATH/lib64 --sysroot=$INSTALL_LINK_ONLY_PATH"
      "dependencies":
      - |-
        toolchain/host/linux-headers
      "install": "cd \"$BUILD_DIR\"\nmake ${JOBS:+-j$JOBS} \nmake install \n\nNEW_GCC_PATH=\"$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/gcc-bin/11.2.0/\"\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/gcc\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/cc\"; then\n    ln -s gcc \"${DESTDIR}${NEW_GCC_PATH}/cc\"\n  fi\n\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/gcc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-gcc\"\n\n  cp -a \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/gcc/x86_64-pc-linux-gnu/11.2.0/*.{a,o} \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/\n\nfi\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/g++\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/c++\"; then\n    ln -s g++ \"${DESTDIR}${NEW_GCC_PATH}/c++\"\n  fi\n\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/g++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-g++\"\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/c++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-c++\"\n\nfi\n\nrm -f \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib64/libcc1.*\n\n# Fixinclude locates the wrong pthread.h\nfind \"${DESTDIR}${ORCHESTRA_ROOT}\" -type d -name include-fixed -exec rm -f {}/pthread.h \\;\n\"$ORCHESTRA_DOTDIR\"/support/save-for-later \\\n  -i \"${DESTDIR}${ORCHESTRA_ROOT}\" \\\n  gcc-runtime \\\n  '^lib(|32|64)\\/lib[^/]*$' '^lib(|32|64)\\/crt[^/]*\\.o$'\n"
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    stage2
  "license": |-
    source/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/12.1
  "builds":
    "default":
      "build_dependencies":
      - |-
        host-cxx-toolchain
      - |-
        zlib
      "configure": |
        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        extract.sh --into "$SOURCE_DIR" https://ftp.gnu.org/gnu/gdb/gdb-12.1.tar.gz
        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 \
          --bindir=$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/x86_64-pc-linux-gnu/binutils-bin/12.1 \
          --datadir=$ORCHESTRA_ROOT/share/binutils-data/x86_64-pc-linux-gnu/12.1 \
          --disable-binutils \
          --includedir=$ORCHESTRA_ROOT/lib64/gdb/x86_64-pc-linux-gnu/12.1/include \
          --infodir=$ORCHESTRA_ROOT/share/binutils-data/x86_64-pc-linux-gnu/12.1/info \
          --libdir=$ORCHESTRA_ROOT/lib64/binutils/x86_64-pc-linux-gnu/12.1 \
          --libexecdir=$ORCHESTRA_ROOT/lib64/binutils/x86_64-pc-linux-gnu/12.1 \
          --mandir=$ORCHESTRA_ROOT/share/binutils-data/x86_64-pc-linux-gnu/12.1/man \
          --disable-etc \
          --disable-gas \
          --disable-gold \
          --disable-gprof \
          --disable-install-libbfd \
          --disable-install-libiberty \
          --disable-isl \
          --disable-ld \
          --disable-shared \
          --disable-werror \
          --enable-64-bit-bfd \
          --enable-gdbserver \
          --enable-lto \
          --disable-nls \
          --enable-obsolete \
          --enable-plugins \
          --enable-source-highlight \
          --enable-tui \
          --with-curses \
          --with-expat=yes \
          --with-libexpat-prefix="$ORCHESTRA_ROOT" \
          --with-mpfr=yes \
          --with-libmpfr-prefix="$ORCHESTRA_ROOT" \
          --with-gmp=yes \
          --with-libgmp-prefix="$ORCHESTRA_ROOT" \
          --with-debuginfod=no \
          --with-python="$ORCHESTRA_ROOT/bin/python3" \
          --with-system-gdbinit="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/etc/gdb/gdbinit" \
          --with-system-readline \
          --without-guile \
          --without-included-gettext \
          --without-stage1-ldflags \
          CC=clang \
          CXX=clang++ \
          CFLAGS="-w -ggdb3 -O3" \
          CXXFLAGS="-w -ggdb3 -O3 -stdlib=libc++"
      "dependencies":
      - |-
        expat
      - |-
        gmp
      - |-
        host-libcxx
      - |-
        icu
      - |-
        mpfr
      - |-
        ncurses
      - |-
        python
      - |-
        readline
      - |-
        source-highlight
      "install": |+
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make ${JOBS:+-j$JOBS} install DESTDIR="$DESTDIR"

        GDBINIT="$DESTDIR$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/etc/gdb/gdbinit"
        mkdir -p "$(dirname "$GDBINIT")"

        cat >"$GDBINIT" <<'EOF'
        set pagination off
        EOF
        echo "set disassembly-flavor intel" >> "$GDBINIT"


      "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": []
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.1.4.tar.xz
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS} -C "$BUILD_DIR" \
          ARCH=x86_64 \
          INSTALL_HDR_PATH="${DESTDIR}${ORCHESTRA_ROOT}/link-only" headers_install
      "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/i386-gentoo-linux-musl/binutils-bin/2.35
  "builds":
    "default":
      "build_dependencies":
      - |-
        glibc
      - |-
        toolchain/host/gcc
      - |-
        toolchain/host/binutils
      "configure": |
        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        extract.sh --into "$SOURCE_DIR" https://ftp.gnu.org/gnu/binutils/binutils-2.35.tar.bz2
        cd "$BUILD_DIR" && "$SOURCE_DIR/configure" \
          --build=x86_64-pc-linux-gnu \
          --host=x86_64-pc-linux-gnu \
          --target=i386-gentoo-linux-musl \
          --with-sysroot="$ORCHESTRA_ROOT/i386-gentoo-linux-musl" \
          --prefix=$ORCHESTRA_ROOT \
          --datadir=$ORCHESTRA_ROOT/share/binutils-data/i386-gentoo-linux-musl/2.35 \
          --infodir=$ORCHESTRA_ROOT/share/binutils-data/i386-gentoo-linux-musl/2.35/info \
          --mandir=$ORCHESTRA_ROOT/share/binutils-data/i386-gentoo-linux-musl/2.35/man \
          --bindir=$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/i386-gentoo-linux-musl/binutils-bin/2.35 \
          --libdir=$ORCHESTRA_ROOT/lib64/binutils/i386-gentoo-linux-musl/2.35 \
          --libexecdir=$ORCHESTRA_ROOT/lib64/binutils/i386-gentoo-linux-musl/2.35 \
          --includedir=$ORCHESTRA_ROOT/lib64/binutils/i386-gentoo-linux-musl/2.35/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 \
           \
          CFLAGS="-w -ggdb3 -O3" \
          CXXFLAGS="-w -ggdb3 -O3"
      "dependencies":
      - |-
        gcc-runtime
      "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": |-
    source/COPYING
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path":
  - |-
    ${ORCHESTRA_ROOT}/x86_64-pc-linux-gnu/i386-gentoo-linux-musl/gcc-bin/9.2.0
  "builds":
    "stage1":
      "build_dependencies":
      - |-
        glibc
      - |-
        gmp
      - |-
        mpfr
      - |-
        mpc
      "configure": |
        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        extract.sh --into "$SOURCE_DIR" https://ftp.gnu.org/gnu/gcc/gcc-9.2.0/gcc-9.2.0.tar.gz
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-cfns-fix-mismatch-in-gnu_inline-attributes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-cpp-musl-support.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-fixes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.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"


        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=i386-gentoo-linux-musl \
          --prefix=$ORCHESTRA_ROOT \
          --bindir=$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/i386-gentoo-linux-musl/gcc-bin/9.2.0 \
          --includedir=$ORCHESTRA_ROOT/lib/gcc/i386-gentoo-linux-musl/9.2.0/include \
          --datadir=$ORCHESTRA_ROOT/share/gcc-data/i386-gentoo-linux-musl/9.2.0 \
          --mandir=$ORCHESTRA_ROOT/share/gcc-data/i386-gentoo-linux-musl/9.2.0/man \
          --infodir=$ORCHESTRA_ROOT/share/gcc-data/i386-gentoo-linux-musl/9.2.0/info \
          --with-sysroot=$ORCHESTRA_ROOT/i386-gentoo-linux-musl \
          --enable-obsolete \
          --enable-secureplt \
          --disable-werror \
          --disable-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-targets=all \
          --without-isl \
          --disable-libsanitizer \
          --disable-libssp \
          --disable-shared \
          --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=$INSTALL_LINK_ONLY_PATH -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 -L$INSTALL_LINK_ONLY_PATH/lib64 --sysroot=$INSTALL_LINK_ONLY_PATH"
      "dependencies":
      - |-
        toolchain/i386/binutils
      - |-
        toolchain/host/binutils
      - |-
        toolchain/i386/musl~headers
      - |-
        toolchain/i386/linux-headers
      "install": "cd \"$BUILD_DIR\"\nmake ${JOBS:+-j$JOBS} \nmake install \n\nNEW_GCC_PATH=\"$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/i386-gentoo-linux-musl/gcc-bin/9.2.0/\"\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/gcc\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/cc\"; then\n    ln -s gcc \"${DESTDIR}${NEW_GCC_PATH}/cc\"\n  fi\n\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/gcc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-gcc\"\n\n  cp -a \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/gcc/x86_64-pc-linux-gnu/9.2.0/*.{a,o} \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/\n\nfi\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/g++\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/c++\"; then\n    ln -s g++ \"${DESTDIR}${NEW_GCC_PATH}/c++\"\n  fi\n\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/g++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-g++\"\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/c++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-c++\"\n\nfi\n\nrm -f \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib64/libcc1.*\n\n# Fixinclude locates the wrong pthread.h\nfind \"${DESTDIR}${ORCHESTRA_ROOT}\" -type d -name include-fixed -exec rm -f {}/pthread.h \\;\n"
      "ndebug": !!bool |-
        true
    "stage2":
      "build_dependencies":
      - |-
        toolchain/i386/gcc~stage1
      - |-
        glibc
      - |-
        gmp
      - |-
        mpfr
      - |-
        mpc
      "configure": |
        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        extract.sh --into "$SOURCE_DIR" https://ftp.gnu.org/gnu/gcc/gcc-9.2.0/gcc-9.2.0.tar.gz
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-cfns-fix-mismatch-in-gnu_inline-attributes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-cpp-musl-support.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-fixes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.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"


        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=i386-gentoo-linux-musl \
          --prefix=$ORCHESTRA_ROOT \
          --bindir=$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/i386-gentoo-linux-musl/gcc-bin/9.2.0 \
          --includedir=$ORCHESTRA_ROOT/lib/gcc/i386-gentoo-linux-musl/9.2.0/include \
          --datadir=$ORCHESTRA_ROOT/share/gcc-data/i386-gentoo-linux-musl/9.2.0 \
          --mandir=$ORCHESTRA_ROOT/share/gcc-data/i386-gentoo-linux-musl/9.2.0/man \
          --infodir=$ORCHESTRA_ROOT/share/gcc-data/i386-gentoo-linux-musl/9.2.0/info \
          --with-sysroot=$ORCHESTRA_ROOT/i386-gentoo-linux-musl \
          --enable-obsolete \
          --enable-secureplt \
          --disable-werror \
          --disable-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-targets=all \
          --without-isl \
          --disable-libsanitizer \
          --disable-libssp \
          --disable-shared \
          --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=$INSTALL_LINK_ONLY_PATH -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 -L$INSTALL_LINK_ONLY_PATH/lib64 --sysroot=$INSTALL_LINK_ONLY_PATH"
      "dependencies":
      - |-
        toolchain/i386/binutils
      - |-
        toolchain/host/binutils
      - |-
        toolchain/i386/musl
      - |-
        toolchain/i386/linux-headers
      "install": "cd \"$BUILD_DIR\"\nmake ${JOBS:+-j$JOBS} \nmake install \n\nNEW_GCC_PATH=\"$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/i386-gentoo-linux-musl/gcc-bin/9.2.0/\"\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/gcc\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/cc\"; then\n    ln -s gcc \"${DESTDIR}${NEW_GCC_PATH}/cc\"\n  fi\n\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/gcc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-gcc\"\n\n  cp -a \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/gcc/x86_64-pc-linux-gnu/9.2.0/*.{a,o} \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/\n\nfi\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/g++\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/c++\"; then\n    ln -s g++ \"${DESTDIR}${NEW_GCC_PATH}/c++\"\n  fi\n\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/g++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-g++\"\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/c++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-c++\"\n\nfi\n\nrm -f \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib64/libcc1.*\n\n# Fixinclude locates the wrong pthread.h\nfind \"${DESTDIR}${ORCHESTRA_ROOT}\" -type d -name include-fixed -exec rm -f {}/pthread.h \\;\n"
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    stage2
  "license": |-
    source/COPYING
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies": []
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.1.4.tar.xz
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS} -C "$BUILD_DIR" \
          ARCH=i386 \
          INSTALL_HDR_PATH="${DESTDIR}${ORCHESTRA_ROOT}/i386-gentoo-linux-musl/usr" headers_install
      "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":
      - |-
        toolchain/i386/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.12.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.12-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/i386-gentoo-linux-musl/gcc-bin/9.2.0//i386-gentoo-linux-musl-gcc" CFLAGS=" -ggdb3" "$BUILD_DIR/configure" \
          --target=i386-gentoo-linux-musl \
          --prefix="$ORCHESTRA_ROOT/i386-gentoo-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/i386-gentoo-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
    "headers":
      "build_dependencies": []
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.12.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.12-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="true" "$BUILD_DIR/configure" \
          --target=i386-gentoo-linux-musl \
          --prefix="$ORCHESTRA_ROOT/i386-gentoo-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/i386-gentoo-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS} include/bits/alltypes.h || make ${JOBS:+-j$JOBS} obj/include/bits/alltypes.h
        make ${JOBS:+-j$JOBS} install-headers
      "ndebug": !!bool |-
        true
    "o0":
      "build_dependencies":
      - |-
        toolchain/i386/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.12.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.12-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/i386-gentoo-linux-musl/gcc-bin/9.2.0//i386-gentoo-linux-musl-gcc" CFLAGS=" -ggdb3 -Wl,--gc-sections -ffunction-sections -O0" "$BUILD_DIR/configure" \
          --target=i386-gentoo-linux-musl \
          --prefix="$ORCHESTRA_ROOT/i386-gentoo-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/i386-gentoo-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
    "o1":
      "build_dependencies":
      - |-
        toolchain/i386/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.12.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.12-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/i386-gentoo-linux-musl/gcc-bin/9.2.0//i386-gentoo-linux-musl-gcc" CFLAGS=" -ggdb3 -Wl,--gc-sections -ffunction-sections -O1" "$BUILD_DIR/configure" \
          --target=i386-gentoo-linux-musl \
          --prefix="$ORCHESTRA_ROOT/i386-gentoo-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/i386-gentoo-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
    "o2":
      "build_dependencies":
      - |-
        toolchain/i386/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.12.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.12-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/i386-gentoo-linux-musl/gcc-bin/9.2.0//i386-gentoo-linux-musl-gcc" CFLAGS=" -ggdb3 -Wl,--gc-sections -ffunction-sections -O2" "$BUILD_DIR/configure" \
          --target=i386-gentoo-linux-musl \
          --prefix="$ORCHESTRA_ROOT/i386-gentoo-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/i386-gentoo-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
    "o3":
      "build_dependencies":
      - |-
        toolchain/i386/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.12.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.12-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/i386-gentoo-linux-musl/gcc-bin/9.2.0//i386-gentoo-linux-musl-gcc" CFLAGS=" -ggdb3 -Wl,--gc-sections -ffunction-sections -O3" "$BUILD_DIR/configure" \
          --target=i386-gentoo-linux-musl \
          --prefix="$ORCHESTRA_ROOT/i386-gentoo-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/i386-gentoo-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": |-
    COPYRIGHT
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path":
  - |-
    ${ORCHESTRA_ROOT}/x86_64-pc-linux-gnu/mips-unknown-linux-musl/binutils-bin/2.35
  "builds":
    "default":
      "build_dependencies":
      - |-
        glibc
      - |-
        toolchain/host/gcc
      - |-
        toolchain/host/binutils
      "configure": |
        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        extract.sh --into "$SOURCE_DIR" https://ftp.gnu.org/gnu/binutils/binutils-2.35.tar.bz2
        cd "$BUILD_DIR" && "$SOURCE_DIR/configure" \
          --build=x86_64-pc-linux-gnu \
          --host=x86_64-pc-linux-gnu \
          --target=mips-unknown-linux-musl \
          --with-sysroot="$ORCHESTRA_ROOT/mips-unknown-linux-musl" \
          --prefix=$ORCHESTRA_ROOT \
          --datadir=$ORCHESTRA_ROOT/share/binutils-data/mips-unknown-linux-musl/2.35 \
          --infodir=$ORCHESTRA_ROOT/share/binutils-data/mips-unknown-linux-musl/2.35/info \
          --mandir=$ORCHESTRA_ROOT/share/binutils-data/mips-unknown-linux-musl/2.35/man \
          --bindir=$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/mips-unknown-linux-musl/binutils-bin/2.35 \
          --libdir=$ORCHESTRA_ROOT/lib64/binutils/mips-unknown-linux-musl/2.35 \
          --libexecdir=$ORCHESTRA_ROOT/lib64/binutils/mips-unknown-linux-musl/2.35 \
          --includedir=$ORCHESTRA_ROOT/lib64/binutils/mips-unknown-linux-musl/2.35/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 \
           \
          CFLAGS="-w -ggdb3 -O3" \
          CXXFLAGS="-w -ggdb3 -O3"
      "dependencies":
      - |-
        gcc-runtime
      "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": |-
    source/COPYING
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path":
  - |-
    ${ORCHESTRA_ROOT}/x86_64-pc-linux-gnu/mips-unknown-linux-musl/gcc-bin/9.2.0
  "builds":
    "stage1":
      "build_dependencies":
      - |-
        glibc
      - |-
        gmp
      - |-
        mpfr
      - |-
        mpc
      "configure": |
        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        extract.sh --into "$SOURCE_DIR" https://ftp.gnu.org/gnu/gcc/gcc-9.2.0/gcc-9.2.0.tar.gz
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-cfns-fix-mismatch-in-gnu_inline-attributes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-cpp-musl-support.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-fixes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.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"


        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=mips-unknown-linux-musl \
          --prefix=$ORCHESTRA_ROOT \
          --bindir=$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/mips-unknown-linux-musl/gcc-bin/9.2.0 \
          --includedir=$ORCHESTRA_ROOT/lib/gcc/mips-unknown-linux-musl/9.2.0/include \
          --datadir=$ORCHESTRA_ROOT/share/gcc-data/mips-unknown-linux-musl/9.2.0 \
          --mandir=$ORCHESTRA_ROOT/share/gcc-data/mips-unknown-linux-musl/9.2.0/man \
          --infodir=$ORCHESTRA_ROOT/share/gcc-data/mips-unknown-linux-musl/9.2.0/info \
          --with-sysroot=$ORCHESTRA_ROOT/mips-unknown-linux-musl \
          --enable-obsolete \
          --enable-secureplt \
          --disable-werror \
          --disable-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 \
          --with-abi= \
          --without-isl \
          --disable-libsanitizer \
          --disable-libssp \
          --disable-shared \
          --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=$INSTALL_LINK_ONLY_PATH -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 -L$INSTALL_LINK_ONLY_PATH/lib64 --sysroot=$INSTALL_LINK_ONLY_PATH"
      "dependencies":
      - |-
        toolchain/mips/binutils
      - |-
        toolchain/host/binutils
      - |-
        toolchain/mips/musl~headers
      - |-
        toolchain/mips/linux-headers
      "install": "cd \"$BUILD_DIR\"\nmake ${JOBS:+-j$JOBS} \nmake install \n\nNEW_GCC_PATH=\"$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/mips-unknown-linux-musl/gcc-bin/9.2.0/\"\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/gcc\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/cc\"; then\n    ln -s gcc \"${DESTDIR}${NEW_GCC_PATH}/cc\"\n  fi\n\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/gcc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-gcc\"\n\n  cp -a \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/gcc/x86_64-pc-linux-gnu/9.2.0/*.{a,o} \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/\n\nfi\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/g++\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/c++\"; then\n    ln -s g++ \"${DESTDIR}${NEW_GCC_PATH}/c++\"\n  fi\n\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/g++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-g++\"\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/c++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-c++\"\n\nfi\n\nrm -f \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib64/libcc1.*\n\n# Fixinclude locates the wrong pthread.h\nfind \"${DESTDIR}${ORCHESTRA_ROOT}\" -type d -name include-fixed -exec rm -f {}/pthread.h \\;\n"
      "ndebug": !!bool |-
        true
    "stage2":
      "build_dependencies":
      - |-
        toolchain/mips/gcc~stage1
      - |-
        glibc
      - |-
        gmp
      - |-
        mpfr
      - |-
        mpc
      "configure": |
        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        extract.sh --into "$SOURCE_DIR" https://ftp.gnu.org/gnu/gcc/gcc-9.2.0/gcc-9.2.0.tar.gz
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-cfns-fix-mismatch-in-gnu_inline-attributes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-cpp-musl-support.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-fixes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.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"


        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=mips-unknown-linux-musl \
          --prefix=$ORCHESTRA_ROOT \
          --bindir=$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/mips-unknown-linux-musl/gcc-bin/9.2.0 \
          --includedir=$ORCHESTRA_ROOT/lib/gcc/mips-unknown-linux-musl/9.2.0/include \
          --datadir=$ORCHESTRA_ROOT/share/gcc-data/mips-unknown-linux-musl/9.2.0 \
          --mandir=$ORCHESTRA_ROOT/share/gcc-data/mips-unknown-linux-musl/9.2.0/man \
          --infodir=$ORCHESTRA_ROOT/share/gcc-data/mips-unknown-linux-musl/9.2.0/info \
          --with-sysroot=$ORCHESTRA_ROOT/mips-unknown-linux-musl \
          --enable-obsolete \
          --enable-secureplt \
          --disable-werror \
          --disable-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 \
          --with-abi= \
          --without-isl \
          --disable-libsanitizer \
          --disable-libssp \
          --disable-shared \
          --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=$INSTALL_LINK_ONLY_PATH -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 -L$INSTALL_LINK_ONLY_PATH/lib64 --sysroot=$INSTALL_LINK_ONLY_PATH"
      "dependencies":
      - |-
        toolchain/mips/binutils
      - |-
        toolchain/host/binutils
      - |-
        toolchain/mips/musl
      - |-
        toolchain/mips/linux-headers
      "install": "cd \"$BUILD_DIR\"\nmake ${JOBS:+-j$JOBS} \nmake install \n\nNEW_GCC_PATH=\"$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/mips-unknown-linux-musl/gcc-bin/9.2.0/\"\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/gcc\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/cc\"; then\n    ln -s gcc \"${DESTDIR}${NEW_GCC_PATH}/cc\"\n  fi\n\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/gcc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-gcc\"\n\n  cp -a \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/gcc/x86_64-pc-linux-gnu/9.2.0/*.{a,o} \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/\n\nfi\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/g++\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/c++\"; then\n    ln -s g++ \"${DESTDIR}${NEW_GCC_PATH}/c++\"\n  fi\n\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/g++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-g++\"\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/c++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-c++\"\n\nfi\n\nrm -f \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib64/libcc1.*\n\n# Fixinclude locates the wrong pthread.h\nfind \"${DESTDIR}${ORCHESTRA_ROOT}\" -type d -name include-fixed -exec rm -f {}/pthread.h \\;\n"
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    stage2
  "license": |-
    source/COPYING
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies": []
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.1.4.tar.xz
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS} -C "$BUILD_DIR" \
          ARCH=mips \
          INSTALL_HDR_PATH="${DESTDIR}${ORCHESTRA_ROOT}/mips-unknown-linux-musl/usr" headers_install
      "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":
      - |-
        toolchain/mips/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.12.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.12-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/mips-unknown-linux-musl/gcc-bin/9.2.0//mips-unknown-linux-musl-gcc" CFLAGS=" -ggdb3" "$BUILD_DIR/configure" \
          --target=mips-unknown-linux-musl \
          --prefix="$ORCHESTRA_ROOT/mips-unknown-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/mips-unknown-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
    "headers":
      "build_dependencies": []
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.12.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.12-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="true" "$BUILD_DIR/configure" \
          --target=mips-unknown-linux-musl \
          --prefix="$ORCHESTRA_ROOT/mips-unknown-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/mips-unknown-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS} include/bits/alltypes.h || make ${JOBS:+-j$JOBS} obj/include/bits/alltypes.h
        make ${JOBS:+-j$JOBS} install-headers
      "ndebug": !!bool |-
        true
    "o0":
      "build_dependencies":
      - |-
        toolchain/mips/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.12.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.12-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/mips-unknown-linux-musl/gcc-bin/9.2.0//mips-unknown-linux-musl-gcc" CFLAGS=" -ggdb3 -Wl,--gc-sections -ffunction-sections -O0" "$BUILD_DIR/configure" \
          --target=mips-unknown-linux-musl \
          --prefix="$ORCHESTRA_ROOT/mips-unknown-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/mips-unknown-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
    "o1":
      "build_dependencies":
      - |-
        toolchain/mips/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.12.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.12-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/mips-unknown-linux-musl/gcc-bin/9.2.0//mips-unknown-linux-musl-gcc" CFLAGS=" -ggdb3 -Wl,--gc-sections -ffunction-sections -O1" "$BUILD_DIR/configure" \
          --target=mips-unknown-linux-musl \
          --prefix="$ORCHESTRA_ROOT/mips-unknown-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/mips-unknown-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
    "o2":
      "build_dependencies":
      - |-
        toolchain/mips/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.12.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.12-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/mips-unknown-linux-musl/gcc-bin/9.2.0//mips-unknown-linux-musl-gcc" CFLAGS=" -ggdb3 -Wl,--gc-sections -ffunction-sections -O2" "$BUILD_DIR/configure" \
          --target=mips-unknown-linux-musl \
          --prefix="$ORCHESTRA_ROOT/mips-unknown-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/mips-unknown-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
    "o3":
      "build_dependencies":
      - |-
        toolchain/mips/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.12.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.12-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/mips-unknown-linux-musl/gcc-bin/9.2.0//mips-unknown-linux-musl-gcc" CFLAGS=" -ggdb3 -Wl,--gc-sections -ffunction-sections -O3" "$BUILD_DIR/configure" \
          --target=mips-unknown-linux-musl \
          --prefix="$ORCHESTRA_ROOT/mips-unknown-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/mips-unknown-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": |-
    COPYRIGHT
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path":
  - |-
    ${ORCHESTRA_ROOT}/x86_64-pc-linux-gnu/mipsel-unknown-linux-musl/binutils-bin/2.35
  "builds":
    "default":
      "build_dependencies":
      - |-
        glibc
      - |-
        toolchain/host/gcc
      - |-
        toolchain/host/binutils
      "configure": |
        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        extract.sh --into "$SOURCE_DIR" https://ftp.gnu.org/gnu/binutils/binutils-2.35.tar.bz2
        cd "$BUILD_DIR" && "$SOURCE_DIR/configure" \
          --build=x86_64-pc-linux-gnu \
          --host=x86_64-pc-linux-gnu \
          --target=mipsel-unknown-linux-musl \
          --with-sysroot="$ORCHESTRA_ROOT/mipsel-unknown-linux-musl" \
          --prefix=$ORCHESTRA_ROOT \
          --datadir=$ORCHESTRA_ROOT/share/binutils-data/mipsel-unknown-linux-musl/2.35 \
          --infodir=$ORCHESTRA_ROOT/share/binutils-data/mipsel-unknown-linux-musl/2.35/info \
          --mandir=$ORCHESTRA_ROOT/share/binutils-data/mipsel-unknown-linux-musl/2.35/man \
          --bindir=$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/mipsel-unknown-linux-musl/binutils-bin/2.35 \
          --libdir=$ORCHESTRA_ROOT/lib64/binutils/mipsel-unknown-linux-musl/2.35 \
          --libexecdir=$ORCHESTRA_ROOT/lib64/binutils/mipsel-unknown-linux-musl/2.35 \
          --includedir=$ORCHESTRA_ROOT/lib64/binutils/mipsel-unknown-linux-musl/2.35/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 \
           \
          CFLAGS="-w -ggdb3 -O3" \
          CXXFLAGS="-w -ggdb3 -O3"
      "dependencies":
      - |-
        gcc-runtime
      "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": |-
    source/COPYING
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path":
  - |-
    ${ORCHESTRA_ROOT}/x86_64-pc-linux-gnu/mipsel-unknown-linux-musl/gcc-bin/9.2.0
  "builds":
    "stage1":
      "build_dependencies":
      - |-
        glibc
      - |-
        gmp
      - |-
        mpfr
      - |-
        mpc
      "configure": |
        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        extract.sh --into "$SOURCE_DIR" https://ftp.gnu.org/gnu/gcc/gcc-9.2.0/gcc-9.2.0.tar.gz
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-cfns-fix-mismatch-in-gnu_inline-attributes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-cpp-musl-support.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-fixes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.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"


        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=mipsel-unknown-linux-musl \
          --prefix=$ORCHESTRA_ROOT \
          --bindir=$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/mipsel-unknown-linux-musl/gcc-bin/9.2.0 \
          --includedir=$ORCHESTRA_ROOT/lib/gcc/mipsel-unknown-linux-musl/9.2.0/include \
          --datadir=$ORCHESTRA_ROOT/share/gcc-data/mipsel-unknown-linux-musl/9.2.0 \
          --mandir=$ORCHESTRA_ROOT/share/gcc-data/mipsel-unknown-linux-musl/9.2.0/man \
          --infodir=$ORCHESTRA_ROOT/share/gcc-data/mipsel-unknown-linux-musl/9.2.0/info \
          --with-sysroot=$ORCHESTRA_ROOT/mipsel-unknown-linux-musl \
          --enable-obsolete \
          --enable-secureplt \
          --disable-werror \
          --disable-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 \
          --with-abi= \
          --without-isl \
          --disable-libsanitizer \
          --disable-libssp \
          --disable-shared \
          --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=$INSTALL_LINK_ONLY_PATH -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 -L$INSTALL_LINK_ONLY_PATH/lib64 --sysroot=$INSTALL_LINK_ONLY_PATH"
      "dependencies":
      - |-
        toolchain/mipsel/binutils
      - |-
        toolchain/host/binutils
      - |-
        toolchain/mipsel/musl~headers
      - |-
        toolchain/mipsel/linux-headers
      "install": "cd \"$BUILD_DIR\"\nmake ${JOBS:+-j$JOBS} \nmake install \n\nNEW_GCC_PATH=\"$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/mipsel-unknown-linux-musl/gcc-bin/9.2.0/\"\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/gcc\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/cc\"; then\n    ln -s gcc \"${DESTDIR}${NEW_GCC_PATH}/cc\"\n  fi\n\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/gcc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-gcc\"\n\n  cp -a \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/gcc/x86_64-pc-linux-gnu/9.2.0/*.{a,o} \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/\n\nfi\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/g++\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/c++\"; then\n    ln -s g++ \"${DESTDIR}${NEW_GCC_PATH}/c++\"\n  fi\n\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/g++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-g++\"\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/c++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-c++\"\n\nfi\n\nrm -f \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib64/libcc1.*\n\n# Fixinclude locates the wrong pthread.h\nfind \"${DESTDIR}${ORCHESTRA_ROOT}\" -type d -name include-fixed -exec rm -f {}/pthread.h \\;\n"
      "ndebug": !!bool |-
        true
    "stage2":
      "build_dependencies":
      - |-
        toolchain/mipsel/gcc~stage1
      - |-
        glibc
      - |-
        gmp
      - |-
        mpfr
      - |-
        mpc
      "configure": |
        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        extract.sh --into "$SOURCE_DIR" https://ftp.gnu.org/gnu/gcc/gcc-9.2.0/gcc-9.2.0.tar.gz
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-cfns-fix-mismatch-in-gnu_inline-attributes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-cpp-musl-support.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-fixes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.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"


        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=mipsel-unknown-linux-musl \
          --prefix=$ORCHESTRA_ROOT \
          --bindir=$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/mipsel-unknown-linux-musl/gcc-bin/9.2.0 \
          --includedir=$ORCHESTRA_ROOT/lib/gcc/mipsel-unknown-linux-musl/9.2.0/include \
          --datadir=$ORCHESTRA_ROOT/share/gcc-data/mipsel-unknown-linux-musl/9.2.0 \
          --mandir=$ORCHESTRA_ROOT/share/gcc-data/mipsel-unknown-linux-musl/9.2.0/man \
          --infodir=$ORCHESTRA_ROOT/share/gcc-data/mipsel-unknown-linux-musl/9.2.0/info \
          --with-sysroot=$ORCHESTRA_ROOT/mipsel-unknown-linux-musl \
          --enable-obsolete \
          --enable-secureplt \
          --disable-werror \
          --disable-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 \
          --with-abi= \
          --without-isl \
          --disable-libsanitizer \
          --disable-libssp \
          --disable-shared \
          --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=$INSTALL_LINK_ONLY_PATH -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 -L$INSTALL_LINK_ONLY_PATH/lib64 --sysroot=$INSTALL_LINK_ONLY_PATH"
      "dependencies":
      - |-
        toolchain/mipsel/binutils
      - |-
        toolchain/host/binutils
      - |-
        toolchain/mipsel/musl
      - |-
        toolchain/mipsel/linux-headers
      "install": "cd \"$BUILD_DIR\"\nmake ${JOBS:+-j$JOBS} \nmake install \n\nNEW_GCC_PATH=\"$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/mipsel-unknown-linux-musl/gcc-bin/9.2.0/\"\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/gcc\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/cc\"; then\n    ln -s gcc \"${DESTDIR}${NEW_GCC_PATH}/cc\"\n  fi\n\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/gcc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-gcc\"\n\n  cp -a \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/gcc/x86_64-pc-linux-gnu/9.2.0/*.{a,o} \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/\n\nfi\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/g++\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/c++\"; then\n    ln -s g++ \"${DESTDIR}${NEW_GCC_PATH}/c++\"\n  fi\n\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/g++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-g++\"\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/c++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-c++\"\n\nfi\n\nrm -f \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib64/libcc1.*\n\n# Fixinclude locates the wrong pthread.h\nfind \"${DESTDIR}${ORCHESTRA_ROOT}\" -type d -name include-fixed -exec rm -f {}/pthread.h \\;\n"
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    stage2
  "license": |-
    source/COPYING
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies": []
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.1.4.tar.xz
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS} -C "$BUILD_DIR" \
          ARCH=mips \
          INSTALL_HDR_PATH="${DESTDIR}${ORCHESTRA_ROOT}/mipsel-unknown-linux-musl/usr" headers_install
      "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":
      - |-
        toolchain/mipsel/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.12.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.12-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/mipsel-unknown-linux-musl/gcc-bin/9.2.0//mipsel-unknown-linux-musl-gcc" CFLAGS=" -ggdb3" "$BUILD_DIR/configure" \
          --target=mipsel-unknown-linux-musl \
          --prefix="$ORCHESTRA_ROOT/mipsel-unknown-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/mipsel-unknown-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
    "headers":
      "build_dependencies": []
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.12.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.12-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="true" "$BUILD_DIR/configure" \
          --target=mipsel-unknown-linux-musl \
          --prefix="$ORCHESTRA_ROOT/mipsel-unknown-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/mipsel-unknown-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS} include/bits/alltypes.h || make ${JOBS:+-j$JOBS} obj/include/bits/alltypes.h
        make ${JOBS:+-j$JOBS} install-headers
      "ndebug": !!bool |-
        true
    "o0":
      "build_dependencies":
      - |-
        toolchain/mipsel/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.12.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.12-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/mipsel-unknown-linux-musl/gcc-bin/9.2.0//mipsel-unknown-linux-musl-gcc" CFLAGS=" -ggdb3 -Wl,--gc-sections -ffunction-sections -O0" "$BUILD_DIR/configure" \
          --target=mipsel-unknown-linux-musl \
          --prefix="$ORCHESTRA_ROOT/mipsel-unknown-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/mipsel-unknown-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
    "o1":
      "build_dependencies":
      - |-
        toolchain/mipsel/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.12.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.12-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/mipsel-unknown-linux-musl/gcc-bin/9.2.0//mipsel-unknown-linux-musl-gcc" CFLAGS=" -ggdb3 -Wl,--gc-sections -ffunction-sections -O1" "$BUILD_DIR/configure" \
          --target=mipsel-unknown-linux-musl \
          --prefix="$ORCHESTRA_ROOT/mipsel-unknown-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/mipsel-unknown-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
    "o2":
      "build_dependencies":
      - |-
        toolchain/mipsel/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.12.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.12-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/mipsel-unknown-linux-musl/gcc-bin/9.2.0//mipsel-unknown-linux-musl-gcc" CFLAGS=" -ggdb3 -Wl,--gc-sections -ffunction-sections -O2" "$BUILD_DIR/configure" \
          --target=mipsel-unknown-linux-musl \
          --prefix="$ORCHESTRA_ROOT/mipsel-unknown-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/mipsel-unknown-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
    "o3":
      "build_dependencies":
      - |-
        toolchain/mipsel/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.12.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.12-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/mipsel-unknown-linux-musl/gcc-bin/9.2.0//mipsel-unknown-linux-musl-gcc" CFLAGS=" -ggdb3 -Wl,--gc-sections -ffunction-sections -O3" "$BUILD_DIR/configure" \
          --target=mipsel-unknown-linux-musl \
          --prefix="$ORCHESTRA_ROOT/mipsel-unknown-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/mipsel-unknown-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": |-
    COPYRIGHT
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path":
  - |-
    ${ORCHESTRA_ROOT}/x86_64-pc-linux-gnu/s390x-ibm-linux-musl/binutils-bin/2.35
  "builds":
    "default":
      "build_dependencies":
      - |-
        glibc
      - |-
        toolchain/host/gcc
      - |-
        toolchain/host/binutils
      "configure": |
        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        extract.sh --into "$SOURCE_DIR" https://ftp.gnu.org/gnu/binutils/binutils-2.35.tar.bz2
        cd "$BUILD_DIR" && "$SOURCE_DIR/configure" \
          --build=x86_64-pc-linux-gnu \
          --host=x86_64-pc-linux-gnu \
          --target=s390x-ibm-linux-musl \
          --with-sysroot="$ORCHESTRA_ROOT/s390x-ibm-linux-musl" \
          --prefix=$ORCHESTRA_ROOT \
          --datadir=$ORCHESTRA_ROOT/share/binutils-data/s390x-ibm-linux-musl/2.35 \
          --infodir=$ORCHESTRA_ROOT/share/binutils-data/s390x-ibm-linux-musl/2.35/info \
          --mandir=$ORCHESTRA_ROOT/share/binutils-data/s390x-ibm-linux-musl/2.35/man \
          --bindir=$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/s390x-ibm-linux-musl/binutils-bin/2.35 \
          --libdir=$ORCHESTRA_ROOT/lib64/binutils/s390x-ibm-linux-musl/2.35 \
          --libexecdir=$ORCHESTRA_ROOT/lib64/binutils/s390x-ibm-linux-musl/2.35 \
          --includedir=$ORCHESTRA_ROOT/lib64/binutils/s390x-ibm-linux-musl/2.35/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 \
           \
          CFLAGS="-w -ggdb3 -O3" \
          CXXFLAGS="-w -ggdb3 -O3"
      "dependencies":
      - |-
        gcc-runtime
      "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": |-
    source/COPYING
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path":
  - |-
    ${ORCHESTRA_ROOT}/x86_64-pc-linux-gnu/s390x-ibm-linux-musl/gcc-bin/7.3.0
  "builds":
    "stage1":
      "build_dependencies":
      - |-
        glibc
      - |-
        gmp
      - |-
        mpfr
      - |-
        mpc
      "configure": |
        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        extract.sh --into "$SOURCE_DIR" https://ftp.gnu.org/gnu/gcc/gcc-7.3.0/gcc-7.3.0.tar.gz
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-7.3.0-cfns-fix-mismatch-in-gnu_inline-attributes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-7.3.0-cpp-musl-support.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-7.3.0-fixes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-7.3.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"


        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=s390x-ibm-linux-musl \
          --prefix=$ORCHESTRA_ROOT \
          --bindir=$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/s390x-ibm-linux-musl/gcc-bin/7.3.0 \
          --includedir=$ORCHESTRA_ROOT/lib/gcc/s390x-ibm-linux-musl/7.3.0/include \
          --datadir=$ORCHESTRA_ROOT/share/gcc-data/s390x-ibm-linux-musl/7.3.0 \
          --mandir=$ORCHESTRA_ROOT/share/gcc-data/s390x-ibm-linux-musl/7.3.0/man \
          --infodir=$ORCHESTRA_ROOT/share/gcc-data/s390x-ibm-linux-musl/7.3.0/info \
          --with-sysroot=$ORCHESTRA_ROOT/s390x-ibm-linux-musl \
          --enable-obsolete \
          --enable-secureplt \
          --disable-werror \
          --disable-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 \
          --without-isl \
          --with-long-double-128 \
          --disable-libsanitizer \
          --disable-libssp \
          --disable-shared \
          --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=$INSTALL_LINK_ONLY_PATH -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 -L$INSTALL_LINK_ONLY_PATH/lib64 --sysroot=$INSTALL_LINK_ONLY_PATH"
      "dependencies":
      - |-
        toolchain/s390x/binutils
      - |-
        toolchain/host/binutils
      - |-
        toolchain/s390x/musl~headers
      - |-
        toolchain/s390x/linux-headers
      "install": "cd \"$BUILD_DIR\"\nmake ${JOBS:+-j$JOBS} \nmake install \n\nNEW_GCC_PATH=\"$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/s390x-ibm-linux-musl/gcc-bin/7.3.0/\"\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/gcc\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/cc\"; then\n    ln -s gcc \"${DESTDIR}${NEW_GCC_PATH}/cc\"\n  fi\n\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/gcc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-gcc\"\n\n  cp -a \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/gcc/x86_64-pc-linux-gnu/7.3.0/*.{a,o} \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/\n\nfi\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/g++\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/c++\"; then\n    ln -s g++ \"${DESTDIR}${NEW_GCC_PATH}/c++\"\n  fi\n\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/g++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-g++\"\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/c++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-c++\"\n\nfi\n\nrm -f \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib64/libcc1.*\n\n# Fixinclude locates the wrong pthread.h\nfind \"${DESTDIR}${ORCHESTRA_ROOT}\" -type d -name include-fixed -exec rm -f {}/pthread.h \\;\n"
      "ndebug": !!bool |-
        true
    "stage2":
      "build_dependencies":
      - |-
        toolchain/s390x/gcc~stage1
      - |-
        glibc
      - |-
        gmp
      - |-
        mpfr
      - |-
        mpc
      "configure": |
        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        extract.sh --into "$SOURCE_DIR" https://ftp.gnu.org/gnu/gcc/gcc-7.3.0/gcc-7.3.0.tar.gz
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-7.3.0-cfns-fix-mismatch-in-gnu_inline-attributes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-7.3.0-cpp-musl-support.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-7.3.0-fixes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-7.3.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"


        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=s390x-ibm-linux-musl \
          --prefix=$ORCHESTRA_ROOT \
          --bindir=$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/s390x-ibm-linux-musl/gcc-bin/7.3.0 \
          --includedir=$ORCHESTRA_ROOT/lib/gcc/s390x-ibm-linux-musl/7.3.0/include \
          --datadir=$ORCHESTRA_ROOT/share/gcc-data/s390x-ibm-linux-musl/7.3.0 \
          --mandir=$ORCHESTRA_ROOT/share/gcc-data/s390x-ibm-linux-musl/7.3.0/man \
          --infodir=$ORCHESTRA_ROOT/share/gcc-data/s390x-ibm-linux-musl/7.3.0/info \
          --with-sysroot=$ORCHESTRA_ROOT/s390x-ibm-linux-musl \
          --enable-obsolete \
          --enable-secureplt \
          --disable-werror \
          --disable-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 \
          --without-isl \
          --with-long-double-128 \
          --disable-libsanitizer \
          --disable-libssp \
          --disable-shared \
          --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=$INSTALL_LINK_ONLY_PATH -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 -L$INSTALL_LINK_ONLY_PATH/lib64 --sysroot=$INSTALL_LINK_ONLY_PATH"
      "dependencies":
      - |-
        toolchain/s390x/binutils
      - |-
        toolchain/host/binutils
      - |-
        toolchain/s390x/musl
      - |-
        toolchain/s390x/linux-headers
      "install": "cd \"$BUILD_DIR\"\nmake ${JOBS:+-j$JOBS} \nmake install \n\nNEW_GCC_PATH=\"$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/s390x-ibm-linux-musl/gcc-bin/7.3.0/\"\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/gcc\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/cc\"; then\n    ln -s gcc \"${DESTDIR}${NEW_GCC_PATH}/cc\"\n  fi\n\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/gcc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-gcc\"\n\n  cp -a \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/gcc/x86_64-pc-linux-gnu/7.3.0/*.{a,o} \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/\n\nfi\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/g++\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/c++\"; then\n    ln -s g++ \"${DESTDIR}${NEW_GCC_PATH}/c++\"\n  fi\n\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/g++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-g++\"\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/c++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-c++\"\n\nfi\n\nrm -f \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib64/libcc1.*\n\n# Fixinclude locates the wrong pthread.h\nfind \"${DESTDIR}${ORCHESTRA_ROOT}\" -type d -name include-fixed -exec rm -f {}/pthread.h \\;\n"
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    stage2
  "license": |-
    source/COPYING
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies": []
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.1.4.tar.xz
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS} -C "$BUILD_DIR" \
          ARCH=s390 \
          INSTALL_HDR_PATH="${DESTDIR}${ORCHESTRA_ROOT}/s390x-ibm-linux-musl/usr" headers_install
      "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":
      - |-
        toolchain/s390x/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.19.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.19-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/s390x-ibm-linux-musl/gcc-bin/7.3.0//s390x-ibm-linux-musl-gcc" CFLAGS=" -ggdb3" "$BUILD_DIR/configure" \
          --target=s390x-ibm-linux-musl \
          --prefix="$ORCHESTRA_ROOT/s390x-ibm-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/s390x-ibm-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
    "headers":
      "build_dependencies": []
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.19.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.19-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="true" "$BUILD_DIR/configure" \
          --target=s390x-ibm-linux-musl \
          --prefix="$ORCHESTRA_ROOT/s390x-ibm-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/s390x-ibm-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS} include/bits/alltypes.h || make ${JOBS:+-j$JOBS} obj/include/bits/alltypes.h
        make ${JOBS:+-j$JOBS} install-headers
      "ndebug": !!bool |-
        true
    "o0":
      "build_dependencies":
      - |-
        toolchain/s390x/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.19.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.19-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/s390x-ibm-linux-musl/gcc-bin/7.3.0//s390x-ibm-linux-musl-gcc" CFLAGS=" -ggdb3 -Wl,--gc-sections -ffunction-sections -O0" "$BUILD_DIR/configure" \
          --target=s390x-ibm-linux-musl \
          --prefix="$ORCHESTRA_ROOT/s390x-ibm-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/s390x-ibm-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
    "o1":
      "build_dependencies":
      - |-
        toolchain/s390x/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.19.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.19-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/s390x-ibm-linux-musl/gcc-bin/7.3.0//s390x-ibm-linux-musl-gcc" CFLAGS=" -ggdb3 -Wl,--gc-sections -ffunction-sections -O1" "$BUILD_DIR/configure" \
          --target=s390x-ibm-linux-musl \
          --prefix="$ORCHESTRA_ROOT/s390x-ibm-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/s390x-ibm-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
    "o2":
      "build_dependencies":
      - |-
        toolchain/s390x/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.19.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.19-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/s390x-ibm-linux-musl/gcc-bin/7.3.0//s390x-ibm-linux-musl-gcc" CFLAGS=" -ggdb3 -Wl,--gc-sections -ffunction-sections -O2" "$BUILD_DIR/configure" \
          --target=s390x-ibm-linux-musl \
          --prefix="$ORCHESTRA_ROOT/s390x-ibm-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/s390x-ibm-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
    "o3":
      "build_dependencies":
      - |-
        toolchain/s390x/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.19.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.19-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/s390x-ibm-linux-musl/gcc-bin/7.3.0//s390x-ibm-linux-musl-gcc" CFLAGS=" -ggdb3 -Wl,--gc-sections -ffunction-sections -O3" "$BUILD_DIR/configure" \
          --target=s390x-ibm-linux-musl \
          --prefix="$ORCHESTRA_ROOT/s390x-ibm-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/s390x-ibm-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": |-
    COPYRIGHT
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies": []
      "configure": |
        INSTALL_PATH="lib/vc/x86_64-winsdk-vc16"
        mkdir -p "$BUILD_DIR"
        cd "$BUILD_DIR"
        mkdir lib64
        ln -s lib64 lib
        mkdir -p "$BUILD_DIR/$INSTALL_PATH"
        cd "$BUILD_DIR/$INSTALL_PATH"

        fetch.sh \
          --no-copy \
          'https://archive.org/download/vs2010_202102/vs2010.zip' \
          --save-as visual-studio-10-english.zip

        mkdir extract
        cd extract
        unzip "${SOURCE_ARCHIVES}/visual-studio-10-english.zip"

        7z x VCExpress/Ixpvc.exe

        msiinfo export vs_setup.msi Directory | sed 's/\t/,/g' > dirs.csv
        msiinfo export vs_setup.msi File | sed 's/\t/,/g' > file.csv
        msiinfo export vs_setup.msi Component | sed 's/\t/,/g' > component.csv

        mkdir extract-vs-setup
        cd extract-vs-setup
        7z x ../vs_setup.cab
        cd ..

        rm -rf SourceDir/
        "$ORCHESTRA_DOTDIR"/support/vs10-create-directories.py --create-directories dirs.csv file.csv component.csv | while IFS=, read -r TARGET_NAME TARGET_PATH; do
            if ! test -e "extract-vs-setup/$TARGET_NAME"; then
                echo "Warning: $TARGET_NAME not found" > /dev/stderr
                continue
            fi

            mv "extract-vs-setup/$TARGET_NAME" "./$TARGET_PATH"
        done

        rm -rf extract-vs-setup

        cd 'SourceDir/Program Files/Microsoft Visual Studio 10.0/Common7/IDE/'
        find . -maxdepth 1 -type f -exec cp -a {} ../../VC/bin/ \;
        cd -

        mv \
          'SourceDir/Program Files/Microsoft Visual Studio 10.0/VC' \
          ../VC

        mv \
          'SourceDir/Program Files/Microsoft SDKs/Windows/v7.0A' \
          ../sdk-70a

        cd ..

        rm -rf extract


        cat > cl.exe <<'EOF'
        #!/bin/bash


        SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )";

        # Genius
        shopt -s nocaseglob
        export INCLUDE="$SCRIPT_DIR/VC/include;$SCRIPT_DIR/sdk-70a/Include"
        export LIB="$SCRIPT_DIR/VC/lib;$SCRIPT_DIR/sdk-70a/Lib"

        OUTPUT="$(mktemp tmp.msvc-cl.exe.XXXXXXXXXX)";
        trap 'rm -f -- "$OUTPUT"' EXIT;

        # Suppress wine debug information
        export WINEDEBUG="-all"

        # Disable .Net and mshtml
        export WINEDLLOVERRIDES="mscoree,mshtml="

        # Run one dedicated mspdbsrv.exe per instance of cl.exe
        export _MSPDBSRV_ENDPOINT_="$(python3 -c 'import uuid; print(uuid.uuid4())')"
        wine "$SCRIPT_DIR"/VC/bin//mspdbsrv.ex*e -start -spawn &
        MSPDBSRV_PID="$!"

        # Stop mspdbsrv.exe upon exit
        trap 'wine "$SCRIPT_DIR"/VC/bin//mspdbsrv.ex*e -stop' EXIT;

        # Wait for mspdbsrv.exe to be up and running
        while ! [[ "$(readlink -f "/proc/$MSPDBSRV_PID/exe")" == *"wine"* ]]; do
            sleep 0.2
        done
        sleep 0.2

        # Run cl.exe, suppress its output in case of success
        if wine "$SCRIPT_DIR"/VC/bin//cl.ex*e "$@" >& "$OUTPUT"; then
            :
        else
            RESULT="$?"
            cat "$OUTPUT"
            exit "$RESULT"
        fi

        EOF

        chmod +x cl.exe

        cd "$BUILD_DIR"
        mkdir bin

        cat > bin/x86_64-winsdk-vc16-cl <<'EOF'
        #!/bin/bash

        SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )";

        PROGRAM_NAME="$(basename $0)"
        TRIPLE="${PROGRAM_NAME%-cl}"

        exec "$SCRIPT_DIR/../lib/vc/$TRIPLE/cl.exe" "$@"
        EOF
        chmod +x bin/x86_64-winsdk-vc16-cl
      "dependencies": []
      "install": "cd \"$BUILD_DIR\"\nif test \"$RUN_TESTS\" -eq 1; then\n  cat > test.c <<'EOF'\n#include <stdio.h>\n\nint main() {\n  puts(\"Hello world!\");\n  return 0;\n}\nEOF\n\n  \n  ./bin/x86_64-winsdk-vc16-cl test.c /DEBUG:FASTLINK /Zi\n  \n  export WINEDEBUG=-all\n  wine test.exe\n\n  rm test.*\nfi\n\ncp -far --reflink=auto \"$BUILD_DIR/\"* \"${DESTDIR}${ORCHESTRA_ROOT}/\"\n"
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": !!null |-
    null
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path":
  - |-
    ${ORCHESTRA_ROOT}/x86_64-pc-linux-gnu/x86_64-gentoo-linux-musl/binutils-bin/2.35
  "builds":
    "default":
      "build_dependencies":
      - |-
        glibc
      - |-
        toolchain/host/gcc
      - |-
        toolchain/host/binutils
      "configure": |
        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        extract.sh --into "$SOURCE_DIR" https://ftp.gnu.org/gnu/binutils/binutils-2.35.tar.bz2
        cd "$BUILD_DIR" && "$SOURCE_DIR/configure" \
          --build=x86_64-pc-linux-gnu \
          --host=x86_64-pc-linux-gnu \
          --target=x86_64-gentoo-linux-musl \
          --with-sysroot="$ORCHESTRA_ROOT/x86_64-gentoo-linux-musl" \
          --prefix=$ORCHESTRA_ROOT \
          --datadir=$ORCHESTRA_ROOT/share/binutils-data/x86_64-gentoo-linux-musl/2.35 \
          --infodir=$ORCHESTRA_ROOT/share/binutils-data/x86_64-gentoo-linux-musl/2.35/info \
          --mandir=$ORCHESTRA_ROOT/share/binutils-data/x86_64-gentoo-linux-musl/2.35/man \
          --bindir=$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/x86_64-gentoo-linux-musl/binutils-bin/2.35 \
          --libdir=$ORCHESTRA_ROOT/lib64/binutils/x86_64-gentoo-linux-musl/2.35 \
          --libexecdir=$ORCHESTRA_ROOT/lib64/binutils/x86_64-gentoo-linux-musl/2.35 \
          --includedir=$ORCHESTRA_ROOT/lib64/binutils/x86_64-gentoo-linux-musl/2.35/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 \
           \
          CFLAGS="-w -ggdb3 -O3" \
          CXXFLAGS="-w -ggdb3 -O3"
      "dependencies":
      - |-
        gcc-runtime
      "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": |-
    source/COPYING
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path":
  - |-
    ${ORCHESTRA_ROOT}/x86_64-pc-linux-gnu/x86_64-gentoo-linux-musl/gcc-bin/9.2.0
  "builds":
    "stage1":
      "build_dependencies":
      - |-
        glibc
      - |-
        gmp
      - |-
        mpfr
      - |-
        mpc
      "configure": |
        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        extract.sh --into "$SOURCE_DIR" https://ftp.gnu.org/gnu/gcc/gcc-9.2.0/gcc-9.2.0.tar.gz
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-cfns-fix-mismatch-in-gnu_inline-attributes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-cpp-musl-support.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-fixes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.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"


        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-gentoo-linux-musl \
          --prefix=$ORCHESTRA_ROOT \
          --bindir=$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/x86_64-gentoo-linux-musl/gcc-bin/9.2.0 \
          --includedir=$ORCHESTRA_ROOT/lib/gcc/x86_64-gentoo-linux-musl/9.2.0/include \
          --datadir=$ORCHESTRA_ROOT/share/gcc-data/x86_64-gentoo-linux-musl/9.2.0 \
          --mandir=$ORCHESTRA_ROOT/share/gcc-data/x86_64-gentoo-linux-musl/9.2.0/man \
          --infodir=$ORCHESTRA_ROOT/share/gcc-data/x86_64-gentoo-linux-musl/9.2.0/info \
          --with-sysroot=$ORCHESTRA_ROOT/x86_64-gentoo-linux-musl \
          --enable-obsolete \
          --enable-secureplt \
          --disable-werror \
          --disable-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-targets=all \
          --with-multilib-list=m64 \
          --without-isl \
          --disable-libsanitizer \
          --disable-libssp \
          --disable-shared \
          --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=$INSTALL_LINK_ONLY_PATH -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 -L$INSTALL_LINK_ONLY_PATH/lib64 --sysroot=$INSTALL_LINK_ONLY_PATH"
      "dependencies":
      - |-
        toolchain/x86-64/binutils
      - |-
        toolchain/host/binutils
      - |-
        toolchain/x86-64/musl~headers
      - |-
        toolchain/x86-64/linux-headers
      "install": "cd \"$BUILD_DIR\"\nmake ${JOBS:+-j$JOBS} \nmake install \n\nNEW_GCC_PATH=\"$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/x86_64-gentoo-linux-musl/gcc-bin/9.2.0/\"\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/gcc\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/cc\"; then\n    ln -s gcc \"${DESTDIR}${NEW_GCC_PATH}/cc\"\n  fi\n\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/gcc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-gcc\"\n\n  cp -a \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/gcc/x86_64-pc-linux-gnu/9.2.0/*.{a,o} \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/\n\nfi\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/g++\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/c++\"; then\n    ln -s g++ \"${DESTDIR}${NEW_GCC_PATH}/c++\"\n  fi\n\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/g++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-g++\"\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/c++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-c++\"\n\nfi\n\nrm -f \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib64/libcc1.*\n\n# Fixinclude locates the wrong pthread.h\nfind \"${DESTDIR}${ORCHESTRA_ROOT}\" -type d -name include-fixed -exec rm -f {}/pthread.h \\;\n"
      "ndebug": !!bool |-
        true
    "stage2":
      "build_dependencies":
      - |-
        toolchain/x86-64/gcc~stage1
      - |-
        glibc
      - |-
        gmp
      - |-
        mpfr
      - |-
        mpc
      "configure": |
        export SOURCE_DIR="$BUILD_DIR/source"
        mkdir -p "$SOURCE_DIR"
        extract.sh --into "$SOURCE_DIR" https://ftp.gnu.org/gnu/gcc/gcc-9.2.0/gcc-9.2.0.tar.gz
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-cfns-fix-mismatch-in-gnu_inline-attributes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-cpp-musl-support.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.2.0-fixes.patch" "$SOURCE_DIR"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/gcc-9.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"


        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-gentoo-linux-musl \
          --prefix=$ORCHESTRA_ROOT \
          --bindir=$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/x86_64-gentoo-linux-musl/gcc-bin/9.2.0 \
          --includedir=$ORCHESTRA_ROOT/lib/gcc/x86_64-gentoo-linux-musl/9.2.0/include \
          --datadir=$ORCHESTRA_ROOT/share/gcc-data/x86_64-gentoo-linux-musl/9.2.0 \
          --mandir=$ORCHESTRA_ROOT/share/gcc-data/x86_64-gentoo-linux-musl/9.2.0/man \
          --infodir=$ORCHESTRA_ROOT/share/gcc-data/x86_64-gentoo-linux-musl/9.2.0/info \
          --with-sysroot=$ORCHESTRA_ROOT/x86_64-gentoo-linux-musl \
          --enable-obsolete \
          --enable-secureplt \
          --disable-werror \
          --disable-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-targets=all \
          --with-multilib-list=m64 \
          --without-isl \
          --disable-libsanitizer \
          --disable-libssp \
          --disable-shared \
          --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=$INSTALL_LINK_ONLY_PATH -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 -L$INSTALL_LINK_ONLY_PATH/lib64 --sysroot=$INSTALL_LINK_ONLY_PATH"
      "dependencies":
      - |-
        toolchain/x86-64/binutils
      - |-
        toolchain/host/binutils
      - |-
        toolchain/x86-64/musl
      - |-
        toolchain/x86-64/linux-headers
      "install": "cd \"$BUILD_DIR\"\nmake ${JOBS:+-j$JOBS} \nmake install \n\nNEW_GCC_PATH=\"$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/x86_64-gentoo-linux-musl/gcc-bin/9.2.0/\"\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/gcc\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/cc\"; then\n    ln -s gcc \"${DESTDIR}${NEW_GCC_PATH}/cc\"\n  fi\n\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/gcc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-cc\"\n  ln -s gcc \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-gcc\"\n\n  cp -a \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/gcc/x86_64-pc-linux-gnu/9.2.0/*.{a,o} \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib/\n\nfi\n\nif test -e \"${DESTDIR}${NEW_GCC_PATH}/g++\"; then\n\n  if ! test -e \"${DESTDIR}${NEW_GCC_PATH}/c++\"; then\n    ln -s g++ \"${DESTDIR}${NEW_GCC_PATH}/c++\"\n  fi\n\n  cp \"${ORCHESTRA_DOTDIR}/support/hard-flags-compiler-wrapper.py\" \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/g++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-g++\"\n  mkdir -p \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/c++\"\n  ln -s g++ \"${DESTDIR}${ORCHESTRA_ROOT}/link-only/bin/x86_64-pc-linux-gnu-c++\"\n\nfi\n\nrm -f \"${DESTDIR}${ORCHESTRA_ROOT}\"/lib64/libcc1.*\n\n# Fixinclude locates the wrong pthread.h\nfind \"${DESTDIR}${ORCHESTRA_ROOT}\" -type d -name include-fixed -exec rm -f {}/pthread.h \\;\n"
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    stage2
  "license": |-
    source/COPYING
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies": []
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.1.4.tar.xz
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS} -C "$BUILD_DIR" \
          ARCH=x86_64 \
          INSTALL_HDR_PATH="${DESTDIR}${ORCHESTRA_ROOT}/x86_64-gentoo-linux-musl/usr" headers_install
      "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":
      - |-
        toolchain/x86-64/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.12.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.12-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/x86_64-gentoo-linux-musl/gcc-bin/9.2.0//x86_64-gentoo-linux-musl-gcc" CFLAGS=" -ggdb3" "$BUILD_DIR/configure" \
          --target=x86_64-gentoo-linux-musl \
          --prefix="$ORCHESTRA_ROOT/x86_64-gentoo-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/x86_64-gentoo-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
    "headers":
      "build_dependencies": []
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.12.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.12-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="true" "$BUILD_DIR/configure" \
          --target=x86_64-gentoo-linux-musl \
          --prefix="$ORCHESTRA_ROOT/x86_64-gentoo-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/x86_64-gentoo-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS} include/bits/alltypes.h || make ${JOBS:+-j$JOBS} obj/include/bits/alltypes.h
        make ${JOBS:+-j$JOBS} install-headers
      "ndebug": !!bool |-
        true
    "o0":
      "build_dependencies":
      - |-
        toolchain/x86-64/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.12.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.12-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/x86_64-gentoo-linux-musl/gcc-bin/9.2.0//x86_64-gentoo-linux-musl-gcc" CFLAGS=" -ggdb3 -Wl,--gc-sections -ffunction-sections -O0" "$BUILD_DIR/configure" \
          --target=x86_64-gentoo-linux-musl \
          --prefix="$ORCHESTRA_ROOT/x86_64-gentoo-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/x86_64-gentoo-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
    "o1":
      "build_dependencies":
      - |-
        toolchain/x86-64/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.12.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.12-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/x86_64-gentoo-linux-musl/gcc-bin/9.2.0//x86_64-gentoo-linux-musl-gcc" CFLAGS=" -ggdb3 -Wl,--gc-sections -ffunction-sections -O1" "$BUILD_DIR/configure" \
          --target=x86_64-gentoo-linux-musl \
          --prefix="$ORCHESTRA_ROOT/x86_64-gentoo-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/x86_64-gentoo-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
    "o2":
      "build_dependencies":
      - |-
        toolchain/x86-64/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.12.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.12-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/x86_64-gentoo-linux-musl/gcc-bin/9.2.0//x86_64-gentoo-linux-musl-gcc" CFLAGS=" -ggdb3 -Wl,--gc-sections -ffunction-sections -O2" "$BUILD_DIR/configure" \
          --target=x86_64-gentoo-linux-musl \
          --prefix="$ORCHESTRA_ROOT/x86_64-gentoo-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/x86_64-gentoo-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
    "o3":
      "build_dependencies":
      - |-
        toolchain/x86-64/gcc~stage1
      "configure": |
        mkdir -p "$BUILD_DIR"

        extract.sh --into "$BUILD_DIR" "http://www.musl-libc.org/releases/musl-1.1.12.tar.gz"
        patch-if-exists "${ORCHESTRA_DOTDIR}/patches/musl-1.1.12-printf-floating-point-rounding.patch" "$BUILD_DIR"

        cd "$BUILD_DIR" && CC="$ORCHESTRA_ROOT/x86_64-pc-linux-gnu/x86_64-gentoo-linux-musl/gcc-bin/9.2.0//x86_64-gentoo-linux-musl-gcc" CFLAGS=" -ggdb3 -Wl,--gc-sections -ffunction-sections -O3" "$BUILD_DIR/configure" \
          --target=x86_64-gentoo-linux-musl \
          --prefix="$ORCHESTRA_ROOT/x86_64-gentoo-linux-musl/usr" \
          --syslibdir="$ORCHESTRA_ROOT/x86_64-gentoo-linux-musl/lib" \
          --disable-gcc-wrapper
      "dependencies": []
      "install": |
        cd "$BUILD_DIR"
        make ${JOBS:+-j$JOBS}
        make install
      "ndebug": !!bool |-
        true
  "commit": !!null |-
    null
  "default_build": |-
    default
  "license": |-
    COPYRIGHT
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "debug":
      "build_dependencies":
      - |-
        revng-js-prerequisites
      - |-
        libxkbfile
      - |-
        libx11
      "configure": |
        rm -rf "$BUILD_DIR/vscode"
        mkdir -p "$BUILD_DIR/vscode"
        cd "$BUILD_DIR/vscode"

        rsync -aq \
          --exclude=.git \
          --exclude-from=<(git -C "$SOURCE_DIR" ls-files --exclude-standard -oi --directory) \
          "$SOURCE_DIR/" .

        find . -type f -name yarn.lock -printf '%h\n' | \
        while IFS= read -r directory; do
          pushd "$directory" &> /dev/null
          "$ORCHESTRA_DOTDIR"/support/fetch-js-dependencies yarn
          popd &> /dev/null
        done
      "dependencies": []
      "install": |
        cd "$BUILD_DIR/vscode"
        rsync -aq \
          --exclude-from=<(git -C "$SOURCE_DIR" ls-files --exclude-standard -oi --directory) \
          "$SOURCE_DIR/" .

        # Install dependencies, this process is mostly offline with the following exceptions
        # (to the best of our knowledge):
        # * node-gyp downloading header tarballs to compile native modules for node and electron
        #   (This can be fixed once node is within orchestra)
        # * vscode-web, when building electron targets, will download the prebuilt electron for the
        #   target to bundle with the build js files (this will be accounted for when building
        #   targets using electron)
        ELECTRON_SKIP_BINARY_DOWNLOAD=1 \
        PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 \
          yarn

        # Build vscode
        revng/web/build.sh \
          "${DESTDIR}${ORCHESTRA_ROOT}/share/vscode-web-vanilla.tar.xz" \
          0
      "ndebug": !!bool |-
        true
    "default":
      "build_dependencies":
      - |-
        revng-js-prerequisites
      - |-
        libxkbfile
      - |-
        libx11
      "configure": |
        rm -rf "$BUILD_DIR/vscode"
        mkdir -p "$BUILD_DIR/vscode"
        cd "$BUILD_DIR/vscode"

        rsync -aq \
          --exclude=.git \
          --exclude-from=<(git -C "$SOURCE_DIR" ls-files --exclude-standard -oi --directory) \
          "$SOURCE_DIR/" .

        find . -type f -name yarn.lock -printf '%h\n' | \
        while IFS= read -r directory; do
          pushd "$directory" &> /dev/null
          "$ORCHESTRA_DOTDIR"/support/fetch-js-dependencies yarn
          popd &> /dev/null
        done
      "dependencies": []
      "install": |
        cd "$BUILD_DIR/vscode"
        rsync -aq \
          --exclude-from=<(git -C "$SOURCE_DIR" ls-files --exclude-standard -oi --directory) \
          "$SOURCE_DIR/" .

        # Install dependencies, this process is mostly offline with the following exceptions
        # (to the best of our knowledge):
        # * node-gyp downloading header tarballs to compile native modules for node and electron
        #   (This can be fixed once node is within orchestra)
        # * vscode-web, when building electron targets, will download the prebuilt electron for the
        #   target to bundle with the build js files (this will be accounted for when building
        #   targets using electron)
        ELECTRON_SKIP_BINARY_DOWNLOAD=1 \
        PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 \
          yarn

        # Build vscode
        revng/web/build.sh \
          "${DESTDIR}${ORCHESTRA_ROOT}/share/vscode-web-vanilla.tar.xz" \
          1
      "ndebug": !!bool |-
        true
  "commit": |-
    0ac89467601269a3785d590837a69294ac45e7d6
  "default_build": |-
    default
  "license": |-
    LICENSE.txt
  "repository": |-
    vscode
  "skip_post_install": !!bool |-
    false
- "add_to_path": []
  "builds":
    "default":
      "build_dependencies":
      - |-
        host-c-toolchain
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" "https://xorg.freedesktop.org/archive/individual/proto/inputproto-2.3.tar.bz2"

        cd "$BUILD_DIR"
        ./configure \
          --prefix="$ORCHESTRA_ROOT" \
          --enable-shared \
          --disable-static \
          --disable-selective-werror \
          --without-xmlto --without-fop --without-xsltproc --disable-specs
      "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":
      - |-
        host-c-toolchain
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" "https://xorg.freedesktop.org/archive/individual/proto/kbproto-1.0.7.tar.bz2"

        cd "$BUILD_DIR"
        ./configure \
          --prefix="$ORCHESTRA_ROOT" \
          --enable-shared \
          --disable-static \
          --disable-selective-werror \
          --without-xmlto --without-fop --without-xsltproc --disable-specs
      "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":
      - |-
        host-c-toolchain
      - |-
        python
      "configure": "mkdir -p \"$BUILD_DIR\"\nextract.sh --into \"$BUILD_DIR\" \"https://xorg.freedesktop.org/archive/individual/proto/xcb-proto-1.15.tar.xz\"\n\ncd \"$BUILD_DIR\"\n./configure \\\n  --prefix=\"$ORCHESTRA_ROOT\" \\\n  --enable-shared \\\n  --disable-static \\\n  --disable-selective-werror\n  \n"
      "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":
      - |-
        host-c-toolchain
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" "https://xorg.freedesktop.org/archive/individual/proto/xextproto-7.3.0.tar.bz2"

        cd "$BUILD_DIR"
        ./configure \
          --prefix="$ORCHESTRA_ROOT" \
          --enable-shared \
          --disable-static \
          --disable-selective-werror \
          --without-xmlto --without-fop --without-xsltproc --disable-specs
      "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":
      - |-
        host-c-toolchain
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" "https://xorg.freedesktop.org/archive/individual/proto/xproto-7.0.31.tar.bz2"

        cd "$BUILD_DIR"
        ./configure \
          --prefix="$ORCHESTRA_ROOT" \
          --enable-shared \
          --disable-static \
          --disable-selective-werror \
          --without-xmlto --without-fop --without-xsltproc --disable-specs
      "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":
      - |-
        host-c-toolchain
      "configure": "mkdir -p \"$BUILD_DIR\"\nextract.sh --into \"$BUILD_DIR\" \"https://xorg.freedesktop.org/releases/individual/lib/xtrans-1.4.0.tar.bz2\"\n\ncd \"$BUILD_DIR\"\n./configure \\\n  --prefix=\"$ORCHESTRA_ROOT\" \\\n  --enable-shared \\\n  --disable-static \\\n  --disable-selective-werror\n  \n"
      "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":
      - |-
        host-c-toolchain
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" https://tukaani.org/xz/xz-5.4.0.tar.bz2

        cd "$BUILD_DIR"
        ./configure \
          --prefix="$ORCHESTRA_ROOT"
      "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":
      - |-
        gcc-host-toolchain
      - |-
        glibc
      "configure": |
        mkdir -p "$BUILD_DIR"
        extract.sh --into "$BUILD_DIR" https://zlib.net/fossils/zlib-1.2.12.tar.gz
        cd "$BUILD_DIR"
        ./configure \
          --shared \
          --uname=linux \
          --prefix="$ORCHESTRA_ROOT"
      "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": |-
    README
  "repository": !!null |-
    null
  "skip_post_install": !!bool |-
    false
