How to cross-compile curl?

1. First, get ready openssl library

  Way to compile openssl library here

2. Get curl Source

  wget https://curl.haxx.se/download/curl-7.65.3.tar.gz

2. Extract

  tar xvf curl-7.65.3.tar.gz -C ~ /

  cd ~/curl-7.65.3

3. Configuration

  CPPFLAGS="-I/home/jello/openssl/ -I/home/jello/openssl/include" LDFLAGS="-L/home/jello/openssl/lib" LIBS="-ldl" ./configure --host=arm-linux CC=arm-linux-gcc CXX=arm-linux-g++ --with-ssl --enable-shared --enable-static --disable-dict --disable-ftp --disable-imap --disable-ldap --disable-ldaps --disable-pop3 --disable-proxy --disable-rtsp --disable-smtp --disable-telnet --disable-tftp --disable-zlib --without-ca-bundle --without-gnutls --without-libidn --without-librtmp --without-libssh2 --without-nss --without-zlib --prefix=/home/jello/curl

 

4. Compile

  make -j4

5. Installation

  make install

Guess you like

Origin www.cnblogs.com/dakewei/p/11365258.html