Added travis-ci script
Also fixed the crosscompiler buildscript
This commit is contained in:
parent
ec699655bc
commit
75421ef803
2 changed files with 27 additions and 23 deletions
3
.travis.yml
Normal file
3
.travis.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
language: c
|
||||
install: bash buildcrosscompiler.sh
|
||||
script: make
|
|
@ -1,34 +1,34 @@
|
|||
CROSSPATH=/usr/local # You can change it to whatever you want
|
||||
set -o errexit
|
||||
CROSSPATH=$HOME/opt # You can change it to whatever you want
|
||||
export PATH=$CROSSPATH/bin:$PATH
|
||||
mkdir $CROSSPATH
|
||||
function buildscript() {
|
||||
echo "[$(date +%c)] Building binutils for $1" | tee buildlog
|
||||
echo "[$(date +%c)] Building binutils for $1." | tee -a buildlog
|
||||
mkdir build-binutils
|
||||
cd build-binutils
|
||||
../binutils-2.26/configure --prefix=$CROSSPATH --target=$1 --with-sysroot --disable-nls --disable-werror
|
||||
make -j8
|
||||
make install
|
||||
../binutils-2.26/configure --prefix=$CROSSPATH --target=$1 --with-sysroot --disable-nls --disable-werror 2>&1 > /dev/null
|
||||
make -j8 2>&1 > /dev/null
|
||||
make install 2>&1 > /dev/null
|
||||
cd ..
|
||||
rm -rf build-binutils
|
||||
date "[+%c] " | tr -d '\n' | tee buildlog
|
||||
echo "Building gcc for $1" | tee buildlog
|
||||
echo "[$(date +%c)] Building gcc for $1." | tee -a buildlog
|
||||
mkdir build-gcc
|
||||
cd build-gcc
|
||||
../gcc-5.3.0/configure --prefix=$CROSSPATH --target=$1 --disable-nls --enable-languages=c,c++ --without-headers
|
||||
make all-gcc -j8
|
||||
make all-target-libgcc -j8
|
||||
make install-gcc
|
||||
make install-target-libgcc
|
||||
../gcc-5.3.0/configure --prefix=$CROSSPATH --target=$1 --disable-nls --enable-languages=c,c++ --without-headers 2>&1 > /dev/null
|
||||
make all-gcc -j8 2>&1 > /dev/null
|
||||
make all-target-libgcc -j8 2>&1 > /dev/null
|
||||
make install-gcc 2>&1 > /dev/null
|
||||
make install-target-libgcc 2>&1 > /dev/null
|
||||
cd ..
|
||||
rm -rf build-gcc
|
||||
date "[+%c] " | tr -d '\n' | tee buildlog
|
||||
echo "Cross-compiler for $1 was built." | tee buildlog
|
||||
echo "[$(date +%c)] Cross-compiler for $1 was built." | tee -a buildlog
|
||||
}
|
||||
tempdir=$(mktemp -d)
|
||||
cd $tempdir
|
||||
echo "Temponary files are in $tempdir. Build log can be found under $tempdir/buildlog"
|
||||
echo "Downloading GCC, Binutils, MPC, MPFR and GMP"
|
||||
echo "Temponary files are in $tempdir. Build log can be found under $tempdir/buildlog" | tee -a buildlog
|
||||
echo "Downloading GCC, Binutils, MPC, MPFR and GMP" | tee -a buildlog
|
||||
wget ftp://ftp.gnu.org/gnu/gcc/gcc-5.3.0/gcc-5.3.0.tar.bz2 ftp://ftp.gnu.org/gnu/binutils/binutils-2.26.tar.bz2 ftp://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz ftp://ftp.gnu.org/gnu/mpfr/mpfr-3.1.3.tar.xz ftp://ftp.gnu.org/gnu/gmp/gmp-6.1.0.tar.xz
|
||||
echo "Untaring..."
|
||||
echo "Untaring..." 2>&1 | tee -a buildlog
|
||||
tar -xf gcc-5.3.0.tar.bz2
|
||||
tar -xf binutils-2.26.tar.bz2
|
||||
cd gcc-5.3.0
|
||||
|
@ -39,11 +39,12 @@ mv mpfr-3.1.3 mpfr
|
|||
tar -xf ../gmp-6.1.0.tar.xz
|
||||
mv gmp-6.1.0 gmp
|
||||
cd ..
|
||||
echo "Preperation done. Beginning the compilation now."
|
||||
buildscript i686-elf #x86 port
|
||||
buildscript arm-none-eabi #ARM ports (3DS, pi)
|
||||
buildscript armeb-eabi #Wii port
|
||||
buildscript ppc-elf #Wii port
|
||||
echo "Preperation done. Beginning the compilation now." 2>&1 | tee -a buildlog
|
||||
#buildscript i686-elf #x86 port
|
||||
#buildscript arm-none-eabi #Little endian ARM ports (GBA (v4), DS(i) (v4, v5), 3DS/2DS (v4, v5, v6), pi (v6), pi2 (v7))
|
||||
#buildscript armeb-eabi #Wii port
|
||||
#buildscript ppc-elf #Wii port
|
||||
#buildscript aarch64-none-elf #AArch64 ports (pi3 (v8))
|
||||
buildscript x86_64-elf #x86_64 port
|
||||
rm -rf gcc* binutils* mpc* mpfr* gmp*
|
||||
echo "Done! Have fun with your cross compilers!"
|
||||
echo "Done! Have fun with your cross compilers!" 2>&1 | tee -a buildlog
|
||||
|
|
Loading…
Reference in a new issue