2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-05 09:46:36 +08:00
artiq/.travis/get-toolchain.sh
whitequark 6d0ec2f01d travis: export llvm-or1k lib/ in LD_LIBRARY_PATH.
The llvm-or1k build that is currently used is dynamically linked,
and in case llvmlite-artiq is linked with this llvm-or1k,
this is necessary to run ARTIQ.
2015-10-10 03:50:58 +03:00

29 lines
1.1 KiB
Bash
Executable File

#!/bin/sh
packages="http://us.archive.ubuntu.com/ubuntu/pool/universe/i/iverilog/iverilog_0.9.7-1_amd64.deb"
archives="http://fehu.whitequark.org/files/llvm-or1k.tbz2"
mkdir -p packages
for p in $packages
do
wget $p
pkg_name=$(echo $p | sed -e 's!.*/\(.*\)\.deb!\1\.deb!')
dpkg -x $pkg_name packages
done
for a in $archives
do
wget $a
(cd packages && tar xf ../$(basename $a))
done
export PATH=$PWD/packages/usr/local/llvm-or1k/bin:$PWD/packages/usr/local/bin:$PWD/packages/usr/bin:$PATH
export LD_LIBRARY_PATH=$PWD/packages/usr/local/llvm-or1k/lib:$PWD/packages/usr/lib/x86_64-linux-gnu:$PWD/packages/usr/local/x86_64-unknown-linux-gnu/or1k-elf/lib:$LD_LIBRARY_PATH
echo "export PATH=$PWD/packages/usr/local/llvm-or1k/bin:$PWD/packages/usr/local/bin:$PWD/packages/usr/bin:\$PATH" >> $HOME/.mlabs/build_settings.sh
echo "export LD_LIBRARY_PATH=$PWD/packages/usr/local/llvm-or1k/lib:$PWD/packages/usr/lib/x86_64-linux-gnu:$PWD/packages/usr/local/x86_64-unknown-linux-gnu/or1k-elf/lib:\$LD_LIBRARY_PATH" >> $HOME/.mlabs/build_settings.sh
llc --version
clang --version