# Cross-compiling OpenSSL ------
Modify makefile directly
Add this line:
Cross_compile = arm-unknown-Linux-gnueabi-
Go to the following lines
Cc = cc to CC = $ (cross_compile) GCC
Go to the following lines
AR = ar $ (arflags) r
Ranlib =/usr/bin/ranlib
Change
AR = $ (cross_compile) Ar $ (arflags) r
Ranlib = $ (cross_compile) ranlib
Modify the installation path and locate the following two lines:
Installtop =/usr/local/SSL
Openssldir =/usr/local/SSL
Changed to the actual installation path. Because it is not running on the local machine, you can specify any location
Installtop =/someplace/OpenSSL
Openssldir =/someplace/OpenSSL
The focus is here !!!
The above sections are all changed based on online materials. static libraries can be generated after testing, but the changes to the dynamic libraries generated are different from those mentioned on the Internet. After practice, you need to modify the following parts:
Execute the following script for Initial Configuration:
./Config no-ASM shared -- prefix =/home/rebi/cross_tools/build_openssl-1.0.1c/_ install
Final Conclusion: first execute the above config, then manually modify the generated makefile, and find the location with-M64, delete all (2 in total)
Then modify the generated makefile.
First, add the line:
Cross_compile = arm-unknown-Linux-gnueabi-
Go to the following lines
Cc = cc to CC = $ (cross_compile) GCC
Locate the following rows (--- these two rows should not be changed ---)
AR = ar $ (arflags) r
Ranlib =/usr/bin/ranlib
Change
AR = $ (cross_compile) Ar $ (arflags) r
Ranlib = $ (cross_compile) ranlib
After the above configuration, you can generate both static and dynamic libraries.