SCC (Simple C Compiler) is a portable toolchain that can be compiled on any UNIX system out of the box. The main target of the project is simplicity and portability. SCC is mainly written in C, putting special interest to keep the code C99 portable and with a small size. This is a work in progress project, and a lot of work is still required for some use cases. Any help would be really appreciated.

SCC tries to implements tools equivalent to classical UNIX cc, cpp, make, as, ld, ar, nm, ranlib, size and strip, and GNU objdump and objcopy. Not all of them have the same maturity level, and some of them are currently just a draft. SCC also provides a pure C99 libc designed to be simple and easily portable.

The internal libc is used for bare metal systems (an example of this use case can be found in Arm Trusted Firmware) or for systems that lack a system libc (like for example in the case of z80). Retargeting the libc requires implementing less than 10 primivites (usually syscalls). SCC can be used with the system libc, providing full POSIX compability in Linux using musl, and the native OpenBSD and NetBSD libcs.

Get started

Browse the source and clone it at git://git.simple-cc.org/scc. Compiling the project is as simple like:

$ make PREFIX=$HOME config
$ make
$ make install

If the PREFIX macro is not specified in the config step then it will point to /usr/local by default. For more information about how to build SCC, you can look at the README file.

Some configurations of SCC require having the QBE executable in the PATH, whose version must support common storage which was incorporated after the commit 8ded7a5, but it is not part of a stable release of QBE yet.

Community

SCC logo

The SCC logo is inspired from The Ingenious Gentleman Don Quixote of La Mancha, more precisely in the Quixote's attack on some windmills which he believes to be ferocious giants. Quoting the Wikipedia:

Quixotism is impracticality in pursuit of ideals, especially those ideals manifested by rash, lofty and romantic ideas or extravagantly chivalrous action. Quixotism is usually related to "over-idealism", meaning an idealism that doesn't take consequence or absurdity into account. It is also related to naive romanticism and to utopianism

These paragraphs reasonably illustrate the spirit of the SCC project.