# Step 1. Download GCC and binutils source code ADACASIO_BINUTILS_URL="https://ftp.gnu.org/gnu/binutils/binutils-2.46.0.tar.gz" ADACASIO_GCC_URL="https://ftp.gnu.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.gz" ADACASIO_PREFIX="$(pwd)/sysroot" # prepare configure and build enviornment wget -O binutils.tar.gz $ADACASIO_BINUTILS_URL wget -O gcc.tar.gz $ADACASIO_GCC_URL tar -xf binutils.tar.gz tar -xf gcc.tar.gz # Step 2. configure GCC and binutils mkdir build-binutils build-gcc $ADACASIO_PREFIX cd build-binutils ../binutils-*/configure \ --prefix="$PREFIX" \ --target="sh3eb-elf" \ --with-multilib-list="m3,m4-nofpu" \ --program-prefix="sh3eb-elf-" \ --host="native" \ --disable-nls \ --disable-multilib \ --disable-shared \ --with-sysroot make -j$(nproc) cd ../build-gcc ../gcc/configure \ --enable-languages="ada,c" \ --without-headers \ --program-prefix="sh-elf-" \ --enable-clocale="generic" \ --enable-libstdcxx-allocator \ --disable-threads \ --disable-libstdcxx-verbose \ --enable-cxx-flags="-fno-exceptions