"gifcc" is a self-hosted C compiler written by gifnksm.
- emit x86_64 assembly (AT&T syntax or Intel syntax)
- self-hosted
- Many C11 features
- Some GNU syntax extension
gifcc build process has 3 stages.
- stage1: gifcc binary built with system's C compiler (gcc)
- stage2: gifcc binary built with stage1 gifcc
- stage3: gifcc binary built with stage2 gifcc
If gifcc compiles C source code correctly, stage2 binary and stage3 binary will be identical.
- C development tools (gcc, GNU Make, ...)
- python3
- TMSU (for running c-testsuite)
-
Build stage1, 2, 3 compiler
$ make stage1 ... $ make stage2 ... $ make stage3 ...
-
Run basic tests for each stages
$ make stage1-test ... $ make stage2-test ... $ make stage3-test ...
-
Run all tests for each stages
$ make stage1-test-full ... $ make stage2-test-full ... $ make stage3-test-full ...