Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Programming Operating Systems IT Technology BSD

GCC Compiler Finally Supplanted by PCC? 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."
This discussion has been archived. No new comments can be posted.

GCC Compiler Finally Supplanted by PCC?

Comments Filter:
  • by RLiegh ( 247921 ) on Monday September 17, 2007 @11:06AM (#20637571) Homepage Journal
    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: (Score:3, Insightful)

      by DiegoBravo ( 324012 )
      ...Wake me up when you're able to use PCC instead of GCC to do a 'make bzImage'
      • ...Wake me up when you're able to use PCC instead of GCC to do a 'make bzImage'

        You bring up a good point. For years I have been looking for an open source compiler thats about the same quality as GCC, but is anything but GCC. I'm not too picky about the politics, as long as there a different set of politics from the GCC politics. I had great hope for Open Watcom [openwatcom.com], but the license was bad enough for debian to consider it non free, and they are not actively trying to be an alternative to GCC. Its quite a shame, but I really don't blame them. Technically Watcom is about ready for primetime on linux,they just need to get enough people to periodically try to compile there pet open source linux program with it and send a "I cant get this to work" mail to the list, but no one seems to care. PCC, on the other hand has a much larger set of people that have a reason to like PCC for reasons other than its not gcc./p>

        • by szo ( 7842 ) on Monday September 17, 2007 @12:50PM (#20639579)
          I don't follow politics, so care to explain what's wrong with gcc's politics? Or, what _is_ gcc's politics?
          • Re: (Score:3, Interesting)

            by j-pimp ( 177072 )

            I don't follow politics, so care to explain what's wrong with gcc's politics? Or, what _is_ gcc's politics?

            I honestly don't know. However, it is an old project maintained by people. They have very specific ideas of how things should work, just like linus has very specific ideas about development (no C++ code in the kernel, you could use something besides GIT, but you would be an idiot, etc.)

            Now I don't know much about the inner workings of GCC or Watcom, but I do know this. Several years ago I tried making a linux to windows cross compiler and failed. I think I put a decent amount of effort into my attempts

            • Re: (Score:3, Informative)

              by pthisis ( 27352 )

              Several years ago I tried making a linux to windows cross compiler and failed.

              FWIW, if your issue was GCC politics that's pretty much what caused the egcs split (and re-merge eventually, with a new philosophy and maintenance crew in charge of GCC). So if you looked at things prior to the gcc 2.95 era, you were looking at a different set of maintainers (and politics/philosophy/etc) than what's there now.

              I think I put a decent amount of effort into my attempts and I definitely knew how toproduce a standard

      • by Richard_at_work ( 517087 ) on Monday September 17, 2007 @12:25PM (#20639107)
        At one point in GCC's history (infact, not all that long ago), you couldn't even use GCC to do that - there was a big issue about Red Hat shipping a version of GCC by default that could not compile the Linux kernel, you had to install another earlier version if you wanted to do that.
        • Re: (Score:3, Informative)

          by VGPowerlord ( 621254 )
          As I recall, that was version 2.96 [gnu.org], which was actually the development branch for 3.0. Not surprisingly, development versions have bugs, which is why they shouldn't be used by mainstream users.
    • Interesting... (Score:5, Insightful)

      by cromar ( 1103585 ) on Monday September 17, 2007 @11:12AM (#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... (Score:5, Insightful)

        by everphilski ( 877346 ) on Monday September 17, 2007 @11:20AM (#20637807) Journal
        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... (Score:5, Insightful)

          by Anonymous Coward on Monday September 17, 2007 @11:29AM (#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: (Score:3, Insightful)

          by Jeff DeMaagd ( 2015 )
          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... (Score:4, Insightful)

            by Tim C ( 15259 ) on Monday September 17, 2007 @11:47AM (#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... (Score:5, Insightful)

              by Omnifarious ( 11933 ) * <eric-slash AT omnifarious DOT org> on Monday September 17, 2007 @12:13PM (#20638871) Homepage Journal

              The real reason that Stallman wants this is that he early on correctly perceived that Linus is totally ideology agnostic, and so he wanted to put the idea of GNU/Linux out there so people would talk about the ideology. I don't think this is bad or anything. I think the ideology needs to be heard more widely.

              It could also be argued that without the GNU project, Linus wouldn't have had a license ready to use for Linux, and I think that contribution by the GNU project weighs at least as much as all the userspace tools which someone would likely have eventually written anyway.

              • Re: (Score:3, Interesting)

                by Selivanow ( 82869 )
                If you read Linus' early posts about the Linux kernel you will notice that he had originally licensed it under its own license. He didn't switch to the GPL until later. It is hard to say whether or not Linux would have taken off without the GPL. It probably would have been fine using a BSD userland even if a userland wasn't quite available yet. In fact, if the kernel wasn't now so dependant on the GNU userland (binutils, glibc, etc.) it would be pretty easy to usethe BSD userland. (I can't recall if the
            • Re: (Score:3, Insightful)

              by afidel ( 530433 )
              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...

              Not true, they run just fine on Solaris including Open Solaris which is OSS. In fact I MUCH prefer Solaris with the GNU tools loaded, the old SysV tools suck by comparison and I only use them for the rare script that breaks on the GNU tools (They are overall very good about preserving backward compatibility and man will almost always tell you when they don't).
            • Re: (Score:3, Insightful)

              by Thuktun ( 221615 )

              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...
              It could not be successfully argued.

              GNU tools ran fine on other OSes long before Linux became so popular, including Solaris (and SunOS before it), AIX, HP/UX, IRIX, NEXTSTEP, Ultrix, and so on.
            • Re: (Score:3, Insightful)

              by evilviper ( 135110 )

              GNU is the single biggest "contributor", as it were,

              At what point are you forced to grant credit? Shall we call it KDE/QT/GNU/Linux?

              it could be argued that without GNU, Linux would just be a kernel, with no user space to run.

              No it couldn't. The comparable BSD tools have been around longer than the Linux kernel.

              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...

              Before Linux, it was pretty common to install sever

            • Re: (Score:3, Insightful)

              by tepples ( 727027 )

              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...
              Without Linux, the Linux developers would be working on HURD. Without Linux and without HURD, we'd likely be using GNU over Solaris, *BSD, or Minix (all of which are Free by now).
          • Re: (Score:3, Informative)

            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?

            Let's at least get RMS's position right: The GNU project was founded in 1984 to create a free operating system. In 1991, they were almost completely finished - they had written every essential component of a Unix-like operating system except for a kernel. Linus came along, wrote the Linux kernel, combined it with the almost-complete GNU system, and

            • Re:Interesting... (Score:5, Insightful)

              by Nevyn ( 5505 ) * on Monday September 17, 2007 @01:47PM (#20640607) Homepage Journal

              Let's at least get RMS's position right:

              Better idea, let's just get history correct.

              The GNU project was founded in 1984 to create a free operating system.

              Ok, true enough.

              In 1991, they were almost completely finished - they had written every essential component of a Unix-like operating system except for a kernel.

              Sure, and I've almost created a free engery device ... I've done everything apart from this one bit that creates energy for free. Also, GNU did not "create" everything else apart from the kernel ... they created some pieces and were doing the distribution work, so other people "donated" their work.

              Linus came along, wrote the Linux kernel,

              True enough.

              combined it with the almost-complete GNU system, and called the whole thing Linux.

              Not even close to true, Linux has only ever distributed the kernel ... other people combined it and called the whole things like "Red Hat Linux" or "Slackware Linux", GNU should/could have done this but had not bothered to do the work to make a usable distribution (as more than a collection of tarballs) and were happily ignoring Linux and telling everyone else to ignore it and use GNU-Hurd when it would be ready "any time now". This was pretty obvious naming at the time, we didn't call Solaris "GNU/Solaris" when we installed GCC, GNU-tar etc. on it.

              The GNU people were rightly upset that they were getting no credit for their work (to build a complete Unix-like OS).

              They got a huge amount of credit, for the work they did. They just didn't get their name in lights ... because they refused to do the work required for that. Then they complained and wanted more recognition than anyone else got who'd done the same amount of work as they had (like Perl or Xorg etc.) ... this created a "slight" backlash by people who actually know what happened.

      • "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:Interesting... (Score:5, Interesting)

        by Anonymous Coward on Monday September 17, 2007 @11:28AM (#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... (Score:4, Insightful)

        by Brandybuck ( 704397 ) on Monday September 17, 2007 @11:33AM (#20638077) Homepage Journal
        Reason 1) Avoid a monoculture

        Reason 2) Competition

        Reason 3) Choice

        Reason 4) Tweak Stallman's nose
    • Re: (Score:2, Interesting)

      by Sigismundo ( 192183 )

      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: (Score:3, Insightful)

      by MissP ( 728641 )
      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!
      • by TheRaven64 ( 641858 ) on Monday September 17, 2007 @11:46AM (#20638303) Journal
        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.

        • by synthespian ( 563437 ) on Monday September 17, 2007 @01:26PM (#20640215)
          Here's the content (just so it stays in this Slashdot thread and gets archived here).

          Re: BSD Licensed PCC Compiler Imported (mod 21/25)
          by Marc Espie (213.41.185.88) (espie@openbsd.org) on Sun Sep 16 13:28:48 2007 (GMT)
                      > > I am saying think this through and carefully. Rewriting a giant suite of programs just because you don't agree with the philosophy behind it sounds awful to people who have no stakes in BSD licenses.
          >
          > It's not just the licence that is a concern about the GCC suite, it's dropping support for hardware that OpenBSD supports, it's fluctuating compilation quality and it's licence are all matters for concern to users.

          The licence is just the top of the iceberg.

          GCC is developed by people who have vastly different goals from us. If you go back and read the GCC lists, you'll notice several messages by me where I violently disagree with the direction it's following. Here is some *more* flame material.

          - GCC is mostly a commercial compiler, these days. Cygnus software has been bought by redhat. Most GCC development is done by commercial linux distributors, and also Apple. They mostly target *fast* i386 architectures and PowerPC. A lot of work has been done on specmarks, *but* the compiler is getting bigger and bigger, and slower and slower (very much so).

          - GCC warnings are not *really* useful. The -Wall flag shows many right things, and quite a few wrong issues.

          - There is a lot of churn in GCC which ends up with it no longer supporting some architectures that are still relevant to us.

          - 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.

          - As a result, you cannot have the new interesting stuff from newer GCC without also losing stuff... every GCC update is an engineering nightmare, because there is NO simple choice. You gain some capabilities, and you also lose some important stuff.

          - it's also very hard to do GCC development. Their branching system makes it very likely that some important work is falling between the cracks (and this happens all the time). If you develop code for GCC, you must do it on the most recent branch, which is kind of hard to do if your platform is currently broken (happens *all the time* if you're not running linux/i386). Even when you conform, it's hard to write code to the GNU coding standards, which are probably the most illegible coding guidelines for C. It's so obvious it was written by a lisp programmer. As a result, I've even lost interest into rewriting and getting in the GCC repository a few pieces.

          - some of their most recent advances do not have a chance to work on OpenBSD, like preparsed includes, which depend on mmap() at a fixed location.

          - there are quite a few places in GCC and G++ where you cannot have full functionality without having a glibc-equivalent around.

          - some of the optimisation choices are downright dangerous, and wrong for us (like optimizing memory fills away, even if they deal with crypto keys).

          - don't forget the total nightmare of autoconf/libtool/automake. Heck, even the GCC people have taken years to update their infrastructure to a recent autoconf. And GCC is *the only program in the ports tree* that actually uses its own libtool. Its configuration and reconfiguration fails abysmally when you try to use a system-wide libtool.

          I could actually go on for pages...

          I've actually been de facto maintainer of GCC on OpenBSD for a few years by now, and I will happily switch to another compiler, so frustrating has been the road with GCC.
  • Kind of depends... (Score:5, Insightful)

    by KingSkippus ( 799657 ) * on Monday September 17, 2007 @11:07AM (#20637585) Homepage Journal

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

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

    • They were stating their POV and their beliefs. Anyone else's opinion on the matter is irrelevant and unsolicited.
      • by Surt ( 22457 )

        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.
        • Not really, considering the main purpose for developing it was license based. It wasnt technological, it was ideological.
  • by gambolt ( 1146363 ) on Monday September 17, 2007 @11:09AM (#20637621)
    OK, so it compiles C on x86. What do I use when I want to compile objective C on my microwave?
    • by Aladrin ( 926209 ) on Monday September 17, 2007 @11:28AM (#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!?
      • by TheRaven64 ( 641858 ) on Monday September 17, 2007 @11:51AM (#20638389) Journal

        Actually, support for different architectures is one of the main reasons OpenBSD is looking at it. GCC has a habit of dropping architectures because 'nobody uses them,' which causes some OpenBSD (and NetBSD) ports to remain stuck with old versions of GCC. The x86 backend for PCC was written in three weeks by one person, so it seems reasonable to assume it should be possible to add support for the other required platforms relatively easily.

        It's worth remembering that in BSD-land, things are divided into the base system and third party packages. The base system needs a C compiler that is capable of compiling the userland (which PCC already does for OpenBSD), is small, portable, and easy to audit. Packages have quite different requirements; they need support for more languages, etc. PCC is likely to replace GCC in the BSD base systems, but that doesn't mean that people won't install GCC or LLVM for compiling other things.

      • Re: (Score:3, Informative)

        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?
        Easy. Read the rest of the summary.

        and work is being done on it to take on GCC's job.
  • 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

    • >>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.
  • Quick! (Score:5, Funny)

    by perbu ( 624267 ) on Monday September 17, 2007 @11:10AM (#20637639)
    Someone relicense it under the GPL!
  • by Anonymous Coward
    "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.

  • 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 (Score:4, Insightful)

    by christurkel ( 520220 ) on Monday September 17, 2007 @11:12AM (#20637665) Homepage Journal
    GCC Compiler Finally Supplanted by PCC?

    No. Next question.
  • by th0mas.sixbit.org ( 780570 ) on Monday September 17, 2007 @11:12AM (#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.
    • by sinnergy ( 4787 ) on Monday September 17, 2007 @11:16AM (#20637733) Homepage
      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'...
  • *yawn* (Score:5, Funny)

    by blackcoot ( 124938 ) on Monday September 17, 2007 @11:13AM (#20637687)
    call me when pcc does something useful, like, say, working.
  • 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.
  • 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

  • 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. (Score:5, Interesting)

    by imbaczek ( 690596 ) <imbaczek@poczGIR ... minus herbivore> on Monday September 17, 2007 @11:18AM (#20637775) Journal
    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].
    • Re: (Score:3, Informative)

      by TheRaven64 ( 641858 )
      PCC and LLVM have different goals. LLVM is intended to be a replacement for GCC with a modern architecture. PCC is intended to be a simple C compiler, not too heavy on the optimisation, but easy to audit and able to produce correct code. LLVM is about an order of magnitude bigger than PCC, making it much harder to audit. PCC would be great for the OpenBSD base system, while LLVM would make a good choice for compiling packages. It's all about choosing the right tool for the job.
  • 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
  • LLVM / clang (Score:5, Interesting)

    by sabre ( 79070 ) on Monday September 17, 2007 @11:18AM (#20637787) Homepage
    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
  • 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".

  • by joe_n_bloe ( 244407 ) on Monday September 17, 2007 @11:27AM (#20637929) Homepage
    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.
    • by DreadSpoon ( 653424 ) on Monday September 17, 2007 @12:26PM (#20639115) Journal
      The biggest reason for the new compiler (despite the jackass article submitter's position) is that GCC does *NOT* support every architecture. GCC drops architectures frequently as the core contributors lose interest, which hurts OSes like NetBSD that try to support more than the mainstream architectures. NetBSD relies on a combination of GCC 2, 3, and 4 to compile the OS on all of the architectures it supports.

      The idea with PCC is not that it will be BSD licensed (nobody really gives a fuck what license the compiler is under), but that it will be supported directly by the BSD community, including the NetBSD hackers who have their bazillion architectures to support.
    • by evilviper ( 135110 ) on Monday September 17, 2007 @02:17PM (#20641129) Journal

      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?

      You couldn't have gotten that statement any MORE WRONG if you had tried.

      GCC's "production quality" is an on-again, off-again thing. Through most of v3.x it had too many bugs to count, and was inherently unreliable. It couldn't even compile ITSELF with the most basic optimizations or the resulting binary would generate incorrect code. Up until v4 it also misaligned stack variable. It had, and still has, MANY bugs. That GCC successfully compiles code at all is almost entirely due to it being so popular that everyone knows it, and works around its bugs without even thinking about it.

      It has never had GOOD support for any other platforms than x86. Remember the RedHat GCC2.96 fiasco? They forked it because they needed it to support more platforms than it currently did. And even through v3.x the non-x86 ports of GCC had even more bugs than on x86, commonly falling apart if you attempt to use any optimizations. Now, they're DROPPING support for those platform entirely, which is a big problem for developers of operating systems for those platforms.

      "Improved" is pretty vague. HURD has probably been "improved" for every minute of it's existence as well... Meanwhile the far younger ICC (Intel's compiler) beats the pants off of GCC without even trying.

      What's more, GCC's "improvements" come at great cost. If you're a full-time developer, for the final release you want optimized code, but while developing, you want to compile and be able to test code frequently, and so as quickly as humanly possible. GCCv3+, even with all optimizations disabled, takes far, far longer to compile binaries than even older versions of GCC, and as it says, something like 10X slower than PCC.

      The license issue is only incidental. These (and other) problems pushed them away from using GCC. Since they happen to be BSD developers, they'd prefer their work to be BSD licensed, and so it is.
  • by DreadSpoon ( 653424 ) on Monday September 17, 2007 @12:37PM (#20639321) Journal
    First: PCC has not YET supplanted GCC. The BSDs are hoping it will in the future.

    Second: The biggest attraction of PCC is NOT the license. The article submitter who stated otherwise is a jackass.

    Third: There are techical reasons why GCC is actaully unusable by some BSDs, such as NetBSD, which aims to support many architectures that GCC has dropped. NetBSD uses a combination of GCC 2, 3, and 4 to compile all of its different architectures. The NetBSD developers would rather have a single compiler that handles them all. Obviously PCC is nowhere near that level yet, of course.

    Fourth: GCC politics are a pain in the ass for many BSD developers who just want to submit patches to a compiler without the overhead of GNU's policies and GCC's management.

    Fifth: GCC produces crappy code more often than anyone would like. GCC bugs are far from unheard of, performance of generated code is often unpredictable between releases, and in many less commonly used architectures or sources GCC will produce incorrect code. Yes, these cases are very rare, but the BSD folks have hit the problem often enough for it to be a concern. PCC, being simpler and less bloated with cruft from multiple rewrites of the internals will hopefully produce correct and predictable code more often than GCC.

    Sixth: PCC actually works today. It can compile most of the NetBSD userspace, as I recall, and the kernel will be ready to roll soon after some inline assembler problems are fixed. This isn't some theoretical hacky project - it works right now. It's not ready to replace GCC just yet, by any means, but it's a lot more than some Slashdotters seem to think it is.
  • GCC (Score:3, Funny)

    by MrCopilot ( 871878 ) on Monday September 17, 2007 @04:13PM (#20643063) Homepage Journal
    So is there an Arm-Linux-Pcc? CrossCompiler? Will I have to change my code?

    Then the answer is no. I may be alone in the world but I'm perfectly happy with the gcc compiler and have been for years. It does what its supposed to, It is FREE, It is crossplatform (MingW), and it annoys the BSD guys.

    Clear Winner. GCC

    It has been pointed out here, that people who choose a compiler based on its license are idiots. Well if I'm working on windows I use MingW specifically because of its license. If I'm working in Linux and I usually am, I choose GPL above all others. Count me as an Idiot if you like, But you can shove the alternatives. I know what I am getting and have a reasonable expectation what is coming in the future, and if I need to modify it (Heaven Forbid) I can. BSD is a fine license for people who NEED it. I don't. When given the choice I choose GPL. GCC Slower, maybe so. Code works and I get paid. If it takes 3 hrs for QT to compile. I bill for 3Hrs.

    Sorry but, I'm a pragmatist in all things except freedom. I've been burned enough. (Admittedly, I've personally never been burned by BSD code, unless you count Windows.)

  • Think about it. Getting a new compiler into free UNIX and the open source community is going to be as hard as getting a new platform on the desktop to compete with Windows. And for similar reasons.

    You're not going to supplant GCC until you get all the code that depends on GCC-specific features modified to be standard portable C. That's a barrier to entry as steep as Microsoft's application barrier to entry. Now it's not as bad as it was in the early '90s when GCC was sprouting new C extensions everywhere (like the ability to have declarations not at the start of blocks, or the ability to leave the second element out of the trinary conditional operator, or things like alloca), and a lot of those features have now become common and even standardized (and others, like the shortcut trinary, have been deprecated). But it's not as easy as just having a good compiler, or even a good language translating ecosystem like Tendra... the playing field is anything but level.

"How to make a million dollars: First, get a million dollars." -- Steve Martin

Working...