drh/lcc
FreeThe lcc retargetable ANSI C compiler
FreeFree tier
About drh/lcc
lcc is a retargetable ANSI C (C89) compiler designed to be adapted to multiple target architectures. Version 4.2 is the latest release, described in the book 'A Retargetable C Compiler: Design and Implementation' (Addison-Wesley, 1995). It supports compilation for Alpha, MIPS, SPARC, x86, and other platforms, and is distributed as open source under a permissive license.
Key Features
Retargetable: supports Alpha, MIPS, SPARC, x86 and other architectures
ANSI C (C89) compiler
Open source with permissive license
Comes with documentation and installation guide
Version 4.2 with significant differences from 3.x
Pros & Cons
Pros
- Highly retargetable compiler architecture
- Well-documented design and implementation in a textbook
- Free and open source with a permissive license
- Supports several architectures out of the box
Cons
- Only supports C89 (ANSI C), not later C standards
- Version 4.2 is incompatible with version 3.x
- May not be actively maintained or updated
- Limited documentation for end users beyond installation
Best For
Compiling C89 source code for embedded systems and multiple platformsLearning compiler design and retargetabilityAcademic research in compilation techniquesPorting C programs to legacy or custom architectures
FAQ
What is lcc?
lcc is a retargetable ANSI C compiler, currently at version 4.2. It can be adapted to compile C89 code for multiple target architectures such as Alpha, MIPS, SPARC, and x86.
Is lcc free to use?
Yes, lcc is distributed as open source. The CPYRIGHT file describes the conditions under which you can use, copy, modify, and distribute lcc or derived works.
How do I install lcc?
Installation instructions are provided in the doc/install.html file included in the distribution.