tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] using tcc as a cross compiler for Windows


From: Sergi Alvarez
Subject: Re: [Tinycc-devel] using tcc as a cross compiler for Windows
Date: Tue, 16 Feb 2010 16:53:32 +0100
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

I sent a mail+patch few days ago partially fixing the configure script
help and aiming to fix those inconsistencies for building tcc as a
crosscompiler.

Same for missing supported opcodes in assembler.

Do somebody read it?

grischka wrote:
Luigi Rizzo wrote:
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):

That is because everything you need to compile windows programs is
contained in the tcc source.  It is less simple with the other targets
because they mostly rely on headers and libraries of the target system.


    gmake CONFIG_WIN32=1 _WIN32=1 tcc
    cp tcc tcc.exe
    gmake CONFIG_WIN32=1 _WIN32=1 libtcc1.a

_WIN32=1 has no effect, has it?


Building tiny_impdef is slightly harder but apparently the compiler
is happy enough with a copy of msvcrt.dll and kernel32.dll

windows system dlls are not necessary for compilation.

Putting tcc, libtcc1.a and the *dll in the same directory you can do

    ./tcc -I win32/include -L .  myprog.c

That should be
     ./tcc -B win32 myprog.c


and produce myprog.exe which runs fine under windows.

Perhaps we could add a Makefile target to build the cross compiler ?

Well, we have "./configure --enable-cross" which builds cross compilers
for all targets.  It doesn't currently build libtcc1.a though and also
does not allow to set CONFIG_TCCDIR (config.h) individually, so you still
need to use the -B switch.  Patches to our "mob" branch are welcome, as
always ;)

--- grischka



_______________________________________________
Tinycc-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/tinycc-devel






reply via email to

[Prev in Thread] Current Thread [Next in Thread]