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