From b9ec015b4a5d6152f2dd5a0c5bddd604c58778cb Mon Sep 17 00:00:00 2001 From: Veikko Sariola Date: Thu, 22 Oct 2020 17:46:51 +0300 Subject: [PATCH] Document MinGW build commands in README.md. --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index ac863e6..3087baf 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,25 @@ Requires [CMake](https://cmake.org), [yasm](https://yasm.tortall.net), and your favorite c-compiler & build tool. Results have been obtained using Visual Studio 2019, gcc&make on linux, and MinGW&mingw32-make. +### Example: building and testing using MinGW32 + +``` +mkdir build +cd build +cmake .. -G"MinGW Makefiles" +mingw32-make +mingw32-make test +cd ../bridge +go test +``` + +Note that this builds 64-bit binaries on 64-bit Windows. To build 32-bit +binaries on 64-bit Windows, replace in above: + +``` +cmake .. -DCMAKE_C_FLAGS="-m32" -DCMAKE_ASM_NASM_OBJECT_FORMAT="win32" -G"MinGW Makefiles" +``` + > :warning: **If you are using MinGW**: Yasm 1.3.0 (currently still the latest stable release) and GNU linker do not play nicely along, trashing the BSS layout. See [here](https://tortall.lighthouseapp.com/projects/78676/tickets/274-bss-problem-with-windows-win64)