diff --git a/Documentation/BuildInstructions.md b/Documentation/BuildInstructions.md index c72f770c26b445..9a5bbf5f355526 100644 --- a/Documentation/BuildInstructions.md +++ b/Documentation/BuildInstructions.md @@ -7,7 +7,7 @@ Make sure you have all the dependencies installed: ### Debian / Ubuntu ```console -sudo apt install build-essential cmake curl libmpfr-dev libmpc-dev libgmp-dev e2fsprogs ninja-build qemu-system-i386 qemu-utils ccache rsync genext2fs unzip texinfo +sudo apt install build-essential cmake curl libmpfr-dev libmpc-dev libgmp-dev e2fsprogs ninja-build qemu-system-i386 qemu-utils ccache rsync genext2fs unzip xz-utils texinfo ``` #### GCC 10 @@ -43,7 +43,7 @@ for details. ### Arch Linux / Manjaro ```console -sudo pacman -S --needed base-devel cmake curl mpfr libmpc gmp e2fsprogs ninja qemu qemu-arch-extra ccache rsync unzip +sudo pacman -S --needed base-devel cmake curl mpfr libmpc gmp e2fsprogs ninja qemu qemu-arch-extra ccache rsync unzip xz ``` ### Other systems diff --git a/Documentation/BuildInstructionsOther.md b/Documentation/BuildInstructionsOther.md index 3bc1120cede44b..4b24455a6f85b4 100644 --- a/Documentation/BuildInstructionsOther.md +++ b/Documentation/BuildInstructionsOther.md @@ -3,25 +3,25 @@ ### Fedora ```console -sudo dnf install binutils-devel curl cmake mpfr-devel libmpc-devel gmp-devel e2fsprogs ninja-build patch ccache rsync @"C Development Tools and Libraries" @Virtualization +sudo dnf install binutils-devel curl cmake mpfr-devel libmpc-devel gmp-devel e2fsprogs ninja-build patch ccache rsync xz @"C Development Tools and Libraries" @Virtualization ``` ## openSUSE ```console -sudo zypper install curl cmake mpfr-devel mpc-devel ninja gmp-devel e2fsprogs patch qemu-x86 qemu-audio-pa gcc gcc-c++ ccache rsync patterns-devel-C-C++-devel_C_C++ +sudo zypper install curl cmake mpfr-devel mpc-devel ninja gmp-devel e2fsprogs patch qemu-x86 qemu-audio-pa gcc gcc-c++ ccache rsync xz patterns-devel-C-C++-devel_C_C++ ``` ## Void Linux ```console -sudo xbps-install -S base-devel cmake curl mpfr-devel libmpc-devel gmp-devel e2fsprogs ninja qemu ccache rsync +sudo xbps-install -S base-devel cmake curl mpfr-devel libmpc-devel gmp-devel e2fsprogs ninja qemu ccache rsync xz ``` ## ALT Linux ```console -apt-get install curl cmake libmpc-devel gmp-devel e2fsprogs libmpfr-devel ninja-build patch gcc ccache rsync +apt-get install curl cmake libmpc-devel gmp-devel e2fsprogs libmpfr-devel ninja-build patch gcc ccache rsync xz ``` ## NixOS @@ -48,6 +48,7 @@ stdenv.mkDerivation { ccache rsync unzip + xz # Example Build-time Additional Dependencies pkgconfig @@ -73,7 +74,7 @@ First, make sure you have enabled the `community` repository in `/etc/apk/reposi ```console # the basics, if you have not already done so -apk add bash curl git util-linux sudo +apk add bash curl git util-linux sudo xz # rough equivalent of build-essential apk add build-base @@ -88,7 +89,7 @@ apk add cmake e2fsprogs grub-bios samurai mpc1-dev mpfr-dev gmp-dev ccache rsync ## OpenBSD prerequisites ```console -doas pkg_add bash cmake g++ gcc git gmake gmp ninja ccache rsync coreutils qemu sudo +doas pkg_add bash cmake g++ gcc git gmake gmp ninja ccache rsync coreutils qemu sudo xz ``` ## FreeBSD prerequisites diff --git a/Toolchain/BuildClang.sh b/Toolchain/BuildClang.sh index d4ce0a6f689d78..15b1f69055f787 100755 --- a/Toolchain/BuildClang.sh +++ b/Toolchain/BuildClang.sh @@ -15,7 +15,7 @@ PREFIX="$DIR/Local/clang/$ARCH" BUILD="$DIR/../Build/clang/$ARCH" SYSROOT="$BUILD/Root" -MD5SUM="md5sum" +SHA256SUM="sha256sum" REALPATH="realpath" MAKE="make" NPROC="nproc" @@ -23,7 +23,7 @@ NPROC="nproc" SYSTEM_NAME="$(uname -s)" if [ "$SYSTEM_NAME" = "OpenBSD" ]; then - MD5SUM="md5 -q" + SHA256SUM="sha256 -q" REALPATH="readlink -f" MAKE="gmake" NPROC="sysctl -n hw.ncpuonline" @@ -31,7 +31,7 @@ if [ "$SYSTEM_NAME" = "OpenBSD" ]; then export CXX=eg++ export LDFLAGS=-Wl,-z,notext elif [ "$SYSTEM_NAME" = "FreeBSD" ]; then - MD5SUM="md5 -q" + SHA256SUM="sha256 -q" MAKE="gmake" NPROC="sysctl -n hw.ncpu" fi @@ -70,17 +70,17 @@ echo SYSROOT is "$SYSROOT" mkdir -p "$DIR/Tarballs" LLVM_VERSION="12.0.1" -LLVM_MD5SUM="c28061313a4f1b7d74cd491a19f569b4" +LLVM_SHA256SUM="129cb25cd13677aad951ce5c2deb0fe4afc1e9d98950f53b51bdcfb5a73afa0e" LLVM_NAME="llvm-project-$LLVM_VERSION.src" LLVM_PKG="$LLVM_NAME.tar.xz" LLVM_URL="https://github.com/llvm/llvm-project/releases/download/llvmorg-$LLVM_VERSION/$LLVM_PKG" # We need GNU binutils because we use a feature that llvm-objdump doesn't support yet. BINUTILS_VERSION="2.37" -BINUTILS_MD5SUM="1e55743d73c100b7a0d67ffb32398cdb" +BINUTILS_SHA256SUM="820d9724f020a3e69cb337893a0b63c2db161dadcb0e06fc11dc29eb1e84a32c" BINUTILS_NAME="binutils-$BINUTILS_VERSION" -BINUTILS_PKG="${BINUTILS_NAME}.tar.gz" -BINUTILS_BASE_URL="https://ftp.gnu.org/gnu/binutils" +BINUTILS_PKG="${BINUTILS_NAME}.tar.xz" +BINUTILS_BASE_URL="https://ftp.gnu.org/gnu/binutils" # option if that is slow: https://fossies.org/linux/misc/ buildstep() { NAME=$1 @@ -175,13 +175,13 @@ popd # === DOWNLOAD AND PATCH === pushd "$DIR/Tarballs" - md5="" + sha256="" if [ -e "$LLVM_PKG" ]; then - md5="$($MD5SUM ${LLVM_PKG} | cut -f1 -d' ')" - echo "llvm md5='$md5'" + sha256="$($SHA256SUM ${LLVM_PKG} | cut -f1 -d' ')" + echo "llvm sha256='$sha256'" fi - if [ "$md5" != "$LLVM_MD5SUM" ] ; then + if [ "$sha256" != "$LLVM_SHA256SUM" ] ; then rm -f "$LLVM_PKG" curl -LO "$LLVM_URL" else @@ -206,16 +206,16 @@ pushd "$DIR/Tarballs" else patch -p1 < "$DIR/Patches/llvm.patch" > /dev/null fi - $MD5SUM "$DIR/Patches/llvm.patch" > .patch.applied + $SHA256SUM "$DIR/Patches/llvm.patch" > .patch.applied popd - md5="" + sha256="" if [ -e "$BINUTILS_PKG" ]; then - md5="$($MD5SUM $BINUTILS_PKG | cut -f1 -d' ')" - echo "bu md5='$md5'" + sha256="$($SHA256SUM $BINUTILS_PKG | cut -f1 -d' ')" + echo "bu sha256='$sha256'" fi - if [ "$md5" != "$BINUTILS_MD5SUM" ]; then + if [ "$sha256" != "$BINUTILS_SHA256SUM" ]; then rm -f "$BINUTILS_PKG" curl -LO "$BINUTILS_BASE_URL/$BINUTILS_PKG" else @@ -229,7 +229,7 @@ pushd "$DIR/Tarballs" echo "Extracting GNU binutils" - tar -xzf "$BINUTILS_PKG" + tar -xJf "$BINUTILS_PKG" pushd "$BINUTILS_NAME" if [ "$dev" = "1" ]; then git init > /dev/null @@ -239,7 +239,7 @@ pushd "$DIR/Tarballs" else patch -p1 < "$DIR/Patches/binutils.patch" > /dev/null fi - $MD5SUM "$DIR/Patches/binutils.patch" > .patch.applied + $SHA256SUM "$DIR/Patches/binutils.patch" > .patch.applied popd popd diff --git a/Toolchain/BuildIt.sh b/Toolchain/BuildIt.sh index a7f34625052b4c..52453a6fb3e372 100755 --- a/Toolchain/BuildIt.sh +++ b/Toolchain/BuildIt.sh @@ -2,12 +2,18 @@ set -eo pipefail # This file will need to be run in bash, for now. +# Helper function to prefix our script output +buildstep() { + NAME=$1 + shift + "$@" 2>&1 | sed $'s|^|\x1b[34m['"${NAME}"$']\x1b[39m |' +} # === CONFIGURATION AND SETUP === DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -echo "$DIR" +buildstep BuildIt_start printf "\n\n\t\tRunning %s from %s/ ...\n\n\n" "${BASH_SOURCE[0]}" "$DIR" ARCH=${ARCH:-"i686"} TARGET="$ARCH-pc-serenity" @@ -16,7 +22,7 @@ BUILD="$DIR/../Build/$ARCH" SYSROOT="$BUILD/Root" MAKE="make" -MD5SUM="md5sum" +SHA256SUM="sha256sum" NPROC="nproc" REALPATH="realpath" @@ -36,7 +42,7 @@ export CXXFLAGS="-g0 -O2 -mtune=native" if [ "$SYSTEM_NAME" = "OpenBSD" ]; then MAKE=gmake - MD5SUM="md5 -q" + SHA256SUM="sha256 -q" NPROC="sysctl -n hw.ncpuonline" REALPATH="readlink -f" export CC=egcc @@ -45,7 +51,7 @@ if [ "$SYSTEM_NAME" = "OpenBSD" ]; then export LDFLAGS=-Wl,-z,notext elif [ "$SYSTEM_NAME" = "FreeBSD" ]; then MAKE=gmake - MD5SUM="md5 -q" + SHA256SUM="sha256 -q" NPROC="sysctl -n hw.ncpu" export with_gmp=/usr/local export with_mpfr=/usr/local @@ -66,69 +72,64 @@ while [ "$1" != "" ]; do shift done -echo PREFIX is "$PREFIX" -echo SYSROOT is "$SYSROOT" +buildstep BuildIt_start printf "PREFIX is '%s'\n" "$PREFIX" +buildstep BuildIt_start printf "SYSROOT is '%s'\n" "$SYSROOT" mkdir -p "$DIR/Tarballs" # Note: The version number and hash in BuildClang.sh needs to be kept in sync with this. BINUTILS_VERSION="2.37" -BINUTILS_MD5SUM="1e55743d73c100b7a0d67ffb32398cdb" +BINUTILS_SHA256SUM="820d9724f020a3e69cb337893a0b63c2db161dadcb0e06fc11dc29eb1e84a32c" BINUTILS_NAME="binutils-$BINUTILS_VERSION" -BINUTILS_PKG="${BINUTILS_NAME}.tar.gz" -BINUTILS_BASE_URL="https://ftp.gnu.org/gnu/binutils" +BINUTILS_PKG="${BINUTILS_NAME}.tar.xz" +BINUTILS_BASE_URL="https://ftp.gnu.org/gnu/binutils" # option if that is slow: https://fossies.org/linux/misc/ GDB_VERSION="10.2" -GDB_MD5SUM="7aeb896762924ae9a2ec59525088bada" +GDB_SHA256SUM="aaa1223d534c9b700a8bec952d9748ee1977513f178727e1bee520ee000b4f29" GDB_NAME="gdb-$GDB_VERSION" -GDB_PKG="${GDB_NAME}.tar.gz" -GDB_BASE_URL="https://ftp.gnu.org/gnu/gdb" +GDB_PKG="${GDB_NAME}.tar.xz" +GDB_BASE_URL="https://ftp.gnu.org/gnu/gdb" # option if that is slow: https://fossies.org/linux/misc/legacy/ # Note: If you bump the gcc version, you also have to update the matching # GCC_VERSION variable in the project's root CMakeLists.txt GCC_VERSION="11.2.0" -GCC_MD5SUM="dc6886bd44bb49e2d3d662aed9729278" +GCC_SHA256SUM="d08edc536b54c372a1010ff6619dd274c0f1603aa49212ba20f7aa2cda36fa8b" GCC_NAME="gcc-$GCC_VERSION" -GCC_PKG="${GCC_NAME}.tar.gz" -GCC_BASE_URL="https://ftp.gnu.org/gnu/gcc" +GCC_PKG="${GCC_NAME}.tar.xz" +GCC_BASE_URL="https://ftp.gnu.org/gnu/gcc" # option if that is slow: https://fossies.org/linux/misc/ -buildstep() { - NAME=$1 - shift - "$@" 2>&1 | sed $'s|^|\x1b[34m['"${NAME}"$']\x1b[39m |' -} # === DEPENDENCIES === -buildstep dependencies echo "Checking whether 'make' is available..." +buildstep dependencies printf "Checking whether 'make' is available...\n" if ! command -v ${MAKE:-make} >/dev/null; then - buildstep dependencies echo "Please make sure to install GNU Make (for the '${MAKE:-make}' tool)." + buildstep dependencies printf "Please make sure to install GNU Make (for the '%s' tool).\n" "${MAKE:-make}" exit 1 fi -buildstep dependencies echo "Checking whether 'patch' is available..." +buildstep dependencies printf "Checking whether 'patch' is available...\n" if ! command -v patch >/dev/null; then - buildstep dependencies echo "Please make sure to install GNU patch (for the 'patch' tool)." + buildstep dependencies printf "Please make sure to install GNU patch (for the 'patch' tool).\n" exit 1 fi -buildstep dependencies echo "Checking whether your C compiler works..." +buildstep dependencies printf "Checking whether your C compiler works...\n" if ! ${CC:-cc} -o /dev/null -xc - >/dev/null <<'PROGRAM' int main() {} PROGRAM then - buildstep dependencies echo "Please make sure to install a working C compiler." + buildstep dependencies printf "Please make sure to install a working C compiler.\n" exit 1 fi if [ "$SYSTEM_NAME" != "Darwin" ]; then for lib in gmp mpc mpfr; do - buildstep dependencies echo "Checking whether the $lib library and headers are available..." + buildstep dependencies printf "Checking whether the %s library and headers are available...\n" "$lib" if ! ${CC:-cc} -I /usr/local/include -L /usr/local/lib -l$lib -o /dev/null -xc - >/dev/null < int main() {} PROGRAM then - echo "Please make sure to install the $lib library and headers." + buildstep dependencies printf "Please make sure to install the %s library and headers.\n" "$lib" exit 1 fi done @@ -144,79 +145,80 @@ pushd "$DIR" # The following logic is correct *only* because of that. mkdir -p Cache - echo "Cache (before):" + buildstep cachecheck printf "Cache (before):\n" ls -l Cache CACHED_TOOLCHAIN_ARCHIVE="Cache/ToolchainBinariesGithubActions.tar.gz" if [ -r "${CACHED_TOOLCHAIN_ARCHIVE}" ] ; then - echo "Cache at ${CACHED_TOOLCHAIN_ARCHIVE} exists!" - echo "Extracting toolchain from cache:" + buildstep cacheuse printf "Cache at %s exists!\n" "${CACHED_TOOLCHAIN_ARCHIVE}" + buildstep cacheuse printf "Extracting toolchain from cache:\n" if tar xzf "${CACHED_TOOLCHAIN_ARCHIVE}" ; then - echo "Done 'building' the toolchain." - echo "Cache unchanged." + buildstep cacheuse printf "Done 'building' the toolchain.\n" + buildstep cacheuse printf "Cache unchanged.\n" exit 0 else - echo - echo - echo - echo "Could not extract cached toolchain archive." - echo "This means the cache is broken and *should be removed*!" - echo "As Github Actions cannot update a cache, this will unnecessarily" - echo "slow down all future builds for this hash, until someone" - echo "resets the cache." - echo - echo - echo + printf "\n\n\n\n" + printf "Could not extract cached toolchain archive.\n" + printf "This means the cache is broken and *should be removed*!\n" + printf "As Github Actions cannot update a cache, this will unnecessarily\n" + printf "slow down all future builds for this hash, until someone\n" + printf "resets the cache.\n" + printf "\n\n\n" rm -f "${CACHED_TOOLCHAIN_ARCHIVE}" fi else - echo "Cache at ${CACHED_TOOLCHAIN_ARCHIVE} does not exist." - echo "Will rebuild toolchain from scratch, and save the result." + buildstep cachemissing printf "Cache at %s does not exist.\n" "${CACHED_TOOLCHAIN_ARCHIVE}" + buildstep cachemissing printf "Will rebuild toolchain from scratch, and save the result.\n" fi - echo "::group::Actually building Toolchain" + buildstep cachemissing printf "::group::Actually building Toolchain\n" fi popd # === DOWNLOAD AND PATCH === +buildstep toolchain_dl printf "\tChecking if we must download toolchain tarballs (gdb, binutils, gcc) ...\n" +buildstep toolchain_dl printf "\tSometimes the GNU servers we pull these from are particularly slow.\n" +buildstep toolchain_dl printf "\tIf this is taking a very long time, you may want to manually download\n" +buildstep toolchain_dl printf "\tthe right tarballs here from another source.\n" +buildstep toolchain_dl printf "\t(this script is: %s/%s )\n" "$DIR" "${BASH_SOURCE[0]}" pushd "$DIR/Tarballs" # Build aarch64-gdb for cross-debugging support on x86 systems if [ "$ARCH" = "aarch64" ]; then - md5="" + SHA256="" if [ -e "$GDB_PKG" ]; then - md5="$($MD5SUM $GDB_PKG | cut -f1 -d' ')" - echo "bu md5='$md5'" + SHA256="$($SHA256SUM $GDB_PKG | cut -f1 -d' ')" + buildstep toolchain_dl printf "bu SHA256='%s'\n" "$SHA256" fi - if [ "$md5" != ${GDB_MD5SUM} ] ; then + if [ "$SHA256" != ${GDB_SHA256SUM} ] ; then rm -f $GDB_PKG curl -LO "$GDB_BASE_URL/$GDB_PKG" else - echo "Skipped downloading gdb" + buildstep toolchain_dl printf "Skipped downloading gdb, it is already present and intact.\n" fi fi - md5="" + SHA256="" if [ -e "$BINUTILS_PKG" ]; then - md5="$($MD5SUM $BINUTILS_PKG | cut -f1 -d' ')" - echo "bu md5='$md5'" + SHA256="$($SHA256SUM $BINUTILS_PKG | cut -f1 -d' ')" + buildstep toolchain_dl printf "bu SHA256='%s'\n" "$SHA256" fi - if [ "$md5" != ${BINUTILS_MD5SUM} ] ; then + if [ "$SHA256" != ${BINUTILS_SHA256SUM} ] ; then rm -f $BINUTILS_PKG curl -LO "$BINUTILS_BASE_URL/$BINUTILS_PKG" else - echo "Skipped downloading binutils" + buildstep toolchain_dl printf "Skipped downloading binutils, it is already present and intact.\n" fi - md5="" + SHA256="" if [ -e "$GCC_PKG" ]; then - md5="$($MD5SUM ${GCC_PKG} | cut -f1 -d' ')" - echo "gc md5='$md5'" + SHA256="$($SHA256SUM ${GCC_PKG} | cut -f1 -d' ')" + buildstep toolchain_dl printf "gc SHA256='%s'\n" "$SHA256" fi - if [ "$md5" != ${GCC_MD5SUM} ] ; then + if [ "$SHA256" != ${GCC_SHA256SUM} ] ; then rm -f $GCC_PKG curl -LO "$GCC_BASE_URL/$GCC_NAME/$GCC_PKG" else - echo "Skipped downloading gcc" + buildstep toolchain_dl printf "Skipped downloading gcc, it is already present and intact.\n" fi if [ "$ARCH" = "aarch64" ]; then @@ -224,8 +226,8 @@ pushd "$DIR/Tarballs" rm -rf "${GDB_NAME}" rm -rf "$DIR/Build/$ARCH/$GDB_NAME" fi - echo "Extracting GDB..." - tar -xzf ${GDB_PKG} + buildstep toolchain_dl printf "\n\tExtracting GDB...\n\n" + tar -xJf ${GDB_PKG} pushd ${GDB_NAME} if [ "$git_patch" = "1" ]; then @@ -236,7 +238,7 @@ pushd "$DIR/Tarballs" else patch -p1 < "$DIR"/Patches/gdb.patch > /dev/null fi - $MD5SUM "$DIR"/Patches/gdb.patch > .patch.applied + $SHA256SUM "$DIR"/Patches/gdb.patch > .patch.applied popd fi @@ -244,8 +246,8 @@ pushd "$DIR/Tarballs" rm -rf "${BINUTILS_NAME}" rm -rf "$DIR/Build/$ARCH/$BINUTILS_NAME" fi - echo "Extracting binutils..." - tar -xzf ${BINUTILS_PKG} + buildstep toolchain_dl printf "\n\tExtracting binutils...\n\n" + tar -xJf ${BINUTILS_PKG} pushd ${BINUTILS_NAME} if [ "$git_patch" = "1" ]; then @@ -256,7 +258,7 @@ pushd "$DIR/Tarballs" else patch -p1 < "$DIR"/Patches/binutils.patch > /dev/null fi - $MD5SUM "$DIR"/Patches/binutils.patch > .patch.applied + $SHA256SUM "$DIR"/Patches/binutils.patch > .patch.applied popd if [ -d ${GCC_NAME} ]; then @@ -265,8 +267,8 @@ pushd "$DIR/Tarballs" # Also drop the build dir rm -rf "$DIR/Build/$ARCH/$GCC_NAME" fi - echo "Extracting gcc..." - tar -xzf $GCC_PKG + buildstep toolchain_dl printf "\n\tExtracting gcc...\n\n" + tar -xJf $GCC_PKG pushd $GCC_NAME if [ "$git_patch" = "1" ]; then git init > /dev/null @@ -276,7 +278,7 @@ pushd "$DIR/Tarballs" else patch -p1 < "$DIR/Patches/gcc.patch" > /dev/null fi - $MD5SUM "$DIR/Patches/gcc.patch" > .patch.applied + $SHA256SUM "$DIR/Patches/gcc.patch" > .patch.applied popd if [ "$SYSTEM_NAME" = "Darwin" ]; then @@ -306,15 +308,16 @@ pushd "$DIR/Build/$ARCH" mkdir -p gdb pushd gdb - echo "XXX configure gdb" + buildstep "gdb/configure" printf "\n\n\tXXX configure gdb\n\n" buildstep "gdb/configure" "$DIR"/Tarballs/$GDB_NAME/configure --prefix="$PREFIX" \ --target="$TARGET" \ --with-sysroot="$SYSROOT" \ --enable-shared \ --disable-nls \ ${TRY_USE_LOCAL_TOOLCHAIN:+"--quiet"} || exit 1 - echo "XXX build gdb" + buildstep "gdb/build" printf "\n\n\tXXX build gdb\n\n" buildstep "gdb/build" "$MAKE" -j "$MAKEJOBS" || exit 1 + buildstep "gdb/install" printf "\n\n\tXXX install gdb\n\n" buildstep "gdb/install" "$MAKE" install || exit 1 popd fi @@ -323,7 +326,7 @@ pushd "$DIR/Build/$ARCH" mkdir -p binutils pushd binutils - echo "XXX configure binutils" + buildstep "binutils/configure" printf "\n\n\tXXX configure binutils\n\n" buildstep "binutils/configure" "$DIR"/Tarballs/$BINUTILS_NAME/configure --prefix="$PREFIX" \ --target="$TARGET" \ --with-sysroot="$SYSROOT" \ @@ -339,12 +342,12 @@ pushd "$DIR/Build/$ARCH" buildstep "binutils/build" "$MAKE" all-yes popd fi - echo "XXX build binutils" + buildstep "binutils/build" printf "\n\n\tXXX build binutils\n\n" buildstep "binutils/build" "$MAKE" -j "$MAKEJOBS" || exit 1 buildstep "binutils/install" "$MAKE" install || exit 1 popd - echo "XXX serenity libc, libm and libpthread headers" + buildstep install_headers printf "\n\n\t\tXXX serenity libc, libm and libpthread headers\n" mkdir -p "$BUILD" pushd "$BUILD" mkdir -p Root/usr/include/ @@ -369,7 +372,7 @@ pushd "$DIR/Build/$ARCH" mkdir -p gcc pushd gcc - echo "XXX configure gcc and libgcc" + buildstep config_gcc_libgcc printf "\n\n\t\tXXX configure gcc and libgcc\n\n" buildstep "gcc/configure" "$DIR/Tarballs/gcc-$GCC_VERSION/configure" --prefix="$PREFIX" \ --target="$TARGET" \ --with-sysroot="$SYSROOT" \ @@ -382,18 +385,18 @@ pushd "$DIR/Build/$ARCH" --enable-threads=posix \ ${TRY_USE_LOCAL_TOOLCHAIN:+"--quiet"} || exit 1 - echo "XXX build gcc and libgcc" + buildstep build_gcc_libgcc printf "\n\n\tXXX build gcc and libgcc\n\n" buildstep "gcc/build" "$MAKE" -j "$MAKEJOBS" all-gcc || exit 1 if [ "$SYSTEM_NAME" = "OpenBSD" ]; then ln -sf liblto_plugin.so.0.0 gcc/liblto_plugin.so fi buildstep "libgcc/build" "$MAKE" -j "$MAKEJOBS" all-target-libgcc || exit 1 - echo "XXX install gcc and libgcc" + buildstep "gcc+libgcc/install" printf "\n\n\tXXX install gcc and libgcc\n\n" buildstep "gcc+libgcc/install" "$MAKE" install-gcc install-target-libgcc || exit 1 - echo "XXX build libstdc++" + buildstep "libstdc++/build" printf "\n\n\tXXX build libstdc++\n\n" buildstep "libstdc++/build" "$MAKE" -j "$MAKEJOBS" all-target-libstdc++-v3 || exit 1 - echo "XXX install libstdc++" + buildstep "libstdc++/install" printf "\n\n\tXXX install libstdc++\n" buildstep "libstdc++/install" "$MAKE" install-target-libstdc++-v3 || exit 1 popd @@ -407,14 +410,15 @@ popd pushd "$DIR" if [ "${TRY_USE_LOCAL_TOOLCHAIN}" = "y" ] ; then - echo "::endgroup::" - echo "Building cache tar:" + buildstep save_cache printf "::endgroup::\n" + buildstep save_cache printf "Building cache tar:\n" rm -f "${CACHED_TOOLCHAIN_ARCHIVE}" # Just in case tar czf "${CACHED_TOOLCHAIN_ARCHIVE}" Local/ - echo "Cache (after):" + buildstep save_cache printf "Cache (after):\n" ls -l Cache fi popd +buildstep BuildIt_end printf "\n\n\t\t... Finished running %s from %s/ !\n\n\n" "${BASH_SOURCE[0]}" "$DIR"