Skip to content

Instantly share code, notes, and snippets.

@haohello
Forked from bsnote/build-mips.sh
Created March 16, 2013 18:59
Show Gist options
  • Save haohello/5177779 to your computer and use it in GitHub Desktop.
Save haohello/5177779 to your computer and use it in GitHub Desktop.
if [[ "$PATH" == *"/usr/local/mips-2012.09/bin"* ]]; then
echo codesourcery toolchain path is already in PATH var
else
export PATH="/usr/local/mips-2012.09/bin:$PATH"
echo added codesourcery toolchain path to PATH var
fi
export AR=mips-linux-gnu-ar
export CC='mips-linux-gnu-gcc -EL'
export CXX='mips-linux-gnu-g++ -EL'
export LINK='mips-linux-gnu-g++ -EL'
export RANLIB=mips-linux-gnu-ranlib
export CFLAGS='-march=mips32'
export CCFLAGS='-march=mips32'
export CXXFLAGS='-march=mips32'
make clean distclean
./configure --without-snapshot --dest-cpu=mips --dest-os=linux
make
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment