Hi ports -- Attached are two ports, but they're really one unit.This is devel/libfirm, a graph based intermediate representation and compiler backend, and lang/cparser, a C99 parser and frontend for libFirm. Together, they make a C99 compiler.
--- pkg/DESCR: (devel/libfirm) The Firm library implements the Firm intermediate representation (ir). libFirm contains algorithms for construction of the SSA form directly from the attributed syntax tree. A set of analyses and optimization phases is provided. libFirm includes backends of varying maturities for IA32, AMD64, ARM, and other architectures. Features: * Completely graph-based, source- and target-independent intermediate representation in SSA form * Extensive set of optimizations * High-quality register allocation --- --- pkg/DESCR: (lang/cparser) cparser is a recursive descent C99 parser written in C99. It contains a preprocessor, lexer, parser, constructs an AST and does semantic analysis. It acts as a frontend to the libFirm intermediate representation library. This way optimization and code generation is performed. The compiler supports cross compilation to multiple target architectures with a command-line switch. It comes with driver logic for calling assemblers and linkers as well as parsing command-line options. This allows it to be a drop-in replacement for gcc or clang in many situations. ---The port is a git checkout from shortly after their latest release. This is because PIC for amd64 was the first thing added after the latest release, which allows the compiler to work on both amd64 and i386. There is an experimental backend for arm (including armv7) as well, so I enabled the build for arm but since I don't have any arm hardware, I have no idea if it works or not. Testing on arm much appreciated.
cparser is an extremely chatty compiler, even with no warnings explicitly turned on.
cparser built all the binaries in src/bin and src/usr.bin (except make [was able to be patched to build successfully], openssl, and which) on amd64 and i386, and I run tested a decent number of them and all the binaries I tested worked as expected.
OK? ~Brian
libfirm.tgz
Description: Binary data
cparser.tgz
Description: Binary data
