From: Guus Sliepen Date: Sat, 9 Apr 2016 23:10:23 +0000 (+0200) Subject: Update the cross-compiling examples to use LibreSSL. X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=bb6514580bc1b7afae12f52b9b0f8f9cd11cfca7;p=wiki Update the cross-compiling examples to use LibreSSL. LibreSSL compiles very cleanly under MinGW. --- diff --git a/examples/cross-compiling-64-bit-windows-binary.mdwn b/examples/cross-compiling-64-bit-windows-binary.mdwn index a3bb24f..a16acd6 100644 --- a/examples/cross-compiling-64-bit-windows-binary.mdwn +++ b/examples/cross-compiling-64-bit-windows-binary.mdwn @@ -77,7 +77,7 @@ time it is needed. Cross-compiling LZO is easy: - cd $HOME/mingw64/lzo2-2.06 + cd $HOME/mingw64/lzo2-2.08 ./configure --host=x86_64-w64-mingw32 make DESTDIR=$HOME/mingw64 make install @@ -90,24 +90,19 @@ create a symlink for the missing getopt.h file as mentioned above. Cross-compiling Zlib is also easy, but a plain `make` failed to compile the tests, so we only build the static library here: - cd $HOME/mingw64/zlib-1.2.7.dfsg + cd $HOME/mingw64/zlib-1.2.8.dfsg mingw64 ./configure --static mingw64 make DESTDIR=$HOME/mingw64 mingw64 make install -### Compiling OpenSSL +### Compiling LibreSSL -Although older versions will not compile, OpenSSL 1.0.0 is easy. -However, `apt-get source` will have applied -Debian-specific patches that break cross-compiling a Windows binary. -You need to undo those patches first. -Do not use the `-j` option when compiling OpenSSL, it will break. +Tinc can use either OpenSSL or LibreSSL. The latter is recommended. - cd $HOME/mingw64/openssl-1.0.1c - quilt pop -a - mingw64 ./Configure --openssldir=$HOME/mingw64/usr/local mingw64 - mingw64 make - mingw64 make install + cd $HOME/mingw/libressl-2.3.3 + CC=x86_64-w64-mingw32-gcc ./configure --host=x86_64-w64-mingw32 + make + DESTDIR=$HOME/mingw make install ### Compiling tinc diff --git a/examples/cross-compiling-windows-binary.mdwn b/examples/cross-compiling-windows-binary.mdwn index 3fc4ae8..9908981 100644 --- a/examples/cross-compiling-windows-binary.mdwn +++ b/examples/cross-compiling-windows-binary.mdwn @@ -80,7 +80,7 @@ time it is needed. Cross-compiling LZO is easy: - cd $HOME/mingw/lzo2-2.06 + cd $HOME/mingw/lzo2-2.08 ./configure --host=i686-w64-mingw32 make DESTDIR=$HOME/mingw make install @@ -90,25 +90,19 @@ Cross-compiling LZO is easy: Cross-compiling Zlib is also easy, but a plain `make` failed to compile the tests, so we only build the static library here: - cd $HOME/mingw/zlib-1.2.7.dfsg + cd $HOME/mingw/zlib-1.2.8.dfsg mingw ./configure mingw make libz.a DESTDIR=$HOME/mingw mingw make install -### Compiling OpenSSL +### Compiling LibreSSL -OpenSSL 1.0.0 and later is relatively easy. However, `apt-get source` will have applied -Debian-specific patches that break cross-compiling a Windows binary. You need to undo those patches first: +Tinc can use either OpenSSL or LibreSSL. The latter is recommended. - cd $HOME/mingw/openssl-1.0.1c - quilt pop -a - -Now you can compile OpenSSL. -Do not use the `-j` option when compiling OpenSSL, it will break. - - mingw ./Configure --openssldir=$HOME/mingw/usr/local mingw - mingw make - mingw make install + cd $HOME/mingw/libressl-2.3.3 + CC=i686-w64-mingw32-gcc ./configure --host=i686-w64-mingw32 + make + DESTDIR=$HOME/mingw make install ### Compiling tinc