参考文档
http://bbs.eeworld.com/showtopic-856.aspx
http://blog.youkuaiyun.com/alexdream/archive/2007/01/16/1484554.aspx
http://upczap.itpub.net/post/26542/273383
具体过程
1. 解压源代码到/home/sqlite-3.3.6
建立目录/home/sqlite-arm-linux/
2. 编辑configure文件(注释掉下列3段,目的是让configure不检查编译器)
#if test "$cross_compiling" = "yes"; then
# { { echo "$as_me:$LINENO:: error: unable to find a compiler for building build tools" >&5
#echo "$as_me: error: unable to find a compiler for building build tools" >&2;}
# { (exit 1); exit 1; }; }
#fi
#else
#test "$cross_compiling" = yes &&
# { { echo "$as_me:$LINENO:: error: cannot check for file existence when cross compiling" >&5
#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
# { (exit 1); exit 1; }; }
#else
#test "$cross_compiling" = yes &&
# { { echo "$as_me:$LINENO:: error: cannot check for file existence when cross compiling" >&5
#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
# { (exit 1); exit 1; }; }
3. cd /home/sqlite-arm-linux/
../sqlite-3.3.6/configure --disable-tcl --host=armv4l-unknown-linux --prefix=/home/sqlite-arm-linux
4. 修改Makefile
BCC = armv4l-unknown-linux-gcc -g -O2
改成
BCC = gcc -g -O2
5. make
6. make install
9. 在sqlite-arm-linux下生成 bin lib include 目录,里面是编译好的东西。
由于编译好的库太大我们可以用 strip去掉调试信息,这样库会小很多。
file libsqlite3.so.0.8.6 //查看文件信息 (我的是1.8M)
/opt/host/armv4l/bin/armv4l-unknown-linux-strip libsqlite3.so.0.8.6 (现在300K,呵呵~)
/opt/host/armv4l/bin/armv4l-unknown-linux-strip splite3
http://bbs.eeworld.com/showtopic-856.aspx
http://blog.youkuaiyun.com/alexdream/archive/2007/01/16/1484554.aspx
http://upczap.itpub.net/post/26542/273383
具体过程
1. 解压源代码到/home/sqlite-3.3.6
建立目录/home/sqlite-arm-linux/
2. 编辑configure文件(注释掉下列3段,目的是让configure不检查编译器)
#if test "$cross_compiling" = "yes"; then
# { { echo "$as_me:$LINENO:: error: unable to find a compiler for building build tools" >&5
#echo "$as_me: error: unable to find a compiler for building build tools" >&2;}
# { (exit 1); exit 1; }; }
#fi
#else
#test "$cross_compiling" = yes &&
# { { echo "$as_me:$LINENO:: error: cannot check for file existence when cross compiling" >&5
#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
# { (exit 1); exit 1; }; }
#else
#test "$cross_compiling" = yes &&
# { { echo "$as_me:$LINENO:: error: cannot check for file existence when cross compiling" >&5
#echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
# { (exit 1); exit 1; }; }
3. cd /home/sqlite-arm-linux/
../sqlite-3.3.6/configure --disable-tcl --host=armv4l-unknown-linux --prefix=/home/sqlite-arm-linux
4. 修改Makefile
BCC = armv4l-unknown-linux-gcc -g -O2
改成
BCC = gcc -g -O2
5. make
6. make install
9. 在sqlite-arm-linux下生成 bin lib include 目录,里面是编译好的东西。
由于编译好的库太大我们可以用 strip去掉调试信息,这样库会小很多。
file libsqlite3.so.0.8.6 //查看文件信息 (我的是1.8M)
/opt/host/armv4l/bin/armv4l-unknown-linux-strip libsqlite3.so.0.8.6 (现在300K,呵呵~)
/opt/host/armv4l/bin/armv4l-unknown-linux-strip splite3