Linked by Thom Holwerda on Sat 15th Sep 2007 20:14 UTC, submitted by deanna
BSD and Darwin derivatives Anders Magnusson's BSD-licensed pcc compiler has been imported into NetBSD's pkgsrc and OpenBSD's src tree. Anders 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 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."
Order by: Score:
Cool
by aliquis on Sat 15th Sep 2007 20:24 UTC
aliquis
Member since:
2005-07-23

Even if it doesn't generate as fast binaries as gcc does yet it's still nice to see how dedicated (mostly the OpenBSD?) people are to rewrite tools under a BSD license there only GPL alternatives have been available earlier.

Reply Score: 13

RE: Cool
by Oliver on Sat 15th Sep 2007 20:32 UTC in reply to "Cool"
Oliver Member since:
2006-07-15

It's good for freedom of choice too.

Reply Score: 12

RE: Cool
by diegocg on Sat 15th Sep 2007 20:37 UTC in reply to "Cool"
diegocg Member since:
2005-07-08

Yeah, it's good to see so many people dedicating so much time to the crucial task of rewriting GPL tools with a BSD license. First it was some basic GNU tools like tar etc, now the compiler. It's clearly what the free BSDs need right now. And its users! How I could live using a GPLed compiler up today?

Edited 2007-09-15 20:39

Reply Score: 10

RE[2]: Cool
by Nicholas Blachford on Sat 15th Sep 2007 22:54 UTC in reply to "RE: Cool"
Nicholas Blachford Member since:
2005-07-06

Yeah, it's good to see so many people dedicating so much time to the crucial task of rewriting GPL tools with a BSD license. First it was some basic GNU tools like tar etc, now the compiler.

I thought that myself for about 3 seconds, the competition will be a good thing.

Reply Score: 6

RE: Cool
by mindaur on Sat 15th Sep 2007 22:42 UTC in reply to "Cool"
mindaur Member since:
2007-09-04

The PCC is not related to OpenBSD team. The maintainer of compiler is NetBSD developer, however the PPC project is separate from BSDs: http://www.ludd.ltu.se/~ragge/pcc/

Of course, this might change after importing to the OpenBSD userland.

Reply Score: 2

RE: Cool
by Temcat on Sun 16th Sep 2007 07:44 UTC in reply to "Cool"
Temcat Member since:
2005-10-18

But what is the practical need for such a compiler? You can use gcc to compile BSD-licensed software (heck, even proprietary software!) with no licensing problems.

Reply Score: 3

RE[2]: Cool
by Marcellus on Sun 16th Sep 2007 09:50 UTC in reply to "RE: Cool"
Marcellus Member since:
2005-08-26

Today yes, but are there any guarantees that the next version of GPL says that anything produced with GPL'd software must also be GPL'd in turn? Or the next after that... etc.

Reply Score: 0

RE[3]: Cool
by Marcellus on Sun 16th Sep 2007 09:51 UTC in reply to "RE[2]: Cool"
Marcellus Member since:
2005-08-26

That's supposed to be "won't say" of course.

Reply Score: 0

RE[3]: Cool
by gilboa on Sun 16th Sep 2007 12:30 UTC in reply to "RE[2]: Cool"
gilboa Member since:
2005-07-06

If, say, GCC4.5 changes license to GPLv4 that prohibits compiling non-GPL software, take the latest version of GCC4.4 and fork it.
It has been done before. (XFree86 vs. X.org)

- Gilboa

Reply Score: 6

RE[2]: Cool
by Oliver on Sun 16th Sep 2007 10:04 UTC in reply to "RE: Cool"
Oliver Member since:
2006-07-15

You could e.g. compile the complete NetBSD operating system. Whether you need something different for the ports, e.g. the applications like OpenOffice doesn't matter. Btw. the motivation of the NetBSD people isn't the license, but proper portable code.

Reply Score: 1

Oh, great!
by CrLf on Sat 15th Sep 2007 21:16 UTC
CrLf
Member since:
2006-01-03

"The big benefit of it is that it is fast, 5-10 times faster than gcc, while still producing reasonable code."

Well, if gcc dropped its extensive portability, was "not yet bug-fre" and produced only "reasonable code", it would be fast too.

Reply Score: 9

RE: Oh, great!
by Oliver on Sat 15th Sep 2007 21:22 UTC in reply to "Oh, great!"
Oliver Member since:
2006-07-15

That's quiet nonsense, even most of the Linux developers aren't very happy with GCC. It would be a welcome alternative.

Reply Score: 5

RE[2]: Oh, great!
by FooBarWidget on Sat 15th Sep 2007 23:59 UTC in reply to "RE: Oh, great!"
FooBarWidget Member since:
2005-11-11

Can you backup the word "most" with some evidence? I've been writing C(++) for years and I like GCC.

Reply Score: 6

v RE[3]: Oh, great!
by Oliver on Sun 16th Sep 2007 00:05 UTC in reply to "RE[2]: Oh, great!"
RE[4]: Oh, great!
by sbergman27 on Sun 16th Sep 2007 00:31 UTC in reply to "RE[3]: Oh, great!"
sbergman27 Member since:
2005-07-24

GCC has one great claim to fame: Wide cross-platform support.

That is its killer feature. Everything else is subordinate.

A commitment to cross-platform is both our community's greatest strength... and our Achilles' heel. One need look no further than mozilla.com's products to see what price we pay for cross-platform. And one need not look hard to find the indications of GCC's mediocrity, compared to more platform-focused compilers like Intel's or Microsoft's.

Reply Score: 9

RE[5]: Oh, great!
by lkrotowski on Sun 16th Sep 2007 01:41 UTC in reply to "RE[4]: Oh, great!"
lkrotowski Member since:
2007-07-28

About cross-platform: I use Gcc/G++ on platforms with alternatives. And I do not care about other platforms. I use it because of splendid quality of generated code. Cross-platform is "subordinate" for me.

And now for comparing with alternatives. Yes Icc produces fast code. But compilation process is painfully slow - it can take days for larger projects. G++ compiles that within hours. And, guess what, I actually compared highly optimized numeric code compiled with Mingw32 g++ with MS VC+ 2005 (not EE, Team Suite). G++ generates faster code for Windows. But "highly optimized" doesn't mean "just put -O3 and -march". No, it's PGO, auto-vectorisation, auto-prefetch, tuned inline heuristics (I didn't try OpenMP on Windows yet). For example, when it comes to PGO MS VC++ simply sucks.

So, face it. There won't be anytime soon BSD-licenced compiler good enough to compete with Gcc. And with all that money pumped into Gcc... LLVM is interesting, though (only usable C/C++ front-end is based on Gcc -- Clang is future, years ahead).

Reply Score: 9

RE[6]: Oh, great!
by tyrione on Sun 16th Sep 2007 05:32 UTC in reply to "RE[5]: Oh, great!"
tyrione Member since:
2005-11-21

There will be an ObjC/ObjC++ added by Apple to LLVM.

Reply Score: 2

RE[4]: Oh, great!
by JMcCarthy on Sun 16th Sep 2007 01:58 UTC in reply to "RE[3]: Oh, great!"
JMcCarthy Member since:
2005-08-12

Are you familiar with "burden of proof"?

Reply Score: 2

RE[3]: Oh, great!
by superman on Sun 16th Sep 2007 06:01 UTC in reply to "RE[2]: Oh, great!"
superman Member since:
2006-08-01

> I like GCC.

Me too. Visual C++ is very fast for compiling but it is not as good as gcc for generating good code.
Gcc is the best.

Reply Score: 3

RE[4]: Oh, great!
by luzr on Sun 16th Sep 2007 09:35 UTC in reply to "RE[3]: Oh, great!"
luzr Member since:
2005-11-20

> Visual C++ is very fast for compiling but it is not as good as gcc for generating good code.

Have you actually tried to compare, or it is just your guts feeling?

This benchmark is supposed to show something else, but it also shows the optimization capabilities for various compilers:

http://www.ultimatepp.org/www$uppweb$vsstd$en-us.html

As you cn see, MSC++ 32bit compiler generated code is as fast or faster than GCC for this particular benchmark.

Edited 2007-09-16 09:36

Reply Score: 1

RE[5]: Oh, great!
by dylansmrjones on Sun 16th Sep 2007 13:03 UTC in reply to "RE[4]: Oh, great!"
dylansmrjones Member since:
2005-10-02

As you cn see, MSC++ 32bit compiler generated code is as fast or faster than GCC for this particular benchmark.


Eeeh? The benchmark clearly shows that GCC64 is the winner in ALL parts of the benchmark except for one draw with GCC32 and two losses to GCC32.

Only in four parts of the benchmark is MSC7.1 faster than GCC32 (and never faster than GCC64).

MSC8.0 is the slowest of them all. It never beats GCC64, only beats GCC32 once. It has two draws with GCC32, but is only faster once. It is faster than MSC7.1 twice but loses most of the time.

Remember: Lower is faster.

Reply Score: 4

RE[6]: Oh, great!
by luzr on Sun 16th Sep 2007 13:46 UTC in reply to "RE[5]: Oh, great!"
luzr Member since:
2005-11-20

> Eeeh? The benchmark clearly shows that GCC64 is the winner in ALL parts of the benchmark except for one draw with GCC32 and two losses to GCC32.

Have you ever heard about x86-64 vs x86-32 performance advantage because of additional registers? ;)

Note: new benchmarks were also done with MSC 64-bit version, not yet published, which show similar pattern - GCC and MSC produced code is mostly of the same quality.

And please, do not compare STL numbers (GCC STL is generally better than MSC STL), just find the fastest time of all - in that case, numbers are pretty even as compilers are compiling the same C++ code.

(MSC8 STL implementation is trategy, that is widely known fact. But STL does not have much to do with quality of compiler alone).

Reply Score: 1

RE[7]: Oh, great!
by dylansmrjones on Sun 16th Sep 2007 14:26 UTC in reply to "RE[6]: Oh, great!"
dylansmrjones Member since:
2005-10-02

Your claim was:

As you cn see, MSC++ 32bit compiler generated code is as fast or faster than GCC for this particular benchmark.


That's not what the benchmark says. It says GCC32 produces as fast or faster binaries than MSC7.1 and especially 8.0

The benchmark shows the exact opposite of your claim. Also when ignoring STL.

On the overall MSC7.1 isn't so bad, but GCC32 still wins. GCC64 is of course even faster, but even if we stick to 32-bit compilers, GCC is still the winner.

Reply Score: 3

RE: Oh, great!
by Cloudy on Sun 16th Sep 2007 01:00 UTC in reply to "Oh, great!"
Cloudy Member since:
2006-02-15

Well, since you create a native only compiler, portability has nothing to do with GCC's performance, and it's not yet bug-free and it does produce only reasonable code.

So, why isn't it faster?

Reply Score: 5

RE[2]: Oh, great!
by smitty on Sun 16th Sep 2007 01:13 UTC in reply to "RE: Oh, great!"
smitty Member since:
2005-10-13

portability has nothing to do with GCC's performance

Portability takes up developer resources, and I believe this is GCC's real problem, they just don't have enough people to go around. Also, it supports a ton of different languages while most compilers only focus on 1 or 2. This also takes more developer resources and stops them from making language specific hacks. I mean optimizations.

it's not yet bug-free and it does produce only reasonable code

No compiler is completely bug free, and it does produce reasonable code. It's definitely not as good as some more focused compilers, but it's one of those programs that does a lot and is good enough for most people. More competition in open source compilers is a good thing, but lashing out at how terrible GCC is isn't very productive IMHO.

Reply Score: 5

RE[3]: Oh, great!
by Almindor on Sun 16th Sep 2007 08:55 UTC in reply to "RE[2]: Oh, great!"
Almindor Member since:
2006-01-16

Gcc has full time payed developers from many big companies. It is THE most developed compiler.

Also your comment about "other languages" is off. They do not do other languages. There are dedicated teams for that. The core development is based on the intermediate "quasi-bytecode" gcc uses, and C front end. (perhaps also C++ but.. the quality?).

But it still doesn't stand that they don't have enough manpower to make it fast AND good. Take a look at the recently released Free Pascal. Sure it's one language (see my comment on gcc above) but they support a wide variety of OSes AND it's 100% free (no corporate backing, no fulltimers). To top that off they got only about 6 active people working at any time and look where they got.

I think the problem with gcc is that it tries to be what unix never wanted. The big program for everything. It breaks the KISS mentality and the "tool for the job" mentality and that can be felt.

Another C compiler is a good thing (tm), no matter the license.

Reply Score: 3

RE[4]: Oh, great!
by danieldk on Sun 16th Sep 2007 09:36 UTC in reply to "RE[3]: Oh, great!"
danieldk Member since:
2005-11-18

Another C compiler is a good thing (tm), no matter the license.

Additionally, if the goal of pcc is to compile BSD (base) systems initially only, it has the advantage that it is a C-only niche compiler. Not having to bother about other languages, it's a lot less work to optimize and maintain than gcc, which has many frontends.

Reply Score: 4

RE[3]: Oh, great!
by Oliver on Sun 16th Sep 2007 10:08 UTC in reply to "RE[2]: Oh, great!"
Oliver Member since:
2006-07-15

>how terrible GCC is isn't very productive IMHO.

That saying is okay, but it fits for GCC itself too ;-)

Reply Score: 0

RE[3]: Oh, great!
by Soulbender on Mon 17th Sep 2007 07:59 UTC in reply to "RE[2]: Oh, great!"
Soulbender Member since:
2005-08-18

"Also, it supports a ton of different languages while most compilers only focus on 1 or 2."

And having a *C* compiler support other languages is good because...?

Reply Score: 1

RE[2]: Oh, great!
by rayiner on Sun 16th Sep 2007 01:45 UTC in reply to "RE: Oh, great!"
rayiner Member since:
2005-07-06

There's all sorts of reasons why GCC is slower, and only a few are really avoidable.

1) GCC is a heavily optimizing compiler. It doesn't just produce reasonable code, it produces excellent code: http://groups.google.com/group/comp.compilers/browse_thread/thread/...

Heavily optimizing compilers are slower than non-optimizing ones. Not only is there the cost of the optimization passes themselves, but the very structure of the compiler must be more well-abstracted and general in order to support the code complexity of an aggressive optimizer.

2) GCC's reusability forces it to use multiple intermediate representations. There is a compile-time cost to converting between language dependent trees, language specific trees, and RTL.

3) GCC"s retargetability forces it to use slower and more generic algorithms. All of the GCC back-end code has to deal with the complexity of all of GCC's supported targets. For example, the register allocator has to deal with all of the quirks of the embedded processors GCC supports*. RTL has to support all of the weird addressing modes of the processors supported by GCC, and the RTL expanders have to take the full complexity of RTL into account. Even if GCC implemented the same algorithms as PCC for these tasks, the GCC version would still be slower because it has to account for all of these cases. On top of that, GCC does instruction combining and instruction scheduling that PCC doesn't even try to do. GCC has a very sophisticated generic instruction scheduler that can generate processor-specific schedulers based on abstract machine descriptions. PCC doesn't even try to do this.

It is possible, but not easy, to make a compiler as aggressive and portable as GCC that's still fast pretty fast. LLVM, for example, is pretty near SOTA, but it is faster than GCC, though by a much smaller factor than PCC. However, LLVM goes to great lengths to achieve that speed. It uses a very memory efficient intermediate representation (three address code instead of trees). It almost exclusively uses sparse optimizations, without ever taking the IR out of SSA form. IMHO, it's a better, cleaner design than GCC, but then again, it has the luxury of being built from the ground-up, and doesn't have decades of legacy to support.

*) I'll give a simple example of this. In my compiler, I use a basic Briggs-style coloring allocator with preferencing to handle dedicated registers. For an AMD64 target, you don't need anything else. This is a grand total of a couple of hundred lines of Lisp code, maybe equivalent to 1,000 lines of C. When you think about supporting all the targets GCC supports (well!), though, the complexity explodes, even if you're still using the same basic algorithm. Suddenly you have to consider overlapping register classes, non orthogonal instruction sets (AMD64 is actually quite orthogonal), huge register files, tiny register files, instructions that use register pairs, etc. The same basic algorithm now has to support all sorts of extra features. GCC's register allocator is 25,000 lines of C, for these reasons. No wonder it's slower!

Edited 2007-09-16 01:51

Reply Score: 24

RE[3]: Oh, great!
by Cloudy on Sun 16th Sep 2007 04:59 UTC in reply to "RE[2]: Oh, great!"
Cloudy Member since:
2006-02-15

IMHO, [LLVM]'s a better, cleaner design than GCC, but then again, it has the luxury of being built from the ground-up, and doesn't have decades of legacy to support.

Precisely. GCC is an OK compiler, but not an excellent one. This is all there is to my point.

Reply Score: 1

RE[4]: Oh, great!
by rayiner on Sun 16th Sep 2007 05:13 UTC in reply to "RE[3]: Oh, great!"
rayiner Member since:
2005-07-06

Precisely. GCC is an OK compiler, but not an excellent one.

What are the metrics for quality? The code produced by GCC is comparable in quality to the code produced by LLVM for mainstream architectures. The support and portability of GCC is far beyond that of LLVM. LLVM, on the other hand, is far cleaner and more elegant on the inside.

They're different, which one is "better" depends quite strongly on how you measure "better".

This is all there is to my point.

Actually, you asked why it was slower, which I answered.

Reply Score: 12

RE[3]: Oh, great!
by Marcellus on Sun 16th Sep 2007 10:06 UTC in reply to "RE[2]: Oh, great!"
Marcellus Member since:
2005-08-26

IMHO, it's a better, cleaner design than GCC, but then again, it has the luxury of being built from the ground-up, and doesn't have decades of legacy to support.


I'm not sure what you mean here. If you mean that GCC have to support old source, isn't it the case that old sources that compiled with 2.95 can't be compiled with a current version? Not the only case of GCC no longer supporting legacy sources.

If you mean GCC supporting features, there's plenty of stuff that has been removed from support over the years as well.


Aside from that, GCC is slow period. Even if you disable optimizations, it's painfully slow.

If trying to use the same main sources for all possible targets makes it slower for all, they really should split it up into target classes instead.

Reply Score: 1

RE[4]: Oh, great!
by luzr on Sun 16th Sep 2007 10:53 UTC in reply to "RE[3]: Oh, great!"
luzr Member since:
2005-11-20

> Aside from that, GCC is slow period. Even if you disable optimizations, it's painfully slow.

But it gets better.

IME GCC4.2 is almost 50% faster than GCC3.4

Reply Score: 2

RE[5]: Oh, great!
by dylansmrjones on Sun 16th Sep 2007 13:09 UTC in reply to "RE[4]: Oh, great!"
dylansmrjones Member since:
2005-10-02

Slow compilation is the price you pay for fast binaries.

GCC usually beats the crap out of Visual C++ in terms of producing the fastest binaries, as your earlier link to the Ultimate++ benchmark showed.

However, that doesn't mean PCC isn't interesting. It is very much so.

Just don't forget Marcellus is FUD'ing* and trolling as usual.

* http://www4.osnews.com/permalink?271690

Reply Score: 3

RE[4]: Oh, great!
by rayiner on Sun 16th Sep 2007 18:25 UTC in reply to "RE[3]: Oh, great!"
rayiner Member since:
2005-07-06

My point was that the major reason LLVM is faster than GCC is because it was built from the ground-up using the latest compiler techniques. GCC, in comparison, has incrementally evolved from a 20 year old codebase. The GCC folks don't have the luxury of going off somewhere and spending five years totally rebuilding things. They have way too many existing customers and existing platforms to support. LLVM doesn't have those kinds of constraints.

If trying to use the same main sources for all possible targets makes it slower for all, they really should split it up into target classes instead.

This wouldn't work in any way that didn't require huge code duplication.

Edited 2007-09-16 18:31

Reply Score: 3

clang (LLVM)
by martink on Sat 15th Sep 2007 21:18 UTC
martink
Member since:
2005-07-06

It would be much more reasonable to contribute to clang ( http://en.wikipedia.org/wiki/Clang ), IMHO. clang (and the rest of LLVM) has BSD-like licence.

Edited 2007-09-15 21:38

Reply Score: 10

RE: clang (LLVM)
by Oliver on Sat 15th Sep 2007 21:23 UTC in reply to "clang (LLVM)"
Oliver Member since:
2006-07-15

Why? Because it's from Apple?

Reply Score: 1

RE[2]: clang (LLVM)
by martink on Sat 15th Sep 2007 21:28 UTC in reply to "RE: clang (LLVM)"
martink Member since:
2005-07-06

No, because it can make LLVM complete replacement (with BSD-like licence) for gcc. And LLVM already has many advantages over gcc (link time optimizations, JIT, ...). http://www.llvm.org

Edited 2007-09-15 21:39

Reply Score: 1

RE[3]: clang (LLVM)
by Oliver on Sat 15th Sep 2007 21:41 UTC in reply to "RE[2]: clang (LLVM)"
Oliver Member since:
2006-07-15

Is there any interest from Linux people at the moment? In terms of real interest, not just "would be fine to see it"?

Reply Score: 1

RE[3]: clang (LLVM)
by KugelKurt on Sat 15th Sep 2007 22:42 UTC in reply to "RE[2]: clang (LLVM)"
KugelKurt Member since:
2005-07-06

it can make LLVM complete replacement (with BSD-like licence) for gcc


No, it canít and this isnít even the goal. LLVM and clang will most likely never support Pascal, Fortran, Java, and so on. It will be C, C++, and Obj-C only.
GCC has such a wide feature set that it wonít be replaced by anything in the foreseeable future.

Reply Score: 11

RE[2]: clang (LLVM)
by kad77 on Sat 15th Sep 2007 21:33 UTC in reply to "RE: clang (LLVM)"
kad77 Member since:
2007-03-20

clang may be developed in part by Apple, but it is still a subproject of the LLVM initiative.

It lives in the University of Illinois SVN: http://clang.llvm.org/

Learn more about LLVM: http://llvm.org/docs/FAQ.html

It really would make more sense to contribute to LLVM, which is BSD compatible. I don't know if you are aware of this, but a compiler can be as extensive and complex as an entire operating system.

Reply Score: 11

RE[3]: clang (LLVM)
by Oliver on Sat 15th Sep 2007 21:40 UTC in reply to "RE[2]: clang (LLVM)"
Oliver Member since:
2006-07-15

Yes I'm aware of this, but I'm aware too of the ability of the NetBSD people. So in the end, I think they know what they're are doing.

Reply Score: 1

RE[4]: clang (LLVM)
by kad77 on Sat 15th Sep 2007 21:53 UTC in reply to "RE[3]: clang (LLVM)"
kad77 Member since:
2007-03-20

All some of us were saying was that in an ideal world, it would be nice if someone talented like that would work with a team (LLVM) with some similar (albeit larger) goals.

I found the homepage for his project: http://www.ludd.ltu.se/~ragge/pcc/

If you read the page, it appears to be more of a student project with far less organization and smaller goals. Kind of a hobby feel to it.

Maybe he will attract some more eyeballs to free compilers in general.

[contentious, argumentativeness removed ;) ]

Edited 2007-09-15 22:07 UTC

Reply Score: 1

RE[5]: clang (LLVM)
by Oliver on Sat 15th Sep 2007 22:28 UTC in reply to "RE[4]: clang (LLVM)"
Oliver Member since:
2006-07-15

PCC is originally developed bei Bell Labs in the 70s. I do think they are more interested in sourcecode than HTML.

Reply Score: 2

RE: clang (LLVM)
by baadger on Sat 15th Sep 2007 23:03 UTC in reply to "clang (LLVM)"
baadger Member since:
2006-08-29

According to Wikipedia, Clang is just a front end to LLVM which "currently supports the compilation of C and C++ programs, using front-ends derived from version 3.4 and 4.0.1 of the GNU Compiler Collection (GCC)."

..and further...

"It is publicly available under the University of Illinois Open Source License [1], an GPL compatible[1], OSI-approved license that is very similar to the BSD license."

I find it interesting that it is based on GCC code yet it's stated as being a "potential replacement" to GCC. Compiler writing isn't an easy business, and programs compiled with GCC are themselves exempt from the GPL.

I say if you can write a better, cleaner, faster compiler then go for it, but writing a new one based solely because of licensing issues when an existing well rounded open source project exists seems a little bastardy to me.

Reply Score: 10

RE[2]: clang (LLVM)
by kad77 on Sat 15th Sep 2007 23:35 UTC in reply to "RE: clang (LLVM)"
kad77 Member since:
2007-03-20

Maybe you misunderstood.

The LLVM backend compiler can utilize modified gcc frontend parsers. They are pluggable; the LLVM backend is not at all based on gcc

clang is a new parser/lexer, another pluggable frontend for LLVM that is also not in any way based on gcc.

Reply Score: 8

RE[2]: clang (LLVM)
by kad77 on Sun 16th Sep 2007 00:39 UTC in reply to "RE: clang (LLVM)"
kad77 Member since:
2007-03-20

I don't know why your comment keeps getting modded up, your assertions don't hold water.

I find it interesting that it is based on GCC code yet it's stated as being a "potential replacement" to GCC.


Wrong, LLVM is not based on gcc. At all.

Compiler writing isn't an easy business, and programs compiled with GCC are themselves exempt from the GPL.


And?

I say if you can write a better, cleaner, faster compiler then go for it, but writing a new one based solely because of licensing issues when an existing well rounded open source project exists seems a little bastardy to me.


You are implying the sole reason pcc, llvm, etc are being developed is to spite an open source project? Or the GPL? That is absurd.

GCC's codebase has decades of unwieldy code, it can be very slow, and if you have used GCC over the years you might be familiar with its code generation issues.

There is nothing 'bastardy' about writing a modern open source compiler. Ergo, Linux exists, why should anyone ever write another system kernel (for anything) when a well-rounded open source project exists?

Reply Score: 8

Is this the start of and end to RMS?
by Haicube on Sat 15th Sep 2007 21:25 UTC
Haicube
Member since:
2005-08-06

Just out of curiousity, would this mean that if PCC would get better, we might actually see Stallman slowly becoming a () in history? I would very much appreciate that as it would definitely bring momentum to open source technology.

Any corporate leader who's heard or seen RMS are likely to be very friendly to anything that is not open source. Hopefully this might minimize his negative impact on the open source world.

As another note. Good to see diversity in general =)

Reply Score: 1

sbergman27 Member since:
2005-07-24

"""
would this mean that if PCC would get better, we might actually see Stallman slowly becoming a () in history?
"""

As more and more people with mainstream backgrounds have joined our ranks, RMS has already begun to become a () in history.

But yes, it is nice to see have alternatives, and freedom to compile our code without being lorded over and subjected to that perpetual "you owe me" attitude that Stallman projects.

Glibc is the only other major hurdle to a truly GNU-Free Linux.

Good work, BSD guys!

Reply Score: 4

danieldk Member since:
2005-11-18

Glibc is the only other major hurdle to a truly GNU-Free Linux.

The BSDs have their own BSD-licensed libc, and a lot of software compiles against it without any problems.

Reply Score: 5

baadger Member since:
2006-08-29

There is of course the issue of the standard C++ library as well, the GCC project doesn't just incorporate the compiler, but also the standard library.

EDIT: Whoop nm, looks like PCC is only C99 atm!

Edited 2007-09-15 23:07

Reply Score: 2

sbergman27 Member since:
2005-07-24

Yes. It would be nice to have a distro available with a Linux kernel, BSD libc, and a pick of the best non-FSF software available in the FOSS world.

Does such a thing exist?

Reply Score: 2

baadger Member since:
2006-08-29

I think the reason why no one has done it (Or maybe why no one else noticed too much if someone has) is because porting a BSD libc to Linux would involve rewriting some of the guts of libc to incorporate all of the Linux system calls. Doing so would require some coordination with the Linux kernel developers.

Some common utilities on Linux distro's these days *are* provided by non-FSF packages. For example, on my system wget is provided by BusyBox.

I have to admit, looking through the FreeBSD libc repository in CVS it looks like some damn fine code: http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/

Edited 2007-09-15 23:25

Reply Score: 7

theine Member since:
2005-09-29

I think the reason why no one has done it (Or maybe why no one else noticed too much if someone has) is because porting a BSD libc to Linux would involve rewriting some of the guts of libc to incorporate all of the Linux system calls.

Or maybe the reason is that it's completely uncalled for?

I can see why people write C compilers from scratch because the do not fancy the license GCC is released under, but to get rid of all FSF software in a Linux Distribution where the GPL is unavoidable anyway seems like a wasteful effort.

What's to gain, except the ability to fight ones fears of ``being lorded over and subjected to that perpetual "you owe me" attitude that Stallman projects``, as sbergman27 puts it?

Reply Score: 0

sorpigal Member since:
2005-11-02

Yes. It would be nice to have a distro available with a Linux kernel, BSD libc, and a pick of the best non-FSF software available in the FOSS world.

I really do not understand this attitude. Where did all this anti-FSF, anti-GPL fervor come from? FSF-produced software is generally high-quality stuff. GPL'd software is not a threat to anyone.

Sure, another compiler with a fresh start is good... just like Konqueror was a good idea despite Mozilla. But... there are few advantages to having a BSD-licensed compiler as opposed to a GPL-licensed one. Making a new compiler on purely idealogical grounds strikes me as petty and wasteful. You already have a completely free compiler that works everywhere. What more do you want? There are so many more urgently needed things to code.

Reply Score: 5

sbergman27 Member since:
2005-07-24

"""
I really do not understand this attitude. Where did all this anti-FSF, anti-GPL fervor come from? FSF-produced software is generally high-quality stuff. GPL'd software is not a threat to anyone.
"""

I actually prefer GPL to more permissive licenses, in general. But I would like to have a choice *not* to use FSF-sponsored software. I've actually had FSF advocates say to me that I should "get down on my knees and thank Richard Stallman for what he has done". And that's a fact!

Sorry. No. Not my cup of tea. :-)

Where did the anti-FSF fervor come from? That's easy. Overly enthusiastic followers of Stallman have generated it. Richard and the FSF are more reserved and reasonable than that. I have *great* respect for Eben Moglen and his *wonderful* sense of diplomacy. But they need to restrain their dogs if they want to avoid generating negative feelings in the community at large.

Edited 2007-09-16 19:03

Reply Score: 2

cyclops Member since:
2006-03-12

"Where did the anti-FSF fervor come from? That's easy. Overly enthusiastic followers of Stallman have generated it. Richard and the FSF are more reserved and reasonable than that. I have *great* respect for Eben Moglen and his *wonderful* sense of diplomacy. But they need to restrain their dogs if they want to avoid generating negative feelings in the community at large."

You lie.

"Well, you are the one taking the conversation in this direction. But I tend to think of Stallman less as a mad dictator, and more as a loony old aunt in the attic."

I know why you are anti-fsf ;)

Reply Score: 1

sbergman27 Member since:
2005-07-24

While I do still think of Richard as a bit of a loony old aunt in the attic, my valued conversations with b3timmons have changed my views somewhat. b3timmons has pointed out to me where I have claimed that the FSF has promoted some thing... when in fact, it was not the FSF, proper, but an overly-enthusiastic supporter with poor advocacy-sense.

That took me aback, just a bit. But the fact remains that Richard, and the FSF, do hold sway over these people, and should be doing something to teach them how to do good... without all the collateral damage.

Like, for example, overusing the phrase "You lie" in responses to people with whom you have a lot in common, and simply do not agree completely.

I would like to have an Open Source alternative to FSF sponsored software. Do you have a problem with my having that choice?

Edited 2007-09-16 19:41

Reply Score: 2

Valhalla Member since:
2006-01-24

SBergman27 wrote:
-"Where did the anti-FSF fervor come from? That's easy. Overly enthusiastic followers of Stallman have generated it."

there are 'overly enthusiastic' followers amongst practically every faction here on osnews. they exist amongst FSF advocates, Linux/Linus advocates, BSD advocates, etc.

if one was to judge these projects based upon their most rabid followers then they would all look equally bad. but you single out FSF, go figure.

I have great respect for the BSD Projects, had I based my perceptions of BSD on the posts of Oliver, or if I based my opinions on FSF by the ramblings of extremists such as Moulineuff then it would have been a different matter.

as for the compiler discussion, I liked this article because I'm interested in compiler development. if in time, this compiler can fill some practical need that gcc does not then that's great.

but why must the extremists always use something good related to one project to attack something in another project?

gcc is a great compiler even beyond being the 'de facto cross-compiler'. it generates good code, and for most common targets it generates great code. most of the more exotic optimizations have stabilized greatly during the 3.x and 4.x release cycles, making -O3 very reliable these days.

as always with compilers, there is alot of room for improvements. I'm looking forward to much improved vectorization (Icc really shines here), link time optimization and improved speed (although 4.x has improved greatly) amongst other things. but claiming that it produces 'only reasonable code' can only come from someone who is either totally clueless or intentionally lying.

Reply Score: 4

sorpigal Member since:
2005-11-02

Where did the anti-FSF fervor come from? That's easy. Overly enthusiastic followers of Stallman have generated it. Richard and the FSF are more reserved and reasonable than that.

That is true, and unfortunate. But all communities have their unpleasant fanatics. I've seen some pretty offensive, aggressive comments from BSD people. Like telling me I don't understand what freedom is. Still, I would hope that the behavior of some would not be projected on those they purport to follow. "Jesus must be an ass because... well look at the Spanish Inquisition!" Not that I am comparing RMS to Jesus.

Reply Score: 2

Soulbender Member since:
2005-08-18

"FSF-produced software is generally high-quality stuff."

Uhum, plenty of people would disagree but lets leave it at that.

"You already have a completely free compiler that works everywhere."

Not everyone agrees with the GPL/FSF definition of free.

Reply Score: 1

sorpigal Member since:
2005-11-02

"FSF-produced software is generally high-quality stuff."

Uhum, plenty of people would disagree but lets leave it at that.


Difficult to argue in any direction.

Not everyone agrees with the GPL/FSF definition of free.

It costs nothing and removes no rights from you as a user of the compiler comping your own software. You may redistribute it without paying monetary cost and you may modify it without paying monetary cost. The only restriction is that you cannot misappropriate it. Maybe that's not as free as you would prefer, but it is certainly free enough for it to serve as a compiler for your own software, however free that is.

Reply Score: 2

Soulbender Member since:
2005-08-18

"It costs nothing and removes no rights from you as a user of the compiler comping your own software."

We're not talking of users here though, but about a group who distributes an OS that includes a C compiler. The implications become somewhat different.
Plus, as have been repeatedly stated, it's not only about the license. There are many other aspects of gcc that are problematic.
Either way, what does it matter? If pcc turns out to be a good system compiler for OpenBSD what's the problem?
It would create much needed competition in the free compiler segment and I cant see how that would be a bad thing.
If it doesnt? Well, better try and fail but never try at all. It's not like they're "wasting" anyone's time but their own.

Reply Score: 1

sorpigal Member since:
2005-11-02

I am all for the, as you say, much needed competition in the area of free compilers. I said so in my original post. Many desktops, many editors, many MTAs, many compilers!

However, I am extremely annoyed with the way people vehemently reject the GCC on purely licensing grounds, as if all of the software they have used for a decade had not been compiled with the GCC. Absolutely no respect is given to the fact that the GCC has provided a services we all require for quite a long time. Instead the post to which I replied was trying to spit as firmly as possible in the face of those who produce software under the GPL. As if the GPL-using developers have been holding users hostage or something.

GPL, Free software, FSF and RMS supporters are not out to get you. Maybe you don't like the kind of freedom we advocate, but our software is still free and you always had the freedom not to use it. Where does the hatred come from?

Perhaps a compiler with a better design, more arch support, faster compilation and better code generation will one day replace the GCC, but I doubt it. I don't object to attempting to produce one, but to do so just because you hate the GPL is stupid.

Reply Score: 1

JMcCarthy Member since:
2005-08-12

Not very likely. Stallman's influence is already next to nil in the BSD community, even if they're using GCC. And this isn't particularly relevant for the GNU/Linux community, plus outside of a few you're not going to find very many people in both camps that're interested in kow-towing to corporate interests.

Reply Score: 1

v Who fucking cares?
by antik on Sat 15th Sep 2007 22:52 UTC
OK, now that we have that...
by raynevandunem on Sat 15th Sep 2007 23:31 UTC
raynevandunem
Member since:
2006-11-24

How about a BSD/MIT-licensed widget toolkit?

http://en.wikipedia.org/wiki/List_of_widget_toolkits#Based_on_C_or_...

On there, I can only count two BSD/MIT-licensed widget toolkits for C/C++.

http://en.wikipedia.org/wiki/Visual_Component_Framework Currently on Windows, just ported to Mac, with a Linux version planned.

http://en.wikipedia.org/wiki/Quinta

Reply Score: 1

RE: OK, now that we have that...
by sean on Sun 16th Sep 2007 02:12 UTC in reply to "OK, now that we have that..."
sean Member since:
2005-06-29

Also, e17's Enlightnened Widget Library (Ewl) is BSD-licensed.

Reply Score: 1

RE: OK, now that we have that...
by luzr on Sun 16th Sep 2007 06:38 UTC in reply to "OK, now that we have that..."
luzr Member since:
2005-11-20

> How about a BSD/MIT-licensed widget toolkit?

What about a BSD licensed widget toolkit with BSD licensed IDE and visual designer?

http://www.ultimatepp.org/

BTW, BSD licensed *C++* compiler would make this even better...

Reply Score: 1

RE[2]: OK, now that we have that...
by me1357 on Sun 16th Sep 2007 09:12 UTC in reply to "RE: OK, now that we have that..."
me1357 Member since:
2007-09-16

What about a BSD licensed widget toolkit with BSD licensed IDE and visual designer?

http://www.ultimatepp.org/

This thing looks cool.
Thanks for mentioning.

Reply Score: 1

RE: OK, now that we have that...
by dylansmrjones on Sun 16th Sep 2007 09:59 UTC in reply to "OK, now that we have that..."
dylansmrjones Member since:
2005-10-02

The Linux version is actually in the works AFAIK. Didn't knew it had an article at wikipedia though.

VCF is actually quite nice. Very clean ;)

Reply Score: 3

Will people never learn?
by stox on Sun 16th Sep 2007 04:16 UTC
stox
Member since:
2005-12-26

PCC was never meant to be a production compiler. It was meant to be a bootstrap compiler to get unix running on a new platform. Then one could develop a real compiler for that platform. One of the reasons the bundled compiler disappeared, ie. pcc, was that people started shipping real production compilers. Personally, if one really wants a quality BSD licensed compiler, time would be better spent on something like the TenDRA compiler, www.tendra.org. pcc was originally designed to be easy to port, not to produce good object code. I guess this might be good for the NetBSD platform, but for X86 this is a giant step backwards.

Reply Score: 5

RE: Will people never learn?
by asmodai on Sun 16th Sep 2007 07:53 UTC in reply to "Will people never learn?"
asmodai Member since:
2006-03-28

Personally, having been one of the maintainers for TenDRA for the last, what was it, 5 years or so, I do not think TenDRA as a whole is the compiler you want to use to start to replace GCC with. The main reason in my opinion would be that you would want to replace the intermediate format with a more modern one. And thus a large part of the entire code base already becomes irrelevant.

Edited 2007-09-16 08:13

Reply Score: 4

RE: Will people never learn?
by Soulbender on Mon 17th Sep 2007 07:52 UTC in reply to "Will people never learn?"
Soulbender Member since:
2005-08-18

"PCC was never meant to be a production compiler."

Linux wasn't originally meant to be a desktop OS or an embedded OS. What's your point?

Reply Score: 1

Richard Stallman
by cyclops on Sun 16th Sep 2007 07:00 UTC
cyclops
Member since:
2006-03-12

"Stallman's influence is already next to nil in the BSD community, even if they're using GCC. "

"What's to gain, except the ability to fight ones fears of ``being lorded over and subjected to that perpetual "you owe me" attitude that Stallman projects``, as sbergman27 puts it?"

"Yes. It would be nice to have a distro available with a Linux kernel, BSD libc, and a pick of the best non-FSF software available in the FOSS world."

"Any corporate leader who's heard or seen RMS are likely to be very friendly to anything that is not open source."


I'm glad that a significant project of being GCC is being highlighted, and the long term success of Stallman as the original programmer is highlighted. I do think its a wonderful that his contribution to free-software...and I use the right political term is being appreciated, by those who who use the software. Including those Vista...sorry *BSD users.

What I think is most bizarre after the many threads showing the importance...and sour grapes of the importance of FSF for *20 years* even on the politically different BSD platform. Is that proponents cannot argue the *potential* benefits of this project using their license, it just looks like envy.

The *fun* thing is. What are the *real* benefits of a *different political license? In contrast to failure of BSD to come up with a credible compiler for *20 years*. I see real advantages of a BSD licensed compiler. I can think of at least Intel that have their own compiler, and I suspect would love to be able to offload some of their work, and *keep stuff back*. Apple make no bones about their preference for using *BSD licensed work. Thats without talking about all the potential binary extensions. Although for practical reasoning i would prefer the source to be *really* open, and I know that Thom has already highlighted the desperate need for a tit-for-tat as part of the BSD licensing. I hope companies are not scared off by his recent public attacks on those who do not want their code under the BSD license. Its only a matter of time till he attacks those who use BSD in their proprietary programs.

As a side note a 10 times faster compiler potentially sees the growth of source-based meta-distributions. Already we are seeing the death of the old Linux/*BSD/Solaris distributions. Swapping things like the kernel, is already becoming as trivial as swapping mail clients.

Edited 2007-09-16 07:07

Reply Score: 5

RE: Richard Stallman
by wirespot on Sun 16th Sep 2007 15:30 UTC in reply to "Richard Stallman"
wirespot Member since:
2006-06-21

As a side note a 10 times faster compiler potentially sees the growth of source-based meta-distributions. Already we are seeing the death of the old Linux/*BSD/Solaris distributions. Swapping things like the kernel, is already becoming as trivial as swapping mail clients.


There are several fallacies included in your comment.

Any reasonably portable distribution is technically a "source-based meta distribution". That's because it is started off as source code and tailored to be used on multiple platforms.

Swapping things like the kernel is by no means trivial as of yet. The kernel is not alone in this respect. What we've come to know as a distribution is a combination of several building blocks: kernel, installer, boot system, core libraries, core tools, compiler, package manager and finally the userland (many supplementary libraries and applications).

I'm guessing that by "meta-distribution" you mean a distro that keeps the largest part of the userland but makes changing the other building blocks as easy as possible. That is not an easy thing to do. Several of those elements are closely interlocked. Some of them are paramount to the distro maintainers' workflow or to the user experience with installation and management.

So far, the only distro I'm aware of that has taken significant steps in this direction is Debian, which has produced hybrid combos: GNU/FreeBSD, GNU/NetBSD, GNU/Hurd and GNU/Solaris.
http://www.us.debian.org/ports/#nonlinux
http://www.gnusolaris.org/

Edited 2007-09-16 15:43

Reply Score: 1

Richard Stallman
by cyclops on Sun 16th Sep 2007 07:11 UTC
cyclops
Member since:
2006-03-12

I think its increasingly sad that people on here cannot differentiate the benefits that each license can bring to a project. I understand there are political motivations behind such licenses. Its become a smackdown for different enigmatic leaders, and never with *any* justification I'm yet to see any justification for the Bile I see against Richard Stallman and FSF by Oliver and sbergman27, which get increasing bizarre I believe he was compared to *Bush* recently. In this instance the whole irony a *successful* *open-source* project that has been a cornerstone of the free-software world wrote by the man cannot be understated.

I know that Vista users are concerned about the success that copyleft licenses have been, and will advocate anything *BSD* simply because its not threatening...it has no teeth. Although I suspect the reality is Microsoft is so far ahead nobody is ever going to catch up.

I am disappointed an exciting youthful project like this one it not taken on its own potential merits, both from a quality and a politically different license that makes it rightly deserving of its highlighting on this page.

Edited 2007-09-16 07:24

Reply Score: 8

RE: Richard Stallman
by tyrione on Mon 17th Sep 2007 03:42 UTC in reply to "Richard Stallman"
tyrione Member since:
2005-11-21

Perhaps they are just cover handles for Bill G and Steve B?

/humor.

Reply Score: 2

RE: Richard Stallman
by sbergman27 on Mon 17th Sep 2007 07:00 UTC in reply to "Richard Stallman"
sbergman27 Member since:
2005-07-24

"""
I know that Vista users are concerned about the success that copyleft licenses have been
"""

You call my views "bizarre" and then go off on your truly Twilight Zone tangent about "Vista Users" in the next paragraph?

It's always seems to be "Vista Users" with you. (Are XP users somehow better?) And Vista seems to be a fundamental thing. If *I* were a Vista user, you would simply write me off, rather than taking the time to call me mentally ill, as you have done, repeatedly, in the recent past. (As I recall the reasoning was that I had concerns about Stallman, didn't use Vista, and so must be mentally ill. QED)

Could you please elaborate on the root causes of your "Vista Users" fixation?

Edited 2007-09-17 07:10

Reply Score: 1

It's nice to see...
by melkor on Sun 16th Sep 2007 10:58 UTC
melkor
Member since:
2006-12-16

How ungrateful so many BSD users are. You've used GPL'd software for a great many years, and without it, you'd have been stuck up a certain creek without a certain paddle and you know it.

Go on then, piss off and leave the GPL'd software alone, those of us who believe in Free Software would rather you didn't use it in all honesty. But, since big business loves BSD (something for nothing!), they're happy to support BSD users in their anti GPL/FSF propaganda.

As for Linus and the Linux kernel, it stopped being the "people's kernel" a good number of years ago when big business hijacked it.

Dave

Reply Score: 3

RE: It's nice to see...
by Weeman on Sun 16th Sep 2007 12:12 UTC in reply to "It's nice to see..."
Weeman Member since:
2006-03-20

Did someone shit into your cereals this morning, or what?

Reply Score: 1

RE: It's nice to see...
by hamster on Sun 16th Sep 2007 15:33 UTC in reply to "It's nice to see..."
hamster Member since:
2006-10-06

You really should try to get over your self... It's not as if you can do all your work with gpl only software. Or are you gonne claim that all software in a linux distro would be under the gpl licens?

You just gotta love when the gpl people talk about big business' taking code without giving back while they do the same them self.

Reply Score: 2

RE[2]: It's nice to see...
by wirespot on Sun 16th Sep 2007 15:39 UTC in reply to "RE: It's nice to see..."
wirespot Member since:
2006-06-21

You just gotta love when the gpl people talk about big business' taking code without giving back while they do the same them self.


First off, what are these "gpl people" you talk about?

Second, how on Earth does the GPL license not give back code? It was based on freedom of code and free circulation.

Oh, if it's about the ideological argument that BSD can't touch GPL'd software, save it, I've heard enough of it already. It's been discussed to death all over the place and IMO it has nothing to do with BSD or GPL, it's just several individuals locking horns in very public places.

Reply Score: 5

RE[3]: It's nice to see...
by hamster on Sun 16th Sep 2007 17:47 UTC in reply to "RE[2]: It's nice to see..."
hamster Member since:
2006-10-06

"First off, what are these "gpl people" you talk about?"

That would be people like the one i replied to...

"Second, how on Earth does the GPL license not give back code? It was based on freedom of code and free circulation. "

And you see a lot of code going back to the major bsd's from the gpl'ed projects?

"Oh, if it's about the ideological argument that BSD can't touch GPL'd software, save it, I've heard enough of it already. It's been discussed to death all over the place and IMO it has nothing to do with BSD or GPL, it's just several individuals locking horns in very public places."

Cant handle that it's the way it happens? Or is it just that any gpl'ed projekt is like a black hole for code when it comes to the bsd projects that you don't like?

Reply Score: 1

v RE: It's nice to see...
by kad77 on Sun 16th Sep 2007 16:42 UTC in reply to "It's nice to see..."
v under bsd license.
by happycamper on Sun 16th Sep 2007 13:52 UTC
whoa
by meandean on Sun 16th Sep 2007 16:32 UTC
meandean
Member since:
2007-09-02

going to get rid of the GNU pieces huh?

Reply Score: 1