[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] using tcc as a cross compiler for Windows
From: |
Luigi Rizzo |
Subject: |
[Tinycc-devel] using tcc as a cross compiler for Windows |
Date: |
Tue, 16 Feb 2010 01:50:36 +0100 |
User-agent: |
Mutt/1.4.2.3i |
not sure how useful this is but it seems relatively simple to
use tcc as a cross compiler for Windows, by doing (tried on FreeBSD):
gmake CONFIG_WIN32=1 _WIN32=1 tcc
cp tcc tcc.exe
gmake CONFIG_WIN32=1 _WIN32=1 libtcc1.a
Building tiny_impdef is slightly harder but apparently the compiler
is happy enough with a copy of msvcrt.dll and kernel32.dll
Putting tcc, libtcc1.a and the *dll in the same directory you can do
./tcc -I win32/include -L . myprog.c
and produce myprog.exe which runs fine under windows.
Perhaps we could add a Makefile target to build the cross compiler ?
cheers
luigi