mirror of
https://github.com/danog/gllvm.git
synced 2024-11-30 06:59:05 +01:00
Beter build from tarballs.
This commit is contained in:
parent
1184fe0a56
commit
6ace083d21
@ -31,6 +31,8 @@ end
|
|||||||
```bash
|
```bash
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# vagrant bootstrapping file
|
||||||
|
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
|
|
||||||
sudo apt-get install -y emacs24 dbus-x11
|
sudo apt-get install -y emacs24 dbus-x11
|
||||||
@ -46,6 +48,8 @@ echo ". /vagrant/bash_profile" >> /home/vagrant/.bashrc
|
|||||||
## Shell Settings
|
## Shell Settings
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
#### /vagrant/bash_profile
|
||||||
|
|
||||||
#### llvm
|
#### llvm
|
||||||
export LLVM_HOME=/usr/lib/llvm-5.0
|
export LLVM_HOME=/usr/lib/llvm-5.0
|
||||||
export GOPATH=/vagrant/go
|
export GOPATH=/vagrant/go
|
||||||
@ -64,7 +68,7 @@ export PATH=${GOPATH}/bin:${LLVM_HOME}/bin:${PATH}
|
|||||||
|
|
||||||
The file `tinyconfig64` is generated ...
|
The file `tinyconfig64` is generated ...
|
||||||
|
|
||||||
## The Build with gllvm
|
## The Tarball Build with gllvm
|
||||||
|
|
||||||
The build process is carried out by running the `build_linux_gllvm.sh`
|
The build process is carried out by running the `build_linux_gllvm.sh`
|
||||||
script.
|
script.
|
||||||
@ -72,15 +76,15 @@ script.
|
|||||||
```bash
|
```bash
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
mkdir -p ${GOPATH}
|
### building from a tarball with gllvm
|
||||||
|
|
||||||
go get github.com/SRI-CSL/gllvm/cmd/...
|
go get github.com/SRI-CSL/gllvm/cmd/...
|
||||||
|
|
||||||
mkdir ${HOME}/linux_kernel
|
cd ${HOME}
|
||||||
cd ${HOME}/linux_kernel
|
wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.14.39.tar.xz
|
||||||
git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
|
tar xvf linux-4.14.39.tar.xz
|
||||||
|
cd linux-4.14.39
|
||||||
|
|
||||||
cd linux-stable
|
|
||||||
git checkout tags/v4.14.34
|
|
||||||
cp /vagrant/tinyconfig64 .config
|
cp /vagrant/tinyconfig64 .config
|
||||||
|
|
||||||
make CC=gclang HOSTCC=gclang
|
make CC=gclang HOSTCC=gclang
|
||||||
@ -89,7 +93,7 @@ get-bc -m -b built-in.o
|
|||||||
get-bc -m vmlinux
|
get-bc -m vmlinux
|
||||||
```
|
```
|
||||||
|
|
||||||
## The Build with wllvm
|
## The Tarball Build with wllvm
|
||||||
|
|
||||||
The build process is carried out by running the `build_linux_wllvm.sh`
|
The build process is carried out by running the `build_linux_wllvm.sh`
|
||||||
script.
|
script.
|
||||||
@ -97,14 +101,15 @@ script.
|
|||||||
```bash
|
```bash
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
### building from a tarball with wllvm
|
||||||
|
|
||||||
sudo pip install wllvm
|
sudo pip install wllvm
|
||||||
|
|
||||||
mkdir ${HOME}/linux_kernel
|
cd ${HOME}
|
||||||
cd ${HOME}/linux_kernel
|
wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.14.39.tar.xz
|
||||||
git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
|
tar xvf linux-4.14.39.tar.xz
|
||||||
|
cd linux-4.14.39
|
||||||
|
|
||||||
cd linux-stable
|
|
||||||
git checkout tags/v4.14.34
|
|
||||||
cp /vagrant/tinyconfig64 .config
|
cp /vagrant/tinyconfig64 .config
|
||||||
|
|
||||||
|
|
||||||
@ -114,5 +119,13 @@ extract-bc -m -b built-in.o
|
|||||||
extract-bc -m vmlinux
|
extract-bc -m vmlinux
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Building from a git clone
|
||||||
|
|
||||||
|
You can also build from a [git clone using gllvm,](https://github.com/SRI-CSL/gllvm/blob/master/examples/linux-kernel/build_linux_gllvm_git.sh)
|
||||||
|
or build from a [git clone using wllvm.](https://github.com/SRI-CSL/gllvm/blob/master/examples/linux-kernel/build_linux_wllvm_git.sh)
|
||||||
|
Though using a tarball is faster, and seemingly more reliable.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Extracting the bitcode
|
## Extracting the bitcode
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#### /vagrant/bash_profile
|
||||||
|
|
||||||
#### llvm
|
#### llvm
|
||||||
export LLVM_HOME=/usr/lib/llvm-5.0
|
export LLVM_HOME=/usr/lib/llvm-5.0
|
||||||
export GOPATH=/vagrant/go
|
export GOPATH=/vagrant/go
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# vagrant bootstrapping file
|
||||||
|
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
|
|
||||||
sudo apt-get install -y emacs24 dbus-x11
|
sudo apt-get install -y emacs24 dbus-x11
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
### building from a git clone with gllvm
|
||||||
|
|
||||||
go get github.com/SRI-CSL/gllvm/cmd/...
|
go get github.com/SRI-CSL/gllvm/cmd/...
|
||||||
|
|
||||||
cd ${HOME}
|
cd ${HOME}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
### building from a tarball with gllvm
|
||||||
|
|
||||||
go get github.com/SRI-CSL/gllvm/cmd/...
|
go get github.com/SRI-CSL/gllvm/cmd/...
|
||||||
|
|
||||||
cd ${HOME}
|
cd ${HOME}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
### building from a git clone with wllvm
|
||||||
|
|
||||||
sudo pip install wllvm
|
sudo pip install wllvm
|
||||||
|
|
||||||
cd ${HOME}
|
cd ${HOME}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
### building from a tarball with wllvm
|
||||||
|
|
||||||
sudo pip install wllvm
|
sudo pip install wllvm
|
||||||
|
|
||||||
cd ${HOME}
|
cd ${HOME}
|
||||||
|
Loading…
Reference in New Issue
Block a user