annotate cbc_llvm.def @ 0:e90bb8bec611 default tip

init
author Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
date Fri, 25 Dec 2020 19:02:23 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 BootStrap: docker
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 From: ubuntu:20.04
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 %post
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 apt-get update
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 apt-get upgrade -y
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 DEBIAN_FRONTEND=noninteractive \
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 apt-get install -y \
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 mercurial \
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 wget \
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 libssl-dev \
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 vim \
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 build-essential \
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 ninja-build \
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 clang \
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 cmake \
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 gcc-multilib \
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 g++-multilib
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 DEBIAN_FRONTEND=noninteractive \
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 apt-get install -y \
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 crossbuild-essential-armhf
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 # download arm-none-eabi
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 wget "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2?revision=ca0cbf9c-9de2-491c-ac48-898b5bbc0443&la=en&hash=68760A8AE66026BCF99F05AC017A6A50C6FD832A" -O /tmp/arm.tar.bz2 && \
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 tar -jxvf /tmp/arm.tar.bz2 -C /opt && \
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 mv /opt/gcc-arm-none-eabi-10-2020-q4-major /opt/tools
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 # install cbc_llvm
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 hg clone http://www.cr.ie.u-ryukyu.ac.jp/hg/CbC/CbC_llvm/
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 mkdir -p /usr/local/cbc_llvm
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 mkdir -p /CbC_llvm/builddir
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 cd /CbC_llvm/builddir
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_DOCS=OFF -DLLVM_ENABLE_PROJECTS="clang;lld" \
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 -DCMAKE_INSTALL_PREFIX=/usr/local/cbc_llvm -DCMAKE_CROSSCOMPILING=True \
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 /CbC_llvm/llvm
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 ninja
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 ninja install
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
38
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 %environment
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 CC=/usr/local/cbc_llvm/bin/clang
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 CXX=/usr/local/cbc_llvm/bin/clang++
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 LLVM_DIR=CbC_llvm
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 export CC CXX LLVM_DIR
Ken Miyahira <e175733@ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 export PATH=/usr/local/cbc_llvm/bin:$PATH