mcc is a simple C Compiler created with the goal self-hosting(compiler compile compiler own). mcc compile C program and output assembler for x86-64 witch is written by Intel-syntax.mcc support only c99.
This project my learning project that C Language and low-layer programing.This project reference to C Compiler book is written by Rui Ueyama @rui314.
mcc means mutax's C Compiler.
And last, I thanks a lot to @rui314 author C Compiler book.
build mcc.
make
clean modules.
make clean
now mcc output only .asm
file.
so when compile C-file, you need two step.
- compile C-file to .asm file.
- assemble .asm file with
cc
command or another assembler.
mcc -c source.c -i /usr/include_dir -o out.asm
cc -o a.out out.asm
-c
: Specify compile C-Source file.
-i
: Set include directory.
-o
: Specify output file path.