Step 0.
The point of this is to install the TinyCC compiler on the Darwin 8 computer operating sysytem, running on an i386 mcahine. Darwin 801 is the open source core of Apple's Mac OSX (TM) 10.4 Tiger operating system. The hottest operating system of 2005.
These are extremely rudimentary instructions, assuming you have an extensive experience with commandline and familiarity with the various terminology and jargon.
This was streamed on raw video here, and contains full unedited details of how it was done the first time:
https://www.youtube.com/watch?v=EspzMmGudcA
Step 1. Get Darwin 8 ISO (801) for i386 from Apple and install on a computer or Virtual Machine
https://opensource.apple.com/static/iso/
Follow this vid if you cant figure it out
https://www.youtube.com/watch?v=Ww8p7eTs8LI
Recommended is i386 because ppc is probably really slow and TinyCC might not even support it.
Step 2.
Get OBJCONV from https://github.com/vertis/objconv Build and install it to /usr/local/bin using gcc
Step 3
Get TinyCC from http://www.tinycc.org and uncompress and untarit This is using 0.9.26 so all of these kludges will need altering if you use a different version.
Step 4 is to kludge the TinyCC configure and Makefile to work on Darwin8 (see the kludge.diff below)
Step 5 is to kludge some of the c code to build on Darwin8 (see the kludge.diff below)
Step 6 is to build by running 'make'
Step 7 is to test basic compilation by running 'make test' this uses Tinycc in a special mode with the '-run' flag which means, basically that its not actually linking a binary, its running the file in place. Cool but we can go farther. Make install to put it under /usr/local/bin and keep going.
Step 8 is to start using TinyCC -c to create object files and then bodge together an executable using objconv, strip, and ld in a very unusual manner that is probably a gigantic security hole. (see build.sh, below in this gist)
Step 9 is to try out some C programs.
First you can try toy programs, like 'code golf' to print the Icelandic flag.
http://codegolf.stackexchange.com/questions/85141/draw-the-national-flag-of-iceland
As you can see in the video linked above, I was able to compile Apples version of 'wc', the Un*x "word count" program to count the number of words in Sophocle's play Antigone downloaded from MIT, English translation R.C.Jebb
http://opensource.apple.com/source/text_cmds/text_cmds-47/wc/ http://classics.mit.edu/Sophocles/antigone.pl.txt
Step 10.
Imagine.
Below is some hints of the textfiles from the video.
First, a kludge bash script that will take a .c file and build a working executable
Second, a diff to show the kludges to the config and Makefile and .c file of Tinycc
Thanks for reading.
interesting, and is the tcc built with this way can then build itself?