Document cross-compile from Linux to Windows.
This uses the mingw32 tool chain on Linux to build Windows binaries.
This commit is contained in:
parent
c3d5b23ac4
commit
df92caadbc
|
|
@ -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.
|
||||
Loading…
Reference in New Issue