logo

Navigation:First_Community->Computer->Database Goto:New TopicSettingSearch
sqlite编译的两个脚本
Posted by: imac Date: March 29, 2008 04:23PM
前段时间对sqlite进行了交叉编译由于没有及时记录,今天再想做点事情的时候发现忘记了当初是怎么搞定的.这次对sqlite进行了x86和arm的编译,并写成脚本文件方便以后编译,其实主要是arm的编译麻烦一些,sqlite的configure总是无法识别交叉编译器,需要做些更改.源文件是sqlite-3.3.11版本,交叉编译工具为gcc-3.4.2-glibc-2.3.3制作的交叉编译工具.
先做交叉编译对configure的更改对x86下编译没有影响.用make doc生产帮助文件的时候是乱码.
arm下的脚本
#!/bin/bash
# first you must change the configure file, search the keyword
# "test "$cross_compiling" = yes &&", in line 20420 and 20446 you will find the
# {(exit 1);exit 1;};}changed it to {(echo 1);echo 1;};}.At the end you should
# change the Makefile BCC=gcc -g to BCC=gcc -g -O2.Then make and make install.
# Don 't forget to make dir sqlite-armv4l
export PATH=/export PATH=${PATH}:/usr/local/arm/gcc-3.4.2-glibc-2.3.3/bin
export config_BUILD_CC=gcc
export config_TARGET_CC=armv4l-linux-gnu-gcc
./configure --disable-tcl --host=armv4l-linux-gnu --prefix=$PWD/sqlite-armv4l/
make
make install
X86下的脚本
#/bin/bash
./configure --disable-tcl --prefix=$PWD/sqlite-x86/
make
make install
将编译生成的头文件分别放入交叉编译工具的include:/usr/local/arm/gcc-3.4.2-glibc-2.3.3/armv4l-linux-gnu/include
和/usr/include里面内保证在交叉编译和x86编译的时候都能通过,交叉便宜的库文件需要放到开发板的lib目录下

MegaEntry - Social networking and discussion site!



Reply To This Message
Subject: 

Copyright 2005-2006 megaentry,All Rights Reserved
IE 6.0 or above is perfect