Skip to content

Latest commit

 

History

History
86 lines (65 loc) · 2.99 KB

README.md

File metadata and controls

86 lines (65 loc) · 2.99 KB

NOTE: THIS PROJECT IS ON VERY EARLY STAGE

(mirrored on GitHub)

builds.sr.ht status

cproc is a C11 compiler using QBE as a backend. It is released under the ISC license.

Several GNU C extensions are also implemented.

There is still much to do, but it currently implements most of the language and is capable of building software including itself, mcpp, gcc 4.7, binutils, and more.

It was inspired by several other small C compilers including 8cc, c, lacc, and scc.

Requirements

The compiler itself is written in standard C11 and can be built with any conforming C11 compiler. and Rust compiler (which is cargo and rustc)

Supported targets

This fork of cproc work with new qbe compat implementation, which named as qberust. qberust has DAG and DSL(like LLVM's tablegen) based selection algorithm to implement retargetable instruction selection. currently, there is no target is supported. and we are planning to support few targets first in qberust.

Planned targets

  • Very basic extensions with x64 archtecture
  • General ARM64 architecture (without any extensions)
  • General x86 archtecture (without any extensions)

What's missing

  • Digraph and trigraph sequences (6.4.6p3 and 5.2.1.1, will not be implemented).
  • Wide string literals (#35).
  • Variable-length arrays (#1).
  • volatile-qualified types (#7).
  • _Thread_local storage-class specifier (#5).
  • long double type (#3).
  • Inline assembly (#5).
  • Preprocessor (#6).
  • Generation of position independent code (i.e. shared libraries, modules, PIEs).

Mailing list

cproc Team There is a mailing list at ~mcf/cproc@lists.sr.ht. Feel free to use it for general discussion, questions, patches, or bug reports (if you don't have an sr.ht account).

Issue tracker

Please report any cproc related issues to https://todo.sr.ht/~mcf/cproc.

Contributing

Patches are greatly appreciated. Send them to the mailing list (preferred), or as pull-requests on the GitHub mirror.