diff --git a/mingw-cross.txt b/mingw-cross.txt new file mode 100644 index 000000000..94ad1d1fc --- /dev/null +++ b/mingw-cross.txt @@ -0,0 +1,27 @@ + +These are instructions for building Icarus Verilog binaries for +Windows using mingw cross compiler tools on Linux. + +To start with, you need the mingw64-cross-* packages for your linux +distribution, which gives you the x86_64-w64-mingw32-* commands +installed on your system. Installing the cross environment is outside +the scope of this writeup. + +First, configure with this command: + + $ ./configure --host=x86_64-w64-mingw32 + +This generates the Makefiles needed to cross compile everything with +the mingw32 compiler. The configure script will generate the command +name paths, so long as commands line x86_64-w64-mingw32-gcc +et. al. are in your path. + +Next, compile with the command: + + $ make HOSTCC=cc HOSTCFLAGS=-O + +The configure generated the cross compiler flags, but there are a few +bits that need to be compiled with the native compiler. (version.exe +for example is used by the build process but is not installed.) The +MOSTCC= flag on the make command line makes sure the Makefile knows +about the native tool.