Author Topic: Building GCC cross-toolchain for Toshiba MeP  (Read 201 times)

Offline cuevavirus

  • Hot Pockets
  • Refugee
  • *****
  • Posts: 91
    • View Profile
Building GCC cross-toolchain for Toshiba MeP
« on: July 28, 2020, 11:59:34 PM »
The steps were performed on a Ubuntu 18 machine with gcc 7.5.0. If your host environment differs you may have to adjust a few steps. This comes with no libraries, not even libgcc.

Prerequisites

Get these from your distro repo

gcc, binutils, make, gmp, mpfr, mpc

Sources

https://ftp.gnu.org/gnu/binutils/binutils-2.23.tar.gz
https://ftp.gnu.org/gnu/gcc/gcc-4.7.0/gcc-4.7.0.tar.bz2

Installation

Create the directory where you want to install it. Create build directories outside of the source directories. PREFIX is the installation directory.

binutils

Code: [Select]
"$BINUTILS_SRC_DIR/configure" --prefix="$PREFIX" --target=mep-elf --disable-shared --disable-nls --disable-werror
make -j$(nproc)
make install

gcc

Code: [Select]
"$GCC_SRC_DIR/configure" --prefix="$PREFIX" --enable-languages=c --target=mep-elf --disable-libgcc --disable-libquadmath --disable-libssp --disable-multilib --disable-nls --disable-shared MAKEINFO="$GCC_SRC_DIR/missing"
make -j$(nproc)
make install