aboutsummaryrefslogtreecommitdiff
path: root/README.windows
diff options
context:
space:
mode:
authorChristian Andersen <csandersen3@gmail.com>2024-04-09 21:44:41 +0200
committerChristian Andersen <csandersen3@gmail.com>2024-05-25 12:43:00 +0200
commitad6e77ca9fe3da77a23b6b89e9678c92663c9cc8 (patch)
tree57cc3253cec12400930430f10b80aa7e4644ef13 /README.windows
parentac75aab32321a1c4f469018d9b3596fd89f5bf14 (diff)
downloadportable-ad6e77ca9fe3da77a23b6b89e9678c92663c9cc8.tar.gz
portable-ad6e77ca9fe3da77a23b6b89e9678c92663c9cc8.tar.bz2
portable-ad6e77ca9fe3da77a23b6b89e9678c92663c9cc8.zip
Rename README.windows to README.mingw.md
Since it is mingw specific and does not really involve other compilers.
Diffstat (limited to 'README.windows')
-rw-r--r--README.windows43
1 files changed, 0 insertions, 43 deletions
diff --git a/README.windows b/README.windows
deleted file mode 100644
index 2d342fa..0000000
--- a/README.windows
+++ /dev/null
@@ -1,43 +0,0 @@
1# Building
2
3For Windows systems, LibreSSL supports the mingw-w64 toolchain, which can use
4GCC or Clang as the compiler. Contrary to its name, mingw-w64 supports both
532-bit and 64-bit build environments. If your project already uses mingw-w64,
6then LibreSSL should integrate very nicely. Old versions of the mingw-w64
7toolchain, such as the one packaged with Ubuntu 12.04, may have trouble
8building LibreSSL. Please try it with a recent toolchain if you encounter
9troubles. Cygwin provides an easy method of installing the latest mingw-w64
10cross compilers on Windows.
11
12To configure and build LibreSSL for a 32-bit system, use the following
13build steps:
14
15 CC=i686-w64-mingw32-gcc CPPFLAGS=-D__MINGW_USE_VC2005_COMPAT \
16 ./configure --host=i686-w64-mingw32
17 make
18 make check
19
20For 64-bit builds, use these instead:
21
22 CC=x86_64-w64-mingw32-gcc ./configure --host=x86_64-w64-mingw32
23 make
24 make check
25
26# Why the -D__MINGW_USE_VC2005_COMPAT flag on 32-bit systems?
27
28An ABI change introduced with Microsoft Visual C++ 2005 (also known as
29Visual C++ 8.0) switched time_t from 32-bit to 64-bit. It is important to
30build LibreSSL with 64-bit time_t whenever possible, because 32-bit time_t
31is unable to represent times past 2038 (this is commonly known as the
32Y2K38 problem).
33
34If LibreSSL is built with 32-bit time_t, when verifying a certificate whose
35expiry date is set past 19 January 2038, it will be unable to tell if the
36certificate has expired or not, and thus take the safe stance and reject it.
37
38In order to avoid this, you need to build LibreSSL (and everything that links
39with it) with the -D__MINGW_USE_VC2005_COMPAT flag. This tells mingw-w64 to
40use the new ABI.
41
4264-bit systems always have a 64-bit time_t and are not affected by this
43problem.