Tax-deductible BSD Funding
BSD Fund Logo BSD Beastie

Portable C Compiler Fund

BSD Fund has partnered with software engineer and researcher Anders Magnusson to bring the Portable C Compiler "pcc" to 1.0 release status. Originally written by Stephen C. Johnson of Bell Labs in the 1970's, pcc is today valued by developers for its speed, simplicity, BSD license and of course, portability. Mr. Magnusson has worked with pcc since 2002 and been project maintainer since 2007.

We did it! pcc 1.0 Has Been Released

In the words of Anders Magnusson, "pcc should be a well-working compiler on i386 and amd64 on a number of OSes, including the BSD's, most Linuxes and also Microsoft Windows."

View the press release

At this point, pcc can build the majority of the FreeBSD, NetBSD and OpenBSD base systems and a book bounty is out to build the Linux kernel. Your testing of pcc is greatly appreciated!

Now comes the question of what's next: Beyond ongoing optimization, many of ppc's target architectures require updating and Anders has a road map for features that include a nearly-complete F77 compiler and mid-development C++ front end. BSD Fund welcomes your input as to which targets and features you believe are of the highest priority to the community. Write the Program Director with your idea and questions.

Any donations towards pcc at this time will be applied towards features that are nearest to completion.

pcc 1.0 Work Description

Strike-through entries are complete

Improved Static Single Assignment Form Conversion Functionality

Convert the expression trees in a function to SSA form and back.
SSA form conversions require:

  • Creating the Control-Flow Graph (CFG)
  • Building a dominator tree
  • Calculating the dominance frontiers
  • Inserting phi functions
  • Renumbering temporary variables

Improved C99 Functionality

  • Improved complex numbers: Support the _Complex and _Imaginary data types introduced in C99.
  • Improved dynamic arrays in function headers/prototypes: Support exists for automatic dynamic arrays but not yet fixed for function headers/prototypes.
  • Improved abstract dynamic declarations: Support the ability to use abstract declarators everywhere allowed.

Improved GCC Compatibility

  • attribute(): Support parsing of the attribute() syntax and test for commonly used extensions.
  • typeof(): Support the typeof() keyword.
  • Case number ranges: Support giving number ranges to case statements.
  • Incomplete Enums: Support forward declaration of enums.
  • Unnamed struct/union fields: Support the use of unnamed members compatible with both GCC and the historical use of it.

AMD64 Port

Port the Portable C Compiler to the AMD64 architecture.

  • Implement code generation
  • Implement FPU code generation
  • Implement fPIC code generation

Budget

Total donations needed to complete the 1.0 work: $12,000
Donations received to date: $12,492

More information about the pcc project can be found at the pcc home page.

Copyright © 2007 – 2011 BSD Fund. All rights reserved.
BSD Daemon used with permission.