-
-
Save steakunderscore/1103318 to your computer and use it in GitHub Desktop.
Now for mac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export target=arm-eabi | |
export prefix=~/$target | |
export PATH=$prefix/bin:$PATH | |
mkdir toolchain && \ | |
cd toolchain && \ | |
wget -c ftp://sources.redhat.com/pub/newlib/newlib-1.19.0.tar.gz && \ | |
wget -c http://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.gz && \ | |
wget -c http://ftp.gnu.org/gnu/binutils/binutils-2.21.tar.bz2 && \ | |
wget -c http://ftp.gnu.org/gnu/gcc/gcc-4.6.0/gcc-core-4.6.0.tar.bz2 && \ | |
wget -c http://ftp.gnu.org/gnu/gcc/gcc-4.6.0/gcc-g++-4.6.0.tar.bz2 && \ | |
tar -xvf binutils-2.21.tar.bz2 && \ | |
tar -xvf gcc-core-4.6.0.tar.bz2 && \ | |
tar -xvf newlib-1.19.0.tar.gz && \ | |
tar -xvf gdb-7.2.tar.gz && \ | |
tar -xvf gcc-g++-4.6.0.tar.bz2 && \ | |
mkdir -p $prefix/bin && \ | |
cd binutils-2.21 && \ | |
mkdir build-$target && \ | |
cd build-$target && \ | |
../configure --target=$target --prefix=$prefix\ | |
--enable-interwork --enable-multilib\ | |
--disable-werror && \ | |
make && \ | |
make install && \ | |
cd ../../gcc-4.6.0 && \ | |
mkdir build-$target && \ | |
cd build-$target && \ | |
../configure --target=$target --prefix=$prefix \ | |
--enable-languages=c,c++ --enable-interwork \ | |
--enable-multilib --with-dwarf2 --with-newlib \ | |
--with-headers=../../newlib-1.19.0/newlib/libc/include \ | |
--disable-werror && \ | |
make all-gcc && \ | |
make install-gcc && \ | |
cd ../../newlib-1.19.0 && \ | |
mkdir build-$target && \ | |
cd build-$target && \ | |
../configure --target=$target --prefix=$prefix --enable-interwork\ | |
--enable-multilib --disable-werror && \ | |
make && \ | |
make install && \ | |
cd ../../gcc-4.6.0/build-$target && \ | |
make && \ | |
make install && \ | |
cd ../../gdb-7.2 && \ | |
mkdir build-$target && \ | |
cd build-$target && \ | |
../configure --target=$target --prefix=$prefix --disable-werror && \ | |
make && \ | |
make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment