ctf-tools/crosstool/install

30 lines
1.6 KiB
Text
Raw Normal View History

#!/bin/bash -ex
2015-05-07 11:02:00 +00:00
2015-05-07 18:20:55 +00:00
mkdir -p src
2015-12-18 20:13:00 +00:00
[ -e crosstool-ng ] || git clone --depth 1 https://github.com/crosstool-ng/crosstool-ng.git
2015-05-07 11:02:00 +00:00
cd crosstool-ng
2015-05-07 18:20:55 +00:00
./bootstrap
./configure --enable-local
make -j $(nproc)
make install
cp ../config .config
2015-05-07 11:02:00 +00:00
2015-05-07 18:20:55 +00:00
SAMPLES="alphaev56-unknown-linux-gnu alphaev67-unknown-linux-gnu arm-bare_newlib_cortex_m3_nommu-eabi arm-cortex_a15-linux-gnueabi arm-cortexa5-linux-uclibcgnueabihf arm-cortex_a8-linux-gnueabi arm-cortexa9_neon-linux-gnueabihf armeb-unknown-eabi armeb-unknown-linux-gnueabi armeb-unknown-linux-uclibcgnueabi arm-unknown-eabi arm-unknown-linux-gnueabi arm-unknown-linux-uclibcgnueabi arm-unknown-linux-uclibcgnueabihf armv6-rpi-linux-gnueabi avr32-unknown-none bfin-unknown-linux-uclibc i586-geode-linux-uclibc i586-mingw32msvc,i686-none-linux-gnu i686-nptl-linux-gnu i686-unknown-mingw32 m68k-unknown-elf m68k-unknown-uclinux-uclibc mips64el-n32-linux-uclibc mips64el-n64-linux-uclibc mips-ar2315-linux-gnu mipsel-sde-elf mipsel-unknown-linux-gnu mips-malta-linux-gnu mips-unknown-elf mips-unknown-linux-uclibc nios2-elf-mingw32 powerpc-405-linux-gnu powerpc64-unknown-linux-gnu powerpc-860-linux-gnu powerpc-e300c3-linux-gnu powerpc-e500v2-linux-gnuspe powerpc-unknown-linux-gnu powerpc-unknown-linux-uclibc powerpc-unknown_nofpu-linux-gnu s390-ibm-linux-gnu s390x-ibm-linux-gnu sh4-unknown-linux-gnu sparc-unknown-linux-gnu x86_64-unknown-linux-gnu x86_64-unknown-linux-uclibc x86_64-unknown-mingw32"
2015-05-07 11:02:00 +00:00
2015-05-07 18:20:55 +00:00
mkdir -p ../x-tools
2015-05-07 11:02:00 +00:00
for sample in $SAMPLES
do
2015-05-07 18:20:55 +00:00
../build-sample.sh $sample || echo "$sample" >> ../x-tools/broken
./ct-ng clean
2015-05-07 11:02:00 +00:00
done
2015-05-07 18:20:55 +00:00
cd ..
mkdir -p bin
cd bin
for sample in $SAMPLES
do
ln -sf ../x-tools/$sample/bin/* .
rm -f '*'
done
cd ..