移植sqlite-3.3.6

参考文档
http://bbs.eeworld.com/showtopic-856.aspx
http://blog.csdn.net/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
  
 
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值