cross compiling of openssl for linux arm-v5te-linux-gnueabi toolchain. I have the version openssl-0.9.8r I tried ./Configure --prefix=/usr --openssldir=/usr/sbin threads zlib s
I encountered the same problem and wrote a manual for how to cross compile openssl for arm. I hope this manual can give you some idea:
The process is quite straightforward. In this manual we will give an example for cross compiling OPENSSL for ARM architecture in an Ubuntu Linux System.
You will need The GNU C/C++ compiler for ARM architecture:
$ sudo apt-get install gcc-4.8-arm-linux-gnueabihf g++-4.8-arm-linux-gnueabihf
The openssl we will build is available at https://github.com/openssl/openssl
$ git clone https://github.com/openssl/openssl.git
Navigate into the openssl folder, and execute ./configure as follows:
$ ./Configure linux-armv4 --prefix=/usr/local/openssl/ --openssldir=/usr/local/openssl shared
This configuration sets the target platform linux-armv4 which is the only available ARM platform supported by this openssl. --prefix=/usr/local/openssl tells where to put the installation files. --openssldir=/usr/local/openssl defines the root directory of the openssl installation. shared makes the compiler to generate .so library files. The document INSTALL under folder openssl contains the parameters for ./Configure.
$ make CC=arm-linux-gnueabihf-gcc-4.8
CC tells what cross-compiler to use. The default compiler is gcc.
$ make install
After installation, you will find the following files and folders under /usr/local/openssl
$ ls /usr/local/openssl
bin
ct_log_list.cnf
include
misc
openssl.cnf.dist
share certs
ct_log_list.cnf.dist
lib
openssl.cnf
private
make sure the executable binaries are built for ARM:
$ file /usr/local/openssl/bin/openssl
install-arm/bin/openssl: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=a23306c9c8bd553183fc20a37a60dcac8291da91, not stripped
If you see something similar as what is shown above, you have successfully cross-compiled the openssl for the ARM system.