Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dkw72n/8df9ebc822b3e2a35f50cd083f2bc423 to your computer and use it in GitHub Desktop.
Save dkw72n/8df9ebc822b3e2a35f50cd083f2bc423 to your computer and use it in GitHub Desktop.
Cross compile OpenSSL for mingw32-w64
#!/bin/bash
set -e
set -x
WORKSPACE=/home/arturo/Programmi/win32-cross
sed -i 's/:.dll.a/ -Wl,--export-all -shared:.dll.a/g' Configure
sed -i 's,.*target already defined.*,$target=$_;,g' Configure
#./Configure mingw shared --cross-compile-prefix=i686-w64-mingw32- --prefix=${WORKSPACE}
./Configure mingw64 shared --cross-compile-prefix=x86_64-w64-mingw32- --prefix=${WORKSPACE} --openssldir=${WORKSPACE}/openssl
make -j2
make -j2 install
# cp *.dll ${WORKSPACE}/lib/
# cd ${WORKSPACE}/include
# Fix compile bug in OpenSSL
# sed -i '/# define HEADER_X509V3_H/a \\n#ifdef X509_NAME\n#undef X509_NAME\n#endif' openssl/x509v3.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment