Topic: NetBSD: PCC compiler in CVS

Of course it's a 'NetBSD thing' at the moment, but maybe it's a viable option in the long run for all of the BSD.

Anders Magnusson's BSD-licensed pcc compiler has been imported into CVS. He wrote to NetBSD's tech-toolchain list:

It is not yet bug-free, but it can compile the i386 userspace. The big benefit of it (apart from that it's BSD licensed, for license geeks :-) is that it is fast, 5-10 times faster than gcc, while still producing reasonable code. The only optimization added so far is a multiple-register-class graph-coloring register allocator, which may be one of the best register allocators today. Conversion to SSA format is also implemented, but not yet the phi function. Not too difficult though, after that strength reduction is high on the list.

OpenBSD Journal

Would be nice to see support from all of the BSD smile

F!XMBR

Freedom is the sure possession of those alone who have the courage to defend it. --Pericles

Re: NetBSD: PCC compiler in CVS

If they can keep up the development, this sounds like a great project. Is anyone running NetBSD willing to do some benchmarks of gcc against pcc?

Re: NetBSD: PCC compiler in CVS

it is fast, 5-10 times faster than gcc

I assume pcc is 5-10 faster when compiling?
How about program execution? Is pcc faster or slower than gcc?

Trust me, I know what I'm doing.

Re: NetBSD: PCC compiler in CVS

Well, the big issue, even more than efficiency, might turn out to be legal/political.  GCC is gnu code, and they are going into that GPLv3 thing which apparently, no one but them want.  Apparently, it can eventually result in some legal hassles.

Ironic that the Gnu folks, so insistant on opensource, are making it more difficult to use opensource.  Sort of turns into something like MS, as if, rather than being at opposite ends of a line, they're simply two adjacent points on a circle.

Even Linus, from what I understand, doesn't want GPLv3.

<@andre> i would be so much more efficient if i wasn't so stupid

Re: NetBSD: PCC compiler in CVS

scottro wrote:

Sort of turns into something like MS, as if, rather than being at opposite ends of a line, they're simply two adjacent points on a circle.

Yup, Open Source is great, but you can only use it the way we want you to use it.  No wonder the FreeBSD community is wanting to take on Linux.

Carpetsmoker wrote:

How about program execution? Is pcc faster or slower than gcc?

You don't want pcc to generate code too radically different than gcc.  Compatibility at this point is more important.

Re: NetBSD: PCC compiler in CVS

I have long said that a BSD licensed compiler is something the BSDs need - and perhaps one is emerging!?

"UBER" means I don't drink the coffee... I chew the beans instead
             -- Copyright BSDnexus

Re: NetBSD: PCC compiler in CVS

TenDRA uses a BSD license, although all code from before 1998 seems to use a different (but permissive) license.
From the tendra wikipedia page:
"There have been efforts to port the FreeBSD kernel to this compiler."

No idea on status/usability of this project though...

And from the FreeBSD faq funnies smile :
"Thirty-one to point out that the new lightbulb would shine 0.364% brighter if compiled with TenDRA (although it will have to be reshaped into a cube), and that FreeBSD should therefore switch to TenDRA instead of GCC;"

Last edited by Carpetsmoker (2007-09-17 23:36:29)

Trust me, I know what I'm doing.