Skip to content

r-mutax/mcc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mcc : mutax's C Compiler

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

build mcc.

make

clean modules.

make clean

Usage

now mcc output only .asm file. so when compile C-file, you need two step.

  1. compile C-file to .asm file.
  2. 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

Command Option

-c : Specify compile C-Source file. -i : Set include directory. -o : Specify output file path.

Links to reference

C Compiler Book

ISO/IEC 9899:TC3

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published