Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

GCC Compiler Finally Supplanted by PCC?

ScuttleMonkey posted about 7 years ago | from the all-good-things-must-end dept.

Programming 546

Sunnz writes "The leaner, lighter, faster, and most importantly, BSD Licensed, Compiler PCC has been imported into OpenBSD's CVS and NetBSD's pkgsrc. The compiler is based on the original Portable C Compiler by S. C. Johnson, written in the late 70's. Even though much of the compiler has been rewritten, some of the basics still remain. It is currently not bug-free, but it compiles on x86 platform, and work is being done on it to take on GCC's job."

cancel ×

546 comments

Sorry! There are no comments related to the filter you selected.

"Nothing for you to see here" indeed... (4, Interesting)

RLiegh (247921) | about 7 years ago | (#20637571)

I notice that TFS doesn't say that anyone is actually able to compile anything (other than PCC) with it. The BSD folks would love to have a BSD-licensed drop-in replacement for GCC; but it doesn't sound like this is it. Not yet at least.

Wake me up when you're able to use PCC instead of GCC to do a 'make world' (or ./build.sh or whatever).

Re:"Nothing for you to see here" indeed... (3, Insightful)

DiegoBravo (324012) | about 7 years ago | (#20637635)

...Wake me up when you're able to use PCC instead of GCC to do a 'make bzImage'

Interesting... (4, Insightful)

cromar (1103585) | about 7 years ago | (#20637669)

I really don't see any point in implementing a new C compiler under the BSD lisence. There's no reason to duplicate effort: it's not like the compiled binaries would be under the GPL. And any GPL libraries you link to, you wouldn't need to distribute (thus avoiding the GPL). So, really, there's no point in duplicating effort on a BSD lisenced compiler. Correct me if I'm wrong.

Re:Interesting... (4, Insightful)

everphilski (877346) | about 7 years ago | (#20637807)

Principle?

I don't know, I'm not a BSD user, but as much as RMS likes to claim that 'linux' is GNU/linux, maybe BSD users want their OS to be self reliant?

Would you like to compile Linux using a microsoft compiler? :)

Re:Interesting... (5, Insightful)

Anonymous Coward | about 7 years ago | (#20637983)

Would you like to compile Linux using a microsoft compiler? :)
If it produced the best code, why not? People already compile Linux using the Intel compiler.

Re:Interesting... (1)

everphilski (877346) | about 7 years ago | (#20638177)

Thanks for mentioning that. And might I mention principle is not the primary reason they are doing this - although I am sure it factors in. this post [slashdot.org] explains it rather well.

Re:Interesting... (2, Insightful)

Jeff DeMaagd (2015) | about 7 years ago | (#20638235)

The difference is that both are open source and no matter what level of hot air that RMS can emit, he can't force anyone to do anything other than abide by the license of his software.

He can't force people to change the name of Linux, it's just that people decided to go along with it on their own. The GNU/Linux thing was kind of retarded given that Linux distributions feature code from a lot of different licenses, and GNU is the only one that's mentioned?

Re:Interesting... (3, Insightful)

Tim C (15259) | about 7 years ago | (#20638329)

The GNU/Linux thing was kind of retarded given that Linux distributions feature code from a lot of different licenses, and GNU is the only one that's mentioned?

The justification I've usually seen for that is that GNU is the single biggest "contributor", as it were, particularly with respect to gcc, the command tools, etc. More than just that, though, it could be argued that without GNU, Linux would just be a kernel, with no user space to run. Of course, it could equally be argued that without Linux, the GNU user space tools would just be a nice collection of tools with no OS to run on...

Re:Interesting... (0)

Anonymous Coward | about 7 years ago | (#20638269)

If you compiled the kernel with a Microsoft Compiler would you get as a bonus an embedded web browser and media player?

The licence is just the top of the iceberg (3, Informative)

DiegoBravo (324012) | about 7 years ago | (#20637879)

"So, really, there's no point in duplicating effort on a BSD lisenced compiler. Correct me if I'm wrong."

From the discussion of TFA:

The licence is just the top of the iceberg [undeadly.org]

Re:The licence is just the top of the iceberg (1, Flamebait)

tknd (979052) | about 7 years ago | (#20638027)

"- The whole design of GCC is perverted so that someone cannot easily extract a front-end or back-end. This is broken by design, as the GPL people do believe this would make it easier for commercial entities to `steal' a front-end or back-end and attach it to a proprietary code-generator (or language). This is probably true. This also makes it impossible to write interesting tools, such as intermediate analyzers. This also makes it impossible to plug old legacy back-ends for old architectures into newer compilers."

Well that explains a lot. And here I was thinking that all modern compilers were designed correctly with a front-end and back-end. So much for academics.

Re:Interesting... (0, Flamebait)

FooBarWidget (556006) | about 7 years ago | (#20637907)

You are not wrong. The Free Software Foundation explicitly states that binaries produced by GCC are not covered by the GPL. [gnu.org] (Why people never read the GPL FAQ is beyond me.)

I can only think of two reason why they want to replace GCC with PCC:
1. Because they can.
2. Because they're anti-GPL zealots.

Re:Interesting... (2, Insightful)

WindBourne (631190) | about 7 years ago | (#20637987)

or
3. they object to the restriction on their freedom?

Look, I am a Linux user and Hacker, but even I understand BSD need to have their code be free.

Re:Interesting... (2, Funny)

mrchaotica (681592) | about 7 years ago | (#20638107)

You just restated point #2.

Re:Interesting... (1)

jimstapleton (999106) | about 7 years ago | (#20638233)

You can disagree with the GPL and not want a GPLed product, when there is an alternative, without being a zelot.

That being said, from what I gather, there currently is little reason to use PCC over GCC, though that may change in the future.

Re:Interesting... (2, Insightful)

Jose (15075) | about 7 years ago | (#20638211)

Look, I am a Linux user and Hacker, but even I understand BSD need to have their code be free.

to me, it is the GPL that ensures that the *code* remains free, while the BSD license ensures that it is the *user* that remains free.

I really like both licenses, but they serve different purposes, and it highlights the priorities of the different groups.

Re:Interesting... (1)

peterpi (585134) | about 7 years ago | (#20638141)

3) Because it's interesting to somebody who likes seeing how compilers work. "simple, fast and understandable".

TFA makes no claim about it 'going up against' gcc in any way (apart from an observation about speed of compilation). Compilers are intersting things to some people, that's all.

Your linux distribution quite possibly comes with tcc [bellard.free.fr] anyway. Is that a problem?

Re:Interesting... (0, Troll)

Score Whore (32328) | about 7 years ago | (#20637941)

You do realize that GCC was a duplication of effort? If it wasn't for licensing obsessives you'd still be using PCC right now.

Re:Interesting... (5, Interesting)

Anonymous Coward | about 7 years ago | (#20637951)

It has less to do with the license and more to do with GCC's increasingly spotty support for some of the hardware platforms that NetBSD and OpenBSD run on. That and GCC internals are a maintenance nightmare, and its development process is getting even less commmunity-driven than it was before (which was never that much). Asking for a new compiler warning might take anywhere from a day to years just to get a response. The license is definitely gravy though.

The BSD license that PCC is under, I understand, is actually a problem even to the BSD folks: PCC is actually extremely old (it was originally written for the PDP11!) and apparently it still carries the advertising clause.

Re:Interesting... (3, Insightful)

Brandybuck (704397) | about 7 years ago | (#20638077)

Reason 1) Avoid a monoculture

Reason 2) Competition

Reason 3) Choice

Reason 4) Tweak Stallman's nose

Why not? (1)

LWATCDR (28044) | about 7 years ago | (#20638091)

Really why not if they want to.
Maybe they thing they have a better idea.
Maybe the don't want to work under the FSF and the GPL.

It could be that they really don't like the direction that GPL is going. Sure right now programs compiled under the GCC don't have to be released under the GPL but when GPL V4 comes out that might change.

Or maybe they just don't want RMS to start ranting about how they should call BSD GNUBSD since the kernel and the user space programs are only part of an OS. It takes a compiler and things like KDE and GNOME to make a usable OS and given that without those GPL programs there couldn't be BSD the BSD should give GNU it's fair share of the credit.

Re:Interesting... (0)

Anonymous Coward | about 7 years ago | (#20638189)

Rather more useful would be a reimplementation of gperf [gnu.org] whose output could be used in non-GPL software. Or FSF could just bring the licensing of gperf into line with gcc, bison, etc.

Re:"Nothing for you to see here" indeed... (1, Informative)

Anonymous Coward | about 7 years ago | (#20637681)

In the story on Undeadly, one of the comments states that he was able to build OpenBSD's source for bin usr.bin usr.sbin & sbin with pcc. Seems just a little more until at least OpenBSD can be built using it (PCC is missing __attributes__ & some asm stuff IIRC)

Re:"Nothing for you to see here" indeed... (2, Interesting)

Sigismundo (192183) | about 7 years ago | (#20637701)

Indeed, the linked article says that PCC is 5-10 times faster than GCC, but currently performs only one optimization... What use is speed of compilation of the binaries produced are slower?

Re:"Nothing for you to see here" indeed... (1)

realthing02 (1084767) | about 7 years ago | (#20637835)

Testing/development work?

Seriously, i can't think of many good reasons, aside that you can build something faster, and possibly test it in a more timely fashion. i guess it's like using a cheap hammer versus a really nice hammer that hits the nail for you.

Re:"Nothing for you to see here" indeed... (1)

Score Whore (32328) | about 7 years ago | (#20637991)

What use is speed of compilation of the binaries produced are slower?


You know GCC doesn't generate the best code in the world, right? I take it you use intel's compiler for everything on your linux system?

How does one interpret that sentence, though? (1)

benhocking (724439) | about 7 years ago | (#20638019)

I took it to mean that it compiles code 5-10 times faster, but that compiled code itself is usually slower. Not having many optimizations explains both of those "features".

Re:"Nothing for you to see here" indeed... (3, Insightful)

MissP (728641) | about 7 years ago | (#20637739)

With respect to

"The BSD folks would love to have a BSD-licensed drop-in replacement for GCC"

could somebody provide a reference to verify that "the BSD folks" do in fact have such a desire?

Thanks!

Re:"Nothing for you to see here" indeed... (5, Interesting)

TheRaven64 (641858) | about 7 years ago | (#20638303)

This has been on Undeadly for a few days now. There was a very informative post by Marc Espie [undeadly.org] (who maintains GCC on OpenBSD) explaining this.

This has been a long time coming. If you've ever looked at GCC code, you'll be familiar with the feeling of wanting to claw your eyes out (I had to for an article on the new Objective-C extensions *shudder*). I am somewhat surprised it's PCC not LLVM, but it makes sense. OpenBSD wants a C compiler in the base system, that can compile the base system and produces correct code. Support for C++, Objective-C, Java and Fortran would all be better off in ports. PCC is faster than GCC, smaller than GCC, more portable than GCC, easier to audit than GCC, and already compiles the OpenBSD userspace. I wouldn't be surprised if it replaces GCC in the OpenBSD base system soon. If it does, GCC (or maybe LLVM) will still probably be one of the first things I install from ports, but I'd still regard it as a good idea.

The end of GNU ? (-1, Flamebait)

Anonymous Coward | about 7 years ago | (#20637575)


will this spell the end of the (childish) GNU moniker in Linux ?

Re:The end of GNU ? (1)

Arabani (1127547) | about 7 years ago | (#20637707)

Nope.

a) This new version of PCC is nowhere near production quality.

b) NetBSD != Linux

Re:The end of GNU ? (2, Funny)

Garridan (597129) | about 7 years ago | (#20638279)

Please. I think RMS would prefer, GNU/NetBSD != GNU/Linux. Obey the beard!

Re:The end of GNU ? (0)

Anonymous Coward | about 7 years ago | (#20637837)

will this spell the end of the (childish) GNU moniker in Linux ?
No, the GNU moniker is intended to reflect that the userland almost entirely comes from GNU projects and that's not likely to change - it's not just the compiler they're talking about. IMO the most significant one to justify GNU/Linux is the GNU C library.

Kind of depends... (4, Insightful)

KingSkippus (799657) | about 7 years ago | (#20637585)

...and most importantly, BSD Licensed...

Kind of depends on who you ask, doesn't it?

Re:Kind of depends... (1)

Tweekster (949766) | about 7 years ago | (#20637679)

They were stating their POV and their beliefs. Anyone else's opinion on the matter is irrelevant and unsolicited.

Re:Kind of depends... (1)

Surt (22457) | about 7 years ago | (#20637761)

They were stating their POV and their beliefs. Anyone else's opinion on the matter is irrelevant and unsolicited.
NB: Their opinion on the matter is also irrelevant and unsolicited.

Re:Kind of depends... (1)

Tweekster (949766) | about 7 years ago | (#20637799)

Not really, considering the main purpose for developing it was license based. It wasnt technological, it was ideological.

Re:Kind of depends... (1)

kartracer_66 (96028) | about 7 years ago | (#20637697)

Yeah, exactly. And I'm kind of wondering what the problem with having a GPL licensed compiler is anyway. How many people/companies have the skill or need to hack on a compiler?

Re:Kind of depends... (1)

Brandybuck (704397) | about 7 years ago | (#20638301)

If you go read the effing article, and the list thread, you'll see that the license is the least of their problems.

But when you do finally get down the priority list to the license, there's a reason for it. One goal of the free BSDs, particularly OpenBSD, is that the base/core system can be distributed in its entirety under an unrestricted license.

Not for NetBSD for sure (5, Funny)

gambolt (1146363) | about 7 years ago | (#20637621)

OK, so it compiles C on x86. What do I use when I want to compile objective C on my microwave?

Re:Not for NetBSD for sure (4, Informative)

Aladrin (926209) | about 7 years ago | (#20637961)

This got modded funny, but I'm sure it deserves insightful instead.

GCC compiles on a LOT of different architectures. Does PCC? Does it do as good a job at compiling? Can we plop our current GCC-compiled source on PCC and have it compile without huge headaches?

And what about these bugs that are even referenced in the summary? How could it POSSIBLY supplant GCC if it's that buggy? In fact, how could it have supplanted GCC if it hasn't taken GCC's place AT ALL yet?

Try these headlines:

GCC Compiler Finally Has 'Free' Competition
New Compiler To Supplant Gnu Compiler?
Battle of the licenses: Does the license of your compiler MATTER AT ALL!?

Re:Not for NetBSD for sure (1)

RLiegh (247921) | about 7 years ago | (#20638201)

>Can we plop our current GCC-compiled source on PCC and have it compile without huge headaches?

[i]Half[/i] the time you can't 'plop' your current GCC-compiled code onto a sun or intel compiler and have it compile without huge headaches -and to the degree that you [i]are[/i] able to have it compile is due only to intel and sun adding compatibility for GCC's increasingly bizarre and non-standard behavior (which would be fine, actually, except for the fact that GCC makes false claims of adhering to industry standards which they don't in practice adhere to).

Re:Not for NetBSD for sure (0)

Anonymous Coward | about 7 years ago | (#20638305)

grrrrr...
s/[i][/i]/ /g

Why is the license important? (1)

Albanach (527650) | about 7 years ago | (#20637625)

most importantly, BSD Licensed
Okay, if you run BSD I can see why the license is important, you want your software to run under the BSD license. But for the rest of us, what advantage does a BSD licensed compiler offer? It's not like GCC forces the GPL onto compiled software, does it?

For commercial software, pointing to the GCC source isn't that much of a burden if you need to distribute a compiler.

I'd have though the fact a compiler was faster and or lighter would be much more important than the license it uses. Why is that not the case?

Re:Why is the license important? (1)

peragrin (659227) | about 7 years ago | (#20637689)

>>For commercial software, pointing to the GCC source isn't that much of a burden if you need to distribute a compiler.

It's what MSFT does for Unix Services for Windows. the GPL components simply get acknowledged and pointed back at the developers.

Re:Why is the license important? (1)

Anonymous Conrad (600139) | about 7 years ago | (#20638151)

It's what MSFT does for Unix Services for Windows. the GPL components simply get acknowledged and pointed back at the developers.
Oh no they don't. Look on the CD under sources/Interix/gnu.

Re:Why is the license important? (1)

Bacon Bits (926911) | about 7 years ago | (#20637889)

I'd have though the fact a compiler was faster and or lighter would be much more important than the license it uses. Why is that not the case?
Proprietary software makers have said the same thing about the Free Software movement.

For the license wars! (1)

Xenographic (557057) | about 7 years ago | (#20638043)

Someone got pissed during the recent license flap when taunted with "yeah, if BSD is so great, why do you all use gcc?" or something like that. So they're trying to send the message to the GPL types that "we don't need you any more."

At least, that's my take on it.

Honestly, BSD vs. GPL has always struck me as one of the stupidest flame wars. It's like that phony debate between "great taste" and "more filling" only people take it seriously.

Personally, I'll license my own software under whichever I feel more appropriate for the task (and that could be either) and tell anyone who complains about it that they can go screw themselves with a rusty chainsaw.

Why? (1)

wizards_eye (1145125) | about 7 years ago | (#20637629)

Someone please elaborate. What makes this C compiler better than the one in GCC? (I am not asking about licensing issues)

Quick! (5, Funny)

perbu (624267) | about 7 years ago | (#20637639)

Someone relicense it under the GPL!

Re:Quick! (-1, Troll)

Anonymous Coward | about 7 years ago | (#20638299)

Oh goody, I just can't get enough of Theo De Rant -- I've been jonesing for a troll ever since Darl McBride realized it's better to shut the hell up.

GNUless Linux (0)

Anonymous Coward | about 7 years ago | (#20637641)

This is great, one more step towards GNUless Linux, and making RMS irrelevant!

Re:GNUless Linux (2, Insightful)

RLiegh (247921) | about 7 years ago | (#20637713)

Not really; you already have the sun and intel compilers for Linux (I've been told that the intel compiler has even been tweaked so you can build a bzImage with it).

But you're still stuck with using glibc if you want to be able to compile anything. You do have different libcs floating around, uclibc, etc; but they're all gnu and they're all meant for embedded market. I doubt you'd be able to recompile the linux kernel with any of them.

One OT clarification: (2, Informative)

Anonymous Coward | about 7 years ago | (#20637643)

"NetBSD's" pkgsrc is really everyone's pkgsrc [wikipedia.org] . Try it on what you're running right now.

It's my primary package manager on Interix, Mac OS X, Linux, and NetBSD.

Maybe someday (1)

phoenixwade (997892) | about 7 years ago | (#20637653)

Not a replacement for GCC anytime soon. I'm not sure why there was a need for a compiler licensed for BSD, but it's always nice to see options being developed for anything.

Answer (3, Insightful)

christurkel (520220) | about 7 years ago | (#20637665)

GCC Compiler Finally Supplanted by PCC?

No. Next question.

Re:Answer (1)

PadRacerExtreme (1006033) | about 7 years ago | (#20638067)

No. Next question.
No kidding. From the summary itself:

It is currently not bug-free, but it compiles on x86 platform, and work is being done on it to take on GCC's job.
I think they just answered themselves.....

Stupid waste of time (4, Insightful)

th0mas.sixbit.org (780570) | about 7 years ago | (#20637677)

Seriously. Let's duplicate the wheel twice: once for GPL, once for BSD, and then bicker amongst ourselves. Stuff like this stands in the way of actual progress being made. Neither side is right, I don't have a solution, but this is just dumb.

Re:Stupid waste of time (3, Funny)

sinnergy (4787) | about 7 years ago | (#20637733)

Your argument holds no water. If that were the case, one could make the same arguments about operating systems. Why bother developing Linux in an attempt to "keep up with the Jones'" when Windows already exists.

I'm just sayin'...

Re:Stupid waste of time (1)

th0mas.sixbit.org (780570) | about 7 years ago | (#20637865)

I think that such a generalization of my argument is also worthless :P.

Maybe I'm mistaken, but if PCC succeeds there is two outcomes:

- it is better than GCC. If this is the case, then its too bad the GNU folk cannot benefit from whatever it has that GCC doesn't. Not like they'll admit it's superiority I'd presume.

- it is identical or equal to GCC. Then its only benefit is licensing, and if it weren't for the licensing issue all of their effort could have been put towards building a single better compiler for open source.

Re:Stupid waste of time (1)

everphilski (877346) | about 7 years ago | (#20637893)

it is better than GCC. If this is the case, then its too bad the GNU folk cannot benefit from whatever it has that GCC doesn't. Not like they'll admit it's superiority I'd presume.

No, they will take it, remove the license and attribution, and relicense it GPLv3 :)

Re:Stupid waste of time (1)

Jeff DeMaagd (2015) | about 7 years ago | (#20637969)

I don't think your Windows vs. Linux things applies directly, in part because that's closed source vs. open source, rather than an open source compiler against another open source compiler.

I think the point was that it's hard to justify having two open source compilers for the same language. It's a lot of duplicated work with far less benefit given that the existing compiler has been doing a pretty good job and the "new" kid on the block isn't even ready for use.

So, hey. (0)

Anonymous Coward | about 7 years ago | (#20638205)

"I think the point was that it's hard to justify having two open source compilers for the same language. It's a lot of duplicated work with far less benefit given that the existing compiler has been doing a pretty good job and the "new" kid on the block isn't even ready for use."

Are you paying these people, that you might tell them what they can and can't develop?

Re:Stupid waste of time (1)

DrSkwid (118965) | about 7 years ago | (#20638215)

The correct solution is a world with more than one compiler in it.

The only place progress takes us is death.

*yawn* (4, Funny)

blackcoot (124938) | about 7 years ago | (#20637687)

call me when pcc does something useful, like, say, working.

Call you? (1)

catbutt (469582) | about 7 years ago | (#20637905)

Can't you just check in at slashdot here and there? If you post a number, I suppose I can try to remember, but geez....

Does it crash less? (0, Troll)

bogaboga (793279) | about 7 years ago | (#20637717)

I guess the question should be whether this compiler produces applications that crash less. In my experience, the crashes in current Linux applications are due to in large part, to GCC, though code quality also has something to do with these crashes.

Re:Does it crash less? (1)

h890231398021 (948231) | about 7 years ago | (#20637833)

In my experience, the crashes in current Linux applications are due to in large part, to GCC
Giving you the benefit of the doubt and assuming you're not a troll, can you elaborate on your "experience" from which you have concluded that crashes in current Linux apps are due to GCC? I'd say 99.99% of the crashes are due to bugs in the application code, not to bugs in GCC.

Re:Does it crash less? (1)

bogaboga (793279) | about 7 years ago | (#20638081)

...can you elaborate on your "experience" from which you have concluded that crashes in current Linux apps are due to GCC?...

Did you read my submission...or are you engaged in what I call syntax distortion? I did not say "...crashes are due to GCC...", what I said is that crashes are in large part due to GCC.

It would be helpful if you too, provided evidence to back up what you are saying. Watch this threade.

Re:Does it crash less? (1)

MadMidnightBomber (894759) | about 7 years ago | (#20638297)

Unless you have looked at some core dumps, then your "experience" is not worth very much. I haven't seen any problems with generated code with GCC since 1996. Sometimes it doesn't compile the latest and greatest C++, but it's never generated incorrect code for me.

Sounds like a challenge... (1)

Gordonjcp (186804) | about 7 years ago | (#20637719)

I think of it as if it shall be able to compile and run on PDP11 (even if it may not happen in reality).

Like I don't have enough things to spend my time on. Maybe I should finish my PDP11 page [kicks-ass.net] first.

How many compilers can we cram into a phone booth? (1)

elwinc (663074) | about 7 years ago | (#20637755)

The commit message gives a little bit of pcc's history:
. . .
The intention is to write a C99 compiler while still keeping it small, simple, fast and understandable. I think of it as if it shall be able to compile and run on PDP11 (even if it may not happen in reality). But with this in mind it becomes important to think twice about what algorithms are used.
OK, the onchip cache on my core 2 duo is many times larger than the full RAM on any PDP-11 I've ever heard of. So why should I be interested in a buggy compiler that wants to fit into tiny PDP-11 constraints? Maybe this compiler would be exciting if it were ported to an iPhone, but I fail to see why it's interesting in a linux environment.

It compiles? (1)

bcmm (768152) | about 7 years ago | (#20637759)

It is currently not bug-free, but it compiles
I realise that mean "it can compile", which is impressive, but that really does read like "it can be compiled", which I would have thought was a necessary prerequisite to this sort of discussion.

That's dumb. (4, Interesting)

imbaczek (690596) | about 7 years ago | (#20637775)

pcc will take YEARS to get the functionality and optimizations that gcc has. Even if it compiles slowly and sometimes generates dumb code.

Either way, they'd much, much better off if they imported LLVM and redirected their compiler brain power to clang [llvm.org] .

Is this a joke? (0)

Anonymous Coward | about 7 years ago | (#20637781)

Still struggling, still in debug, and only works on i386?

Is his submission claiming that "the replacement for gcc has arrived" a joke?

This sounds like good Senior Thesis at best.

Call me when it compiles something other than x86. (1)

NekoXP (67564) | about 7 years ago | (#20637783)

Well, that's fairly pointless that it only compiles x86 code. So, it basically means they're competing to make a compiler which is BSD licensed and compiles the most common processor out there, against the biggest GPL licensed compiler on the most common processor?

I really think some effort needs to be put in to support other processors like ARM, MIPS and PPC - after all, GCC is a hardly a diva for any of these (code generation is terrible) and they are not the fastest platforms either. This is where actual performance improvements and quality code generation would actually count for something.

LLVM / clang (4, Interesting)

sabre (79070) | about 7 years ago | (#20637787)

PCC is interesting, but it's based on technology from the 70's, doesn't support a lot of interesting architectures, and has no optimizer to speak of.

If you're interested in advanced compiler technology, check out LLVM [llvm.org] , which is an ground up redesign of an optimizer and retargettable code generator. LLVM supports interprocedural cross-file optimizations, can be used for jit compilation (or not, at your choice) and has many other capabilities. The LLVM optimizer/code generator can already beat the performance of GCC compiled code in many cases, sometimes substantially.

For front-ends, LLVM supports two major ones for C family of languages: 1) llvm-gcc, which uses the GCC front-end to compile C/C++/ObjC code. This gives LLVM full compatibility with a broad range of crazy GNU extensions as well as full support for C++ and ObjC. 2) clang [llvm.org] , which is a ground-up rewrite of a C/ObjC frontend (C++ will come later) that provides many advantages over GCC, including dramatically faster compilation and better warning/error information.

While LLVM is technologically ahead of both PCC and GCC, the biggest thing it has going is both size of community and the commercial contributors [llvm.org] that are sponsoring work on the project.

-Chris

Re:LLVM / clang (0, Flamebait)

samkass (174571) | about 7 years ago | (#20637869)

I was thinking the same thing about Apple's clang and why they didn't just use it instead. But the latest I've seen on clang seemed to indicate it was still in the early stages of development, and "replacement of GCC" was explicitly listed as a non-objective.

I think having a compiler that's not dependent on FSF's increasingly extremist political views, but it does seem like a lot of work for little actual benefit outside an "insurance policy".

Increasingly extremeist? (1, Insightful)

SuperKendall (25149) | about 7 years ago | (#20638069)

FSF's increasingly extremist political views

FSF's views have not changed over the years - they have remained consistent.

The reason they look "increasingly extremist" is because of other views on software freedom heading the other way, thus drawing an even greater contrast. That does not mean that the FSF views are the ones that are extreme...

If anything the FSF and RMS have shown themselves to be quite prescient in warning against dangers that have come to pass.

Re:Increasingly extremeist? (3, Insightful)

IamTheRealMike (537420) | about 7 years ago | (#20638173)

The reason they look increasingly extremist is because the FSF tends to make up policies and rules which bind GCC development in order to avoid the theoretical risk of making GPL violations easier. As compiler technology advances these restrictions have become increasingly burdensome, in particular, several of the technical advantages of LLVM are things the GCC team would have liked to do but RMS nixed because it would have made it too easy to circumvent the license.

Re:Increasingly extremeist? (1)

SuperKendall (25149) | about 7 years ago | (#20638333)

The problem though is that over time many risks people previously deemed as theoretical have come to pass.

It's great that other software like LLVM proceeds forward, I'm not one to say that there's no place for other projects - but you always need something like GCC that takes a harder stance to fall back on in case there are problems down the line.

Re:LLVM / clang (2, Interesting)

sabre (79070) | about 7 years ago | (#20638117)

clang is fairly early on, but so is PCC. PCC supports almost no GCC extensions (e.g. inline asm, attributes, etc), doesn't support C99 fully, and has many other problems. The clang parser is basically done for C and clang has support for several other source analysis tools other than "just code generation". See the slides linked of [llvm.org] http://clang.llvm.org/ [llvm.org] for details. I'd expect clang to be fully ready for C use in the next year.

llvm-gcc is quite mature (it has built huge amounts of code, including apps like Qt and Mozilla), supports C/C++/ObjC and bits of FORTRAN/Ada if that is your thing. Using llvm-gcc you get the advantages of the LLVM optimizer and code generator with the GCC front-end.

-Chris

End of GPL, Doom, Gloom, etc... Woah, girls? Neat! (0)

Anonymous Coward | about 7 years ago | (#20637797)

Wow, the end of GCC; I thought I'd never see it. Looks like there's nothing left for us GPL guys to do but stop writing software and get real lives.

I hear, out there I mean, there are girls? Is that true?

PCC vs GCC (-1, Troll)

Anonymous Coward | about 7 years ago | (#20637829)

It is official. Netcraft now confirms: *BSD is dying

One more crippling bombshell hit the already beleaguered *BSD community when IDC confirmed that *BSD market share has dropped yet again, now down to less than a fraction of 1 percent of all servers. Coming on the heels of a recent Netcraft survey which plainly states that *BSD has lost more market share, this news serves to reinforce what we've known all along. *BSD is collapsing in complete disarray, as fittingly exemplified by failing dead last [samag.com] in the recent Sys Admin comprehensive networking test.

You don't need to be the Amazing Kreskin [amazingkreskin.com] to predict *BSD's future. The hand writing is on the wall: *BSD faces a bleak future. In fact there won't be any future at all for *BSD because *BSD is dying. Things are looking very bad for *BSD. As many of us are already aware, *BSD continues to lose market share. Red ink flows like a river of blood.

FreeBSD is the most endangered of them all, having lost 93% of its core developers. The sudden and unpleasant departures of long time FreeBSD developers Jordan Hubbard and Mike Smith only serve to underscore the point more clearly. There can no longer be any doubt: FreeBSD is dying.

Let's keep to the facts and look at the numbers.

OpenBSD leader Theo states that there are 7000 users of OpenBSD. How many users of NetBSD are there? Let's see. The number of OpenBSD versus NetBSD posts on Usenet is roughly in ratio of 5 to 1. Therefore there are about 7000/5 = 1400 NetBSD users. BSD/OS posts on Usenet are about half of the volume of NetBSD posts. Therefore there are about 700 users of BSD/OS. A recent article put FreeBSD at about 80 percent of the *BSD market. Therefore there are (7000+1400+700)*4 = 36400 FreeBSD users. This is consistent with the number of FreeBSD Usenet posts.

Due to the troubles of Walnut Creek, abysmal sales and so on, FreeBSD went out of business and was taken over by BSDI who sell another troubled OS. Now BSDI is also dead, its corpse turned over to yet another charnel house.

All major surveys show that *BSD has steadily declined in market share. *BSD is very sick and its long term survival prospects are very dim. If *BSD is to survive at all it will be among OS dilettante dabblers. *BSD continues to decay. Nothing short of a miracle could save it at this point in time. For all practical purposes, *BSD is dead.

Fact: *BSD is dying

but ... BSD *is* dying (0)

Anonymous Coward | about 7 years ago | (#20638051)

If all we get out of BSD is this kind of news and how Steve Jobs is going to save them, then BSD is dead.

Although competition is good... (1)

mi (197448) | about 7 years ago | (#20637847)

The leaner, lighter, faster, and most importantly, BSD Licensed

It seems profoundly stupid to stress out the BSD license as the "most important" feature of this new software.

GPL may not be as free as BSD-license, but one needs to be a real zealot to switch based primarily on this reason. I hope, FreeBSD will wait for it to work on other platforms and only switch because it is "leaner, lighter, and faster".

We need to replace gcc ... why? (3, Interesting)

joe_n_bloe (244407) | about 7 years ago | (#20637929)

Let me get this straight. A compiler that has been production-quality for over 15 years, compiles everything on every architecture, and has been continuously improved every minute of its existence needs to be replaced by ... Son of pcc? Because of a license?

Sure, I prefer BSD-style licenses, and so do some other people, but what drives gcc development is the GNU license. I think I'll stick to the compiler that's debugged. Oh, that's right, I forgot, it comes with a debugger too. If you like that sort of thing.

"production-quality"? - not quite (2, Informative)

pigiron (104729) | about 7 years ago | (#20638121)

GCC has been continuously changed not continuously improved. With each new chip that it optimizes for it seems to drop support for an older one. Plus it is dog slow.

Some real meat on PCC versus GCC? (0)

Anonymous Coward | about 7 years ago | (#20637955)

An article about a nearly-ready, buggy compiler under BSD license is nice, but really does NOT address how it really stacks up versus GCC. GCC has many options for tuning, optimization, use of things like SSE, etc. GCC also supports many different architectures. How does PCC compare: Price (both $0), license (GPL versus BSD), time to compile, performance of executable, optimization options, use of advanced processor features, 64-bit support, multiple architecture support, use for embedded applications, use for a kernel (BSD, Linux, other), etc.

GCC Compiler Finally Supplanted by PCC? No. (1)

xxxJonBoyxxx (565205) | about 7 years ago | (#20637973)

GCC Compiler Finally Supplanted by PCC?


I'd say "no." Here's why:

It is currently not bug-free, but it compiles on x86 platform...


Ken Thompson's also on the way to Lunix (1)

DrSkwid (118965) | about 7 years ago | (#20638057)

http://gsoc.cat-v.org/projects/kencc/ [cat-v.org]

How to Use the Plan 9 C Compiler (html [bell-labs.com] ps [bell-labs.com] pdf [bell-labs.com] )
Rob Pike
The starting point for C programming under Plan 9.

Plan 9 C Compilers (html [bell-labs.com] ps [bell-labs.com] pdf [bell-labs.com] )
Ken Thompson
The design and some internals of the compiler suite.

Man page [bell-labs.com]

bad title, wrong section, not frontpage material (0)

Anonymous Coward | about 7 years ago | (#20638063)

From the summary it's clear this only applies to BSD, but the title implies that it's about Linux (since Linux is the primary reason GCC exists). Thus, I think this should be filed under "bsd" or "flamebait" and taken off the front page. (The reason I think the article is flamebait is because it uses an inflammatory headline to incite Linux users.)

(By the way, didn't slashdot's used to have a bsd section?)

Yay for more compiler choices! (2, Insightful)

FranTaylor (164577) | about 7 years ago | (#20638093)

Even if a compiler generates miserably inefficient code, it is valuable if the code is correct. It ia a valuable tool to use for the verification of other compilers. It can also be used as part of a compiler bootstrapping process. Since its code size is probably a small fraction of GCC's, it may make a better teaching tool. If people are actually going to use it, given that it must coexist in a world with much more mature compilers, it will itself probably become much more mature in a relatively short period of time. GCC currently has no competitors in the free realm and has suffered from neglect in the past. A little competition may keep the developers on their toes and prevent another egcs.

Re:Yay for more compiler choices! (0)

Anonymous Coward | about 7 years ago | (#20638241)

TCC FTW [bellard.free.fr]

Leaner, lighter, faster... (1)

iBod (534920) | about 7 years ago | (#20638105)

Just how lean, light and fast does a C compiler have to be?

Surely, even the largest C projects compile in tolerable times on entry-level hardware these days.

I, for one, miss those long lunch-hours when I could call out "Another Martini, Barman! - I can do nothing until the operators page me!".

PCC Brought to by SC... (1)

davidsyes (765062) | about 7 years ago | (#20638149)

Johnson family of products. We will WAX GCC...

(Sorry, Johnson & Johnson popped into my mind as soon as I read that...hehehe). Too much Saturday AM TV in the 70's and 80's for me, I guess....

What about Minix's compiler? (0)

Anonymous Coward | about 7 years ago | (#20638153)

Tanenbaum's Amsterdam Compiler Kit [wikipedia.org] works really well, supports about 17 architectures, and includes frontends for C and Modula-2 (among others).

Ok then (0)

Anonymous Coward | about 7 years ago | (#20638155)

It is currently not bug-free, but it compiles on x86 platform, and work is being done on it to take on GCC's job."

Yeah, good luck with that... Hey, did anyone see the game last night?

Last night... (1)

pjr.cc (760528) | about 7 years ago | (#20638229)

I was seriously thinking last night... "what the world needs is another compiler".

It would have been nice to know what the non-licensing aspects of the pcc were, there are already a number of BSD licensed compilers. It is interesting in one of the posts about pcc someone goes on about how the evaluation of x = y changed in 3.x to 4.x of gcc and they were told "suck eggs" by the gcc team. What i dont get about that whole comment is how they think that's going to change with pcc. The original problem still exists - the c standard is unclear (but thats off the point a bit).

It would be nice to see the effort perhaps pumped into something a little more worthwhile. But, rebuilding the wheel is anyone's prerogative, and as long as it makes you happy and perhaps solves a problem for someone, more power to ya! Compilers seemed to have become a bit of a topic of late which is interesting considering how over the last couple of years people have been working hard to abstract away from the actual compiler.

BSDs should not depend upon GPL (0)

Anonymous Coward | about 7 years ago | (#20638335)

Overall its a good idea. BSDs should not depend upon GPL.

I was a Linux fan and misguided/misunderstood freedom appreciator. After reading recent posts on GPL guys stripping down BSD license, I understood what is meant by freedom. What I followed so far was not freedom, its restrictions. Is conditional freedom a true freedom? Now I very much appreciate all BSDs, especially planning to switch to FreeBSD once it released Ver. 7.0.
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?