zafena development

October 16, 2009

From time to time I get the question: How do I make a native build of Icedtea6 using Shark and LLVM on ARM?
Here is how I do it:

First all dependencies needed to build llvm and openjdk needs to be installed, if you are using Ubuntu then this can be satisfied quite easily by typing in these two lines.

apt-get build-dep openjdk-6-jdk llvm
apt-get install cmake mercurial subversion-tools openjdk-6-jdk ccache

The next little script does all the magic, it download the sources using subversion and mercurial, configures and starts the building!

svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
mkdir llvm-cmake
cd llvm-cmake
cmake -DCMAKE_BUILD_TYPE:STRING=ReleaseWithDebInfo \
-DLLVM_BUILD_TOOLS:BOOL=ON \
-DLLVM_BUILD_EXAMPLES:BOOL=OFF \
-DLLVM_ENABLE_ASSERTIONS:BOOL=ON \
-DLLVM_TARGETS_TO_BUILD:STRING=ARM ../llvm
make
make install
cd ..
hg clone http://icedtea.classpath.org/hg/icedtea6
cd icedtea6
./autogen.sh
cd ..
mkdir icedtea6-shark-build
cd icedtea6-shark-build
../icedtea6/configure --enable-zero --enable-shark --disable-docs --disable-bootstrap
make

Enjoy!

#Shark can also be built using a LLVM shared library:
#here i will configure LLVM using configure instead of cmake.

wget http://llvm.org/releases/2.9/llvm-2.9.tgz
tar zxvf llvm-2.9.tgz
mkdir llvm-2.9-build
cd llvm-2.9-build
../llvm-2.9/configure --enable-targets=arm,powerpc,x86 --enable-shared --enable-assertions -enable-optimized --enable-docs=no --enable-debug-symbols=yes
make
sudo make install
sudo ldconfig
cd ..
wget http://icedtea.classpath.org/download/source/icedtea6-1.10.1.tar.gz
tar zxvf icedtea6-1.10.1.tar.gz
cd icedtea6-1.10.1
wget http://icedtea.classpath.org/bugzilla/attachment.cgi?id=511 -O icedtea6-1.10-shark-llvm-2.9.patch
patch -p1 < icedtea6-1.10-shark-llvm-2.9.patch
./autogen.sh
cd ..
mkdir icedtea6-1.10.1-shark
cd icedtea6-1.10.1-shark
../icedtea6-1.10.1/configure --enable-zero --enable-shark --disable-docs --disable-bootstrap
make

5 Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress