Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
63 lines (49 sloc) 2.26 KB
mkdir radiofreedom
cd radiofreedom
export CFLAGS="-O2"
export CXXFLAGS="$CFLAGS"
unset LDFLAGS
GNUBase=/opt/radiofreedom/arm
GNUTarget=arm-gnu-eabi
mkdir binutils
#patch -p1 -d ../binutils/2.25 -i ../../patches/binutils-2.25.patch
#patch -p1 -d ../binutils/2.25.1 -i ../../patches/binutils-2.25.1.patch
cd binutils
CFLAGS=$cflags LDFLAGS=$ldflags ../../binutils/2.25.1/configure --prefix=$GNUBase --target=$GNUTarget --disable-nls --disable-dependency-tracking --disable-werror --enable-lto --enable-plugins --enable-poison-system-directories
make
make install
cd ..
export PATH=$PATH:$GNUBase/bin
#export PATH=$PATH:/opt/radiofreedom/arm/bin
mkdir gcc
#patch -p1 -d ../gcc/4.9.2 -i ../../patches/gcc-4.9.2.patch
#patch -p1 -d ../gcc/5.3.0 -i ../../patches/gcc-5.3.0.patch
cd gcc
CFLAGS="$cflags" CXXFLAGS="$cflags" LDFLAGS="$ldflags" CFLAGS_FOR_TARGET="-O2" CXXFLAGS_FOR_TARGET="-O2" LDFLAGS_FOR_TARGET="" ../../gcc/5.3.0/configure --enable-languages=c,c++,objc,obj-c++ --with-gnu-as --with-gnu-ld --with-gcc --with-march=armv4t --enable-cxx-flags=-ffunction-sections --disable-libstdcxx-verbose --enable-poison-system-directories --enable-interwork --enable-multilib --disable-dependency-tracking --enable-threads --disable-win32-registry --disable-nls --disable-debug --disable-libmudflap --disable-libssp --disable-libgomp --disable-libstdcxx-pch --target=$GNUTarget --with-newlib --with-headers=../../newlib/2.2.0/newlib/libc/include --prefix=$GNUBase --enable-lto --with-pkgversion="devkitARM release 45"
make all-gcc
make install-gcc
cd ..
mkdir newlib
#patch -R -d ../newlib/2.2.0 -i ../../patches/newlib-2.2.0.patch
#patch -p1 -d ../newlib/2.2.0 -i ../../patches/newlib-2.2.0.patch
cd newlib
sh ../../newlib/2.2.0/configure --disable-newlib-supplied-syscalls --enable-newlib-mb --target=$GNUTarget --prefix=$GNUBase
make
make install
cd ..
cd gcc
make
make install
cd ..
rm -fr $GNUBase/$GNUTarget/sys-include
# rename $GNUBase/$GNUTarget/sys-include $GNUBase/$GNUTarget/include
cp -v ../devkitpro/rules/arm/* $GNUBase
mkdir gdb
#patch -p1 -d ../gdb/7.8.2 -i ../../patches/gdb-7.8.2.patch
cd gdb
sh ../../gdb/7.8.2/configure --disable-nls --target=$GNUTarget --prefix=$GNUBase --disable-werror --disable-dependency-tracking
make
make install
cd ../../devkitpro
echo $(pwd)
sh ./arm-crtls.sh