linux下交叉编译openssl,libcurl,libxml

linux下交叉编译openssl,libcurl,libxml

从网上下载openssl-1.1.1-pre7,解压后,修改Configurations/10-main.conf,在文件末尾加入
“plat” => {
inherit_from => [ “BASE_unix” ],
CC => “arm-linux-gcc”,
CFLAGS => “-O”,
thread_scheme => “(unknown)”,
},

./Configure plat –prefix=/home/test/curl/libssl
make clean;make
make install
其中CC配置的就是交叉编译器, Configure根据plat参数自动配置makefile,prefix后面的目录就是安装目录

然后编译libcurl
首先修改confg.sub,在basic_machine分支中加入平台名字
orion105)
basic_machine=clipper-highlevel
;;
mac | mpw | mac-mpw)
basic_machine=m68k-apple
;;
pmac | pmac-mpw)
basic_machine=powerpc-apple
;;
plat)
;;
*-unknown)
# Make sure to match an already-canonicalized machine name.
;;
例如plat
然后
./configure –prefix=/home/test/curl/libcurl/ –host=arm-linux –with-ssl=/home/test/curl/libssl
make clean;make
make install

交叉编译libxml2

./configure –host=arm-linux –with-lzma=no –with-zlib=no –with-python=no –prefix=/home/test/curl/libxml
make clean;make
make install

你可能感兴趣的:(linux下交叉编译openssl,libcurl,libxml)