diff options
| author | Peter Fors <peter.fors@mindkiller.com> | 2025-10-31 06:53:08 +0100 |
|---|---|---|
| committer | Peter Fors <peter.fors@mindkiller.com> | 2025-10-31 06:53:08 +0100 |
| commit | d01e14a6799f7e2f9caaf687a1749cefb82298d5 (patch) | |
| tree | 77497bfc9551639a17821db7c8d28b0ad63666f4 /bootstrap.sh | |
| parent | 4814d60951d5b2c357086d8f8e369bd34793211a (diff) | |
some tas tests, desync is happening
Diffstat (limited to 'bootstrap.sh')
| -rwxr-xr-x | bootstrap.sh | 102 |
1 files changed, 0 insertions, 102 deletions
diff --git a/bootstrap.sh b/bootstrap.sh deleted file mode 100755 index 22c96ff..0000000 --- a/bootstrap.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/bash -# bootstrap.sh - Build project-local GCC toolchain - -set -e - -GCC_VERSION=15.2.0 # Use latest stable release -TOOLCHAIN_DIR="$(pwd)/toolchain" -GCC_PREFIX="${TOOLCHAIN_DIR}/gcc-${GCC_VERSION}" - -# Check if already built -if [ -f "${GCC_PREFIX}/bin/gcc" ]; then - echo "GCC ${GCC_VERSION} already built in ${GCC_PREFIX}" - echo "To rebuild, remove ${TOOLCHAIN_DIR} and re-run" - exit 0 -fi - -# Check system dependencies -check_deps() { - local missing="" - for cmd in make tar wget as ld; do - if ! command -v $cmd &> /dev/null; then - missing="$missing $cmd" - fi - done - - # Check for required libraries - for lib in isl mpc; do - if ! ldconfig -p | grep -q "lib${lib}\.so"; then - missing="$missing lib${lib}" - fi - done - - if [ -n "$missing" ]; then - echo "ERROR: Missing system dependencies:$missing" - echo "On Arch: sudo pacman -S base-devel binutils wget libisl libmpc" - exit 1 - fi -} - -check_deps - -echo "Building GCC ${GCC_VERSION} in ${GCC_PREFIX}" -echo "This will take ~3-4 minutes on an AMD 7950X..." - -mkdir -p "${TOOLCHAIN_DIR}" -cd "${TOOLCHAIN_DIR}" - - -# Download GCC sources -if [ ! -f "gcc-${GCC_VERSION}.tar.xz" ]; then - echo "Downloading GCC ${GCC_VERSION}..." - # Use mirror redirect (usually faster) - wget "https://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" \ - || wget "https://ftp.gnu.org/gnu/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.xz" -fi - -# Extract -if [ ! -d "gcc-${GCC_VERSION}" ]; then - echo "Extracting GCC sources..." - tar xf "gcc-${GCC_VERSION}.tar.xz" -fi - -cd "gcc-${GCC_VERSION}" - -# Download prerequisites (GMP, MPFR, MPC, ISL) -echo "Downloading GCC prerequisites..." -./contrib/download_prerequisites - -# Build -mkdir -p build -cd build - -echo "Configuring GCC..." -../configure \ - --prefix="${GCC_PREFIX}" \ - --enable-languages=c \ - --with-system-zlib \ - --with-linker-hash-style=gnu \ - --disable-multilib \ - --disable-bootstrap \ - --disable-libsanitizer \ - --disable-libssp \ - --disable-werror \ - --disable-cet \ - --disable-default-pie \ - --disable-default-ssp \ - --enable-lto - -echo "Building GCC (using $(nproc) cores)..." -make -j$(nproc) - -echo "Installing GCC to ${GCC_PREFIX}..." -make install - -echo "" -echo "======================================" -echo "GCC ${GCC_VERSION} built successfully!" -echo "======================================" -echo "Toolchain installed in: ${GCC_PREFIX}" -echo "" -echo "To use it, just run: ./build.sh or ./Bench.sh" - |
