Hi everyone,

I would like to share a project I have been working on: **TCCygwin**, a
port of TinyCC targeting the Cygwin runtime on Windows.

Project: https://github.com/Muras69/TCCygwin

The goal was to make TCC compile and run native Cygwin/POSIX programs
directly, rather than merely producing Windows binaries.

Some results so far:

* **Fully self-hosting:** the compiler can be bootstrapped through a
4-stage native bootstrap process using a batch script.
* **Cygwin/POSIX runtime support:** TCC can compile and execute code using
Cygwin headers such as `<unistd.h>`, `<signal.h>`, and `<pthread.h>`.
* POSIX functionality has been tested with working `fork()`, anonymous
pipes, `wait()`, and `pthread_mutex_timedlock()`.
* The resulting TCC package is approximately **2 MB** unpacked.
* It can generate small working executables, including examples around **9
KB**, dynamically linked against `cygwin1.dll`.
* The port makes extensive use of the current bleeding-edge `mob` branch.

One particularly interesting part of the work was getting TCC to deal with
the Cygwin/Newlib header and library environment correctly while still
retaining TCC's small footprint and self-hosting capability.

I thought this might be interesting to the TCC developers and contributors,
especially from the perspective of how TCC can be adapted to a POSIX
compatibility environment such as Cygwin.

Feedback, technical comments, and suggestions would be very welcome.

Best regards,
Muras
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to