Forked from steakunderscore/arm-elf-gcc_on_osx.sh
Created
September 11, 2018 11:47
-
-
Save alokc83/4d18c792d1b70b9ac006a0f975cfc6d1 to your computer and use it in GitHub Desktop.
How I installed arm-elf-gcc on Mac OS X
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 | |
mkdir toolchain | |
cd toolchain | |
wget ftp://sources.redhat.com/pub/newlib/newlib-1.19.0.tar.gz | |
wget http://ftp.gnu.org/gnu/gdb/gdb-7.2.tar.gz | |
wget http://ftp.gnu.org/gnu/binutils/binutils-2.21.tar.bz2 | |
wget http://ftp.gnu.org/gnu/gcc/gcc-4.6.0/gcc-core-4.6.0.tar.bz2 | |
wget http://ftp.gnu.org/gnu/gcc/gcc-4.6.0/gcc-g++-4.6.0.tar.bz2 | |
extract binutils-2.21.tar.bz2 | |
extract gcc-core-4.6.0.tar.bz2 | |
extract newlib-1.19.0.tar.gz | |
extract gdb-7.2.tar.gz | |
extract gcc-g++-4.6.0.tar.bz2 | |
export target=arm-elf | |
export prefix=/usr/local/$target | |
export PATH=$prefix/bin:$PATH | |
mkdir -p $prefix/bin | |
cd binutils-2.21 | |
mkdir build-$target | |
cd build-$target | |
../configure --target=$target --prefix=$prefix --enable-interwork --enable-multilib \ | |
--disable-nls --disable-shared --disable-threads --with-gcc --with-gnu-as --with-gnu-ld | |
make | |
make install | |
cd ../../gcc-4.6.0 | |
mkdir build-$target | |
cd build-$target | |
../configure --target=$target --prefix=$prefix \ | |
--disable-nls --disable-shared --disable-threads \ | |
--with-gcc --with-gnu-ld --with-gnu-as --with-dwarf2 \ | |
--enable-languages=c,c++ --enable-interwork \ | |
--enable-multilib --with-newlib \ | |
--with-headers=../../newlib-1.19.0/newlib/libc/include \ | |
--disable-libssp --disable-libstdcxx-pch \ | |
--disable-libmudflap --disable-libgomp -v | |
mkdir -p libiberty libcpp fixincludes | |
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 | |
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-nls | |
make | |
make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment