Skip to content

Instantly share code, notes, and snippets.

@sshine
Created April 1, 2013 00:44
Show Gist options
  • Save sshine/5282637 to your computer and use it in GitHub Desktop.
Save sshine/5282637 to your computer and use it in GitHub Desktop.
Notes on building GCC as a cross-compiler for MIPS
#!/bin/sh
set -e # Stop on first error
PREFIX=/opt/osm
tar xfz binutils-2.23.tar.gz
mkdir build-binutils; cd build-binutils
../binutils-2.23/configure --target=mips-elf --prefix=$PREFIX
make
sudo make install
cd ..
tar xfz yams-1.4.1.tar.gz
cd yams-1.4.1
./configure --prefix=$PREFIX
make
sudo make install
cd ..
tar xfz gcc-4.8.0.tar.gz
mkdir build-gcc; cd build-gcc
../gcc-4.8.0/configure --with-gnu-ld --with-gnu-as --without-nls --enable-languages=c --disable-multilib --target=mips-elf --disable-libssp --prefix=/opt/osm
make
sudo make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment