First, install NestedVM:
$ git clone http://nestedvm.ibex.org/.git/
$ cd nestedvm.ibex.org
$ make
$ make env.sh
$ . env.sh
$ cd ..
Then install libiconv:
$ mkdir $HOME/local
$ wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz
$ tar zxvf libiconv-1.13.1.tar.gz
$ libiconv-1.13.1
$ ./configure --host=mips-unknown-elf --prefix=$HOME/local
$ make && make install
$ cd ..
libxml2 must be patched before you can compile it with NestedVM. The patch is very simple though, and I'll include it here.
$ wget ftp://xmlsoft.org/libxml2/libxml2-2.7.6.tar.gz
$ tar zxvf libxml2-2.7.6.tar.gz
$ cd libxml2-2.7.6
This is the part where you must patch libxml2. I've included the diff below.
$ patch -p0 < fix.patch
$ ./configure --prefix=$HOME/local \
--without-zlib \
--host=mips-unknown-elf \
--without-http \
--without-ftp \
--without-python \
--with-iconv=$HOME/local
$ make && make install
You should now be ready to write C programs that cross compile against libxml2 on NestedVM. Check out this page for more info.
diff --git a/dict.c b/dict.c
index 3eff231..9ec3ed2 100644
--- a/dict.c
+++ b/dict.c
@@ -41,7 +41,7 @@ typedef unsigned __int32 uint32_t;
#define MAX_HASH_LEN 3
#define MIN_DICT_SIZE 128
#define MAX_DICT_HASH 8 * 2048
-#define WITH_BIG_KEY
+/* #define WITH_BIG_KEY */
#ifdef WITH_BIG_KEY
#define xmlDictComputeKey(dict, name, len) \