I don't mean exactly the same code but since cygwin is a flavor of posix system,
it should be possible to support it the way that MacOSX, linux, and *bsd are.
@David: ./configure works out of the box.
make goes well until it hits tccrun.c where there is no appropriate version
of rt_get_caller_pc() defined. I think an #ifdef for cygwin with the values
eip/ebp and rip/rbp could work:
make
gcc -o tccrun.o -c tccrun.c -DTCC_TARGET_X86_64 -I. -Wall -g -O0 -Wdeclaration-after-statement -Wno-deprecated-declarations -Wno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -Wno-unused-result -Wno-uninitialized -fno-strict-aliasing
tccrun.c: In function 'rt_get_caller_pc':
tccrun.c:544:33: error: 'mcontext_t {aka struct __mcontext}' has no member named 'gregs'
*paddr = uc->uc_mcontext.gregs[REG_RIP];
^
tccrun.c:544:40: error: 'REG_RIP' undeclared (first use in this function)
*paddr = uc->uc_mcontext.gregs[REG_RIP];
^
tccrun.c:544:40: note: each undeclared identifier is reported only once for each function it appears in
tccrun.c:555:29: error: 'mcontext_t {aka struct __mcontext}' has no member named 'gregs'
fp = uc->uc_mcontext.gregs[REG_RBP];
^
tccrun.c:555:36: error: 'REG_RBP' undeclared (first use in this function)
fp = uc->uc_mcontext.gregs[REG_RBP];