[Top][All Lists]

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

Re: [Tinycc-devel] How I can compile tcc under cygwin?

From: Gerrit P. Haase
Subject: Re: [Tinycc-devel] How I can compile tcc under cygwin?
Date: Sun, 25 Sep 2005 17:40:19 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915

PerfectDark wrote:

PerfectDark wrote:

Tcc compiles under linux perfectly, but compilation process under
cygwin failed with message `ldl not found' and strange errors in bcheck.c... After editing tcc.c and removing ldl option I could get
tcc.exe and libtcc1.a, but this result may be incorrect.
Can someone help me?

$ make
gcc -O2 -g -Wall -mpreferred-stack-boundary=2 -march=i386 -falign-functions=0 -fno-strict-aliasing -o tcc tcc.c -ldl
tcc.c:46:26: sys/ucontext.h: No such file or directory
Hmmm, can you help me?  The file sys/ucontext.h is missing, there is no
such file or directory in Cygwin.  There is no support for Cygwin in
There is e.g. this in tcc.c:
#warning add arch specific rt_get_caller_pc()


I think I can help you now.
Yesterday I not only compiled tcc, but I even could compile tcc with tcc
(without cygwin1.dll)!

However, this is not a Cygwin version but native Windows then.

To compile tcc use following config.h:

// config.h

#define CONFIG_TCCDIR "/usr/local/lib/tcc"
#define GCC_MAJOR 3
#define HOST_I386 1
#define TCC_VERSION "0.9.23"

#define TCC_TARGET_PE 1

#ifndef WIN32
#define WIN32

Sigh.  I want Cygwin support for a real Cygwin version of tcc which will
understand Cygwin mounts and so on.  A native Windows version is already
available.  To build this just use the provided support, just one change
in config.mak is needed, instead of
use this
CC=gcc -mno-cygwin

$ ./configure --enable-mingw32 --prefix='/as/you/like/it'
$ make

This builds also the library.

No other changes needed for the native Windows version.
Well, not really, `make test` fails to compile the test with tcc, this
needs to be fixed.

Once real Cygwin support is included I would include tcc in the Cygwin


reply via email to

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