Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2011-09-21
18:29 • Closed ticket [3116490fff]: cross-compile Tcl mingw32 on unix plus 6 other c... artifact: 2077d8f20c user: nijtmans
2010-12-06
20:02 • Ticket [3116490fff]: 5 changes artifact: 4797faf210 user: nijtmans
2010-11-23
18:29 • Add attachment 3116490.patch to ticket [3116490fff] artifact: a9b9884139 user: nijtmans
18:29 • Ticket [3116490fff] cross-compile Tcl mingw32 on unix status still Open with... artifact: 665e4a86b8 user: nijtmans
11:27 • New ticket [3116490fff]. artifact: dddcdcb902 user: nijtmans

cross-compile Tcl mingw32 on unix

Closed / Fixed3116490fffffffffffffffffffffffffffffffffCreated 16 years agoUpdated 15 years ago
Descriptionplain2010-11-23 11:27:28
The mingw-w64 project   <http://mingw-w64.sourceforge.net/> provides
toolchains which make it possible to compile windows (both 32-bit and 64-bit)
executables on UNIX hosts. Tcl 8.6 has almost complete cross-compile
support, here is the final patch to make it work.

- The configure script detects cross-compilation, and sets TCL_EXE
  accordingly: This means that for cross-builds, TCL_EXE points to
  a tclsh executable which must be available before starting make
  for the first time! In native builds,TCL_EXE points to the tclsh
  being created, so it does not need to be available beforehand.

modules in the pkgs directory (Thread, itcl, odbc) should upgrade
to the latest TEA tcl.m4, then they can be cross-compiled the
same way.

So, how to cross-compile win32 Tcl on UNIX?

For Linux (tested on Ubuntu 10.4):

Make sure you have the mingw-w64 toolchain
$ sudo apt-get install mingw-w64
Then, do as normal, only add --host=...
$ ./configure --prefix=/home/<user>/Tcl --host=i586-mingw32msvc
 ......
$ make install

That's it. You will have a complete build in
your /home/<user>/Tcl directory. If you have wine
installed, you can even run the tests (but don't expect
everything to pass, because wine is not windows!)
nijtmansplain2010-11-23 18:29:00
File Added - 394145: 3116490.patch
nijtmansplain2010-12-06 20:02:09
fixed on HEAD
nijtmansplain2011-09-21 18:29:41
allow_comments - 1
Log in (anonymous is fine) to add a comment.

Attachments: