-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathllvm_intsall.sh
More file actions
executable file
·89 lines (73 loc) · 2.82 KB
/
llvm_intsall.sh
File metadata and controls
executable file
·89 lines (73 loc) · 2.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/bin/bash
ME="$(whoami)"
################# Installation of binutils 2.31.51 ###############################
mkdir /home/"$ME"/software/binutils
mkdir /home/"$ME"/software/binutils/2.31.51
sudo apt-get install texinfo
cd /home/"$ME"/source
mkdir binutils
cd binutils
git clone --depth 1 git://sourceware.org/git/binutils-gdb.git 2.31.51
cd 2.31.51
mkdir build
cd build
../configure --prefix=/home/yigonghu/software/binutils/2.31.51 --enable-gold --enable-plugins --disable-werror
make -j 16
make install
cd /home/"$ME"/software/binutils/2.31.51/bin
mv ld ld.default
mv ld.gold ld
################# Installation of LLVM 5.0.0 ###############################
sudo apt install subversion cmake
mkdir /home/"$ME"/software/llvm
mkdir /home/"$ME"/software/llvm/5.0.0
cd /home/"$ME"/source
mkdir llvm
cd llvm
svn co http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_500/final 5.0.0
cd 5.0.0/tools
svn co http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_500/final clang
cd ..
cd tools/clang/tools
svn co http://llvm.org/svn/llvm-project/clang-tools-extra/tags/RELEASE_500/final extra
cd ../../..
cd projects
svn co http://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_500/final compiler-rt
cd ..
cd projects
svn co http://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_500/final libcxx
svn co http://llvm.org/svn/llvm-project/libcxxabi/tags/RELEASE_500/final libcxxabi
cd ..
mkdir build
cd ./build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86" -DCMAKE_INSTALL_PREFIX=/home/"$ME"/software/llvm/5.0.0 -DLLVM_BINUTILS_INCDIR=/home/"$ME"/software/binutils/2.31.51/include ../
make -j 16
sudo make install
cd /home/"$ME"/software/binutils/2.31.51/lib
mkdir bfd-plugins
ln -s /home/"$ME"/software/llvm/2.31.51/lib/LLVMgold.so
################ Installation of LLVM 3.4.0 ##############################
mkdir /home/"$ME"/software/llvm
mkdir /home/"$ME"/software/llvm/3.4.0
cd /home/"$ME"/source/llvm
svn co http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_34/final 3.4.0
cd 3.4.0/tools
svn co http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_34/final clang
cd ..
cd tools/clang/tools
svn co http://llvm.org/svn/llvm-project/clang-tools-extra/tags/RELEASE_34/final extra
cd ../../..
cd projects
svn co http://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_34/final compiler-rt
cd ..
cd projects
svn co http://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_34/final libcxx
svn co http://llvm.org/svn/llvm-project/libcxxabi/tags/RELEASE_30/final libcxxabi
cd ..
./configure --prefix=/home/"$ME"/software/llvm/3.4.0 --with-binutils-include=/home/yigonghu/software/binutils/2.31.51/include --enable-debug-symbols --enable-debug-runtime --enable-assertions --disable-optimized
make -j 16
make install
cd /home/"$ME"/software/binutils/2.31.51/lib
mkdir bfd-plugins
ln -s /home/"$ME"/software/llvm/2.31.51/lib/LLVMgold.so
make -j 16make -j 16