Menu

Tree [r137] /
 History

HTTPS access


File Date Author Commit
 cygwin 2022-12-17 cjullien [r130] Change TARGETOS to WIN32 name in generated conf...
 macOS 2022-12-26 cjullien [r134] Make universal binary on macOS arm64
 make 2020-01-24 cjullien [r44] DIRENT was set but not used
 ports 2023-01-17 cjullien [r135] Simplify 'make' script
 wine 2024-02-20 hermantenbrugge [r137] Update for bt-log
 AUTHORS 2020-01-26 cjullien [r45] Add New BSD LICENSE and AUTHORS
 LICENSE 2020-01-26 cjullien [r45] Add New BSD LICENSE and AUTHORS
 README 2022-12-26 cjullien [r132] Add macOS directory for pending macOS work made...
 get-tinycc.sh 2022-12-26 cjullien [r134] Make universal binary on macOS arm64

Read Me

This TinyCC side project contains scripts, Makefiles and other tools
to easily compile TinyCC on Windows. Currently, it contains bootstrap
Makefile for:

== Cygwin 32/64 native compiler (Cygwin is not required to run the compiler).

Build native TinyCC using Cygwin and gcc for bootstraping.

$ git clone git://repo.or.cz/tinycc.git
Cloning into 'tinycc'...
$ cd tinycc/win32
#
# Get Makefile for cygiwn from wintcc project
#
$ svn cat svn://svn.code.sf.net/p/wintcc/svn/cygwin/Makefile > Makefile
$ make
# Stage 1
stage1: Bootstrapping 32bits and 64bits tools with gcc -m64
stage1: Building lib/libtcc1-32.a with tcc -m32
stage1: Building lib/libtcc1-64.a with tcc -m64
# Stage 2
stage2: Rebuild using tcc itself - default 64bits
stage2: Building lib/libtcc1-32.a with tcc -m32
stage2: Building lib/libtcc1-64.a with tcc -m64
# Stage 3
stage3: Rebuild using tcc itself - default 64bits
stage3: Building lib/libtcc1-32.a with tcc -m32
stage3: Building lib/libtcc1-64.a with tcc -m64
# Build is OK: stage2 == stage3
256 -rwxrwxr-x+ 1 me None 262144 Oct 25 09:20 i386-win32-tcc.exe
324 -rwxrwxr-x+ 1 me None 329728 Oct 25 09:20 tcc.exe
324 -rwxrwxr-x+ 1 me None 329728 Oct 25 09:20 x86_64-win32-tcc.exe
$ make test
make[1]: Entering directory '/cygdrive/f/tinycc/tests'
------------ hello-exe ------------
/cygdrive/f/tinycc/win32/tcc ../examples/ex1.c -o hello && ./hello || (set -x; ../tcc -vv; ldd ../tcc; exit 1)
Hello World
------------ hello-run ------------
/cygdrive/f/tinycc/win32/tcc -run ../examples/ex1.c || (set -x; ../tcc -vv; ldd ../tcc; exit 1)
Hello World
...
PPTest 19 ...
PPTest 20 ...
PPTest 21 ...
PPTest pp-counter ...
$ make tarball
-rw-rw-r--+ 1 None 725868 Apr 11 06:33 tcc-0.9.27-x86_64-win32.tar.gz
-rw-rw-r--+ 1 None 761423 Apr 11 06:33 tcc-0.9.27-x86_64-win32.zip

You can install the .tar.gz or .zip standalone tcc native compiler archive on
any Windows machine.

== wine (courtesy of Herman ten Brugge)

$ git clone git://repo.or.cz/tinycc.git
Cloning into 'tinycc'...
...
$ cd tinycc
$ mkdir wine
$ cd wine
$ svn cat svn://svn.code.sf.net/p/wintcc/svn/wine/Makefile > Makefile
$ make
stage1: Bootstrapping 32bits and 64bits tools with gcc -m64
Building lib/libtcc1-32.a with tcc -m32
Building lib/libtcc1-64.a with tcc -m64
Rebuild using tcc itself - default 64bits
256 -rwxrwxr-x+ 1 me None 262144 Oct 25 09:20 i386-win32-tcc.exe
324 -rwxrwxr-x+ 1 me None 329728 Oct 25 09:20 tcc.exe
324 -rwxrwxr-x+ 1 me None 329728 Oct 25 09:20 x86_64-win32-tcc.exe

== macOS (scripts and code tha may go to tcc repository)