Skip to content
Snippets Groups Projects
none_1144f90ab43807b1f10b34f665d238ac74af0536.hash-material.yml 56.6 KiB
Newer Older
rev.ng CI's avatar
rev.ng CI committed
          --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
rev.ng CI's avatar
rev.ng CI committed
- "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"
rev.ng CI's avatar
rev.ng CI committed
        export HARD_ALLOWED_INCLUDE_PATH="$HARD_ALLOWED_INCLUDE_PATH:/tmp"
        export HARD_ALLOWED_LIBRARY_PATH="$HARD_ALLOWED_LIBRARY_PATH:/tmp"
rev.ng CI's avatar
rev.ng CI committed
        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":
      - |-
        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":
    "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
rev.ng CI's avatar
rev.ng CI committed
- "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 \
rev.ng CI's avatar
rev.ng CI committed
          CFLAGS="-w -ggdb3 -O3 --sysroot $INSTALL_LINK_ONLY_PATH -idirafter $ORCHESTRA_ROOT/include" \
          CXXFLAGS="-w -ggdb3 -O3 --sysroot $INSTALL_LINK_ONLY_PATH -idirafter $ORCHESTRA_ROOT/include -std=gnu++11" \
rev.ng CI's avatar
rev.ng CI committed
          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/16/lib/x86_64-unknown-linux-gnu/ -Wl,-rpath,$RPATH_PLACEHOLDER/lib64/llvm/clang-release/lib/x86_64-unknown-linux-gnu/ -Wl,-rpath,$RPATH_PLACEHOLDER/lib64/llvm/llvm/lib/ -static-libgcc -static-libstdc++ $BUILD_DIR/fake-libc-single-threaded.o -L$INSTALL_LINK_ONLY_PATH/lib64 --sysroot=$INSTALL_LINK_ONLY_PATH"
rev.ng CI's avatar
rev.ng CI committed
      "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++ \
rev.ng CI's avatar
rev.ng CI committed
          CFLAGS="-w -ggdb3 -O3 --sysroot $INSTALL_LINK_ONLY_PATH -idirafter $ORCHESTRA_ROOT/include" \
          CXXFLAGS="-w -ggdb3 -O3 --sysroot $INSTALL_LINK_ONLY_PATH -idirafter $ORCHESTRA_ROOT/include -std=gnu++11" \
rev.ng CI's avatar
rev.ng CI committed
          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/16/lib/x86_64-unknown-linux-gnu/ -Wl,-rpath,$RPATH_PLACEHOLDER/lib64/llvm/clang-release/lib/x86_64-unknown-linux-gnu/ -Wl,-rpath,$RPATH_PLACEHOLDER/lib64/llvm/llvm/lib/ -static-libgcc -static-libstdc++ $BUILD_DIR/fake-libc-single-threaded.o -L$INSTALL_LINK_ONLY_PATH/lib64 --sysroot=$INSTALL_LINK_ONLY_PATH"
rev.ng CI's avatar
rev.ng CI committed
      "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": []
  "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
rev.ng CI's avatar
rev.ng CI committed
- "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
rev.ng CI's avatar
rev.ng CI committed
- "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