tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] win32 port


From: Fabrice Bellard
Subject: Re: [Tinycc-devel] win32 port
Date: Thu, 14 Oct 2004 12:07:07 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040803

Hi,

Unless more people want MS VC++ support, I am relunctant to merge VC++ specific patches as I cannot test them. Why do you use _open() instead of open() ? Would the O_BINARY flag improve things ?

Now that there is an example to output another format than ELF, maybe someone will add PECOFF support !

Fabrice.

PS: Try to send 'diff -u' patches, they are easier to read...

TK wrote:
Fabrice,

Good news!  The C67 port seems to compile, run, and generate correct C67
code.

Below is a diff of the directory I was testing in.

The changes to tcccoff.c I belive are all straighforward bugs and should be
incorporated.

The rest are make/header/compiler issues which you may have a better way to
address.  There are a couple of linux headers that don't seem to be required
by tcc but give problems for MinGW (or MS VC++).  Similarly there are
references to "long long".  Also a few minor compiler issues.

I couldn't find a good way to debug the MinGW generated exe.  Is there one?
The only thing I could find is a command line gdb.  So I resorted back to MS
VC++ to compile and debug.  It seemed too easy.  I just made an empty
project, inserted tcc.c and it compiled an ran!



Here is the process I went through on my Windows Machine (possibly useful to
someone as ignorant of Linux as me):

1 - Install Cygwin (including development tools)
2 - Install MinGW
3 - from Cygwin prompt checkout tcc with:
        cvs -z3 -d:ext:address@hidden:/cvsroot/tinycc co tinycc
4 - I resorted to editing the configure script to force mingw32="yes"
5 - from Cygwin prompt: configure
6 - from windows cmd prompt: cd to where CVS put the files (cd
C:\cygwin\home\TK\tinycc)
6 - from windows cmd prompt: put Mingw\bin in your path=$path$;c:\mingw\bin
7 - from windows cmd prompt: mingw32-make.exe C67-tcc.exe
8 - from windows cmd prompt: C67-tcc.exe -g -nostdlib test.c -o test.out


Let me know your thoughts.

Thanks

TK




reply via email to

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