about gcc >=4.2 in base

Maybe BSD License is a better choice in open source movement, instead of GNU General Public License
 
I remember seeing a relevant thread in one of the mailing lists.

It seems that GCC 4.2.1 is here to stay, due to the FreeBSD team's strong distate of the GPL v3 license, and the fact that 4.2.1 was the last GCC version licensed with GPL version 2.
 
Ole said:
Hello!

Somewhere in the internet i reading that newer of gcc (>4.2) in the future is not will be placing to FreeBSD base system and instead of gcc will switching to pcc (http://en.wikipedia.org/wiki/Portable_C_Compiler). If the true - what reason for that?

Short answer is very many reasons.

GCC has a very poor quality of code and poor over all design.
It is tightly control via proxy developers by industry monopolies.

GCC has been known for lack of will to hear any suggestion from
people coming with academic background (BSD, MIT license people).

GCC has dropped support for many chip architectures making almost impossible to use on anything else except i386 and amd64.

GCC is also bloated as actually many compilers in one.

GCC is very slooooow.

GCC is over optimized producing the poor quality code.

It has bad license.


On the another hand PCC is the relict of the past. It is written
by a research mathematician who was interested in designing best possible compiler. It is released around 2000 under BSD license
by commercial Unix vendor and resurrected by one of the brightest NetBSD/OpenBSD people Anders Magnusson.
It was default compiler of BSD Unix until
4.4 BSD Light. It is C only compiler of exceptionally clean design and code. It is extremely fast. Probably 10 faster than gcc. It is extremely small. It is extremely portable to any chip-set architecture. It is not fully optimized yet so it produces somewhat slower code than gcc but it has a far grater potential for optimization than gcc can dream of.
 
First, FreeBSD is not switching to PCC. At least I don't know anything about that. LLVM would be a better choice. ;-)

Second - yes, GCC has its problems. And versions above 4.2 have more restrictive license than versions before. So it's possible that it wont be upgraded for some time, I don't know.

Anyway - if you need a newer GCC, just install it from ports. It's there, whatever version you want, from gcc 2.8.1, up to 4.4.0, snapshot from 20081121.
 
  • Thanks
Reactions: Ole
Oko said:
That is so wrong on many levels!!!


Compared to gcc, it's got cleaner code, a better architecture, and a more BSD-ish license. Any issues with speed (of both the compiler and the binaries) can be sorted.

So why the aggression?
 
In addition to all that, it has strong support from the industry, Apple in particular. And very effective optimizer.
 
Djn said:
Compared to gcc, it's got cleaner code, a better architecture, and a more BSD-ish license. Any issues with speed (of both the compiler and the binaries) can be sorted.

So why the aggression?
Because PCC is better compiler. I could ask the same question you. What is wrong with you FreeBSD guys? Firstly that c*** with SVN instead of OpenCVS now LLVC instead of PCC. What is next?
Linux kernel and ALSA?
It is sad what is happening with FreeBSD since Matt Dillon left the project. If DragonFly just had enough human power you would see what is FreeBSD done right. Just compare Hummer and ZFC and you will know what I am talking about.
 
Oko said:
Because PCC is better compiler. I could ask the same question you. What is wrong with you FreeBSD guys? Firstly that c*** with SVN instead of OpenCVS now LLVC instead of PCC. What is next?
Linux kernel and ALSA?

Let's stick to technical arguments. What _exactly_ does PCC do better than LLVM?
 
trasz@ said:
Let's stick to technical arguments. What _exactly_ does PCC do better than LLVM?

How about if you read documentation first

http://pcc.ludd.ltu.se/

and then you ask me which parts I really like.

In the mean time I am reading documentation for LLVM

http://llvm.org/

and I will put you a long list of things I dislike about it
from the technical point of view of course. Then we can compare the notes;).

Let me start with few things. LLVM is based on GCC and written in C++. Just the last thing is enough in my book. Having any code on Unix except pure C is wrong not because of ideology but because C++ is ill conceived language as all objected programming. Now unless you come up with OS written in assembly
or in ADA the buck stops with C. Now, I might be unlucky and you might be the developer of Kolibri OS for all I know but I suspect not since you are writing from Poland not Russia.
 
Hello,

Thanks in the first to trasz for unrolled answer to my question. I be afraid that gcc >4.2x will be not accessibility in FreeBSD.

Now it become to very interesting and cognitive discussion. I want to asking about
trasz@ said:
First, FreeBSD is not switching to PCC. At least I don't know anything about that. LLVM would be a better choice. ;-)

The direction therefrom for moving to LLVM for base FreeBSD compiler is already selected ? if and when plan to move to another compiler is already be, like similar discussion must be somewhere places. I googled only this mail discussion http://unix.derkeiler.com/Mailing-Lists/FreeBSD/hackers/2008-05/msg00237.html.
 
Ole said:
Hello,

Thanks in the first to trasz for unrolled answer to my question. I be afraid that gcc >4.2x will be not accessibility in FreeBSD.

Now it become to very interesting and cognitive discussion. I want to asking about


The direction therefrom for moving to LLVM for base FreeBSD compiler is already selected ? if and when plan to move to another compiler is already be, like similar discussion must be somewhere places. I googled only this mail discussion http://unix.derkeiler.com/Mailing-Lists/FreeBSD/hackers/2008-05/msg00237.html.

Nobody ever said anything about GCC not being accessible. GCC will always be available from ports on any flavor of *BSD. The heated discussion we are having is about compiler in the base.

I, as most OpenBSD/NetBSD and I hope DragonFly BSD people believe that there the base should contain nothing but superb pure C compiler (even though there is PCC version for Fortran).
It is possible to compile entire kernel and most of userland of OpenBSD as well as NetBSD with PCC. The only significant part of userland which can not be compiled is Groff (written in C++) and guess what? Groff is going down too. If SUN releases Heirloom troff under BSD (currently is CDDL) it is likely to be imported
into the base of OpenBSD otherwise there are free versions of Roff and people already working on beefing them up. One of those free versions was part of Minix.

So do not worry abut GCC. It is here to stay. The question is can we do better than that and not just little bit. Can we do much better than that. That is what all *BSDs are about. BSDs are about pushing limits of computing. That is way there is not one but four different BSD flavors because each one is pushing in very different direction. Friendly exchange that we are having is also part of BSD academic culture.
 
Ole said:
The direction therefrom for moving to LLVM for base FreeBSD compiler is already selected ? if and when plan to move to another compiler is already be, like similar discussion must be somewhere places. I googled only this mail discussion http://unix.derkeiler.com/Mailing-Lists/FreeBSD/hackers/2008-05/msg00237.html.

No. There is nothing "selected" right now. I don't think FreeBSD is going to switch to anything other than GCC at least in the next year.

Second - FreeBSD is not a company. It's not like we have our bosses from the core team say "ok, this thing here is wrong, replace it with this one". It's a community process. Basically, some day it will happen that various people on the mailing lists start talking about moving to another compiler _again_, but this time they reach some conclusion. At least some of them. Then somebody else will post patches, that will get talked about again, more people will reach agreement, HEADSUP will be posted and the change will go in. It will take _many_ months from the discussion to the actual commits.
 
Oko said:
I, as most OpenBSD/NetBSD and I hope DragonFly BSD people believe that there the base should contain nothing but superb pure C compiler (even though there is PCC version for Fortran).

It may be a shock to you, but I actually like some C++ features, like STL - sane implementation of strings is a good thing to have. But i digress.

The root clause of disagreement here is that you are looking from an idealistic standpoint, while I'm looking from a practical one. We are not developing the compiler. We don't want to. If somebody wants to do this, both LLVM and PCC projects are open and ready to accept patches. In the base system, we want to _use_ the compiler. It doesn't matter what language it's written in (except that the base needs to be 'self contained', i.e. it must be possible to recompile itself without any external software, which means it needs to include the compiler and all its dependancies). What matters is that the compiler generates good object code, supports architectures that we support, produces useful diagnostic messages, and it's useful for something else than the base system itself, so that users don't need to install another compiler from ports when they want to compile something.
 
trasz@ said:
The root clause of disagreement here is that you are looking from an idealistic standpoint, while I'm looking from a practical one.
Well said. I can sign that statement.

trasz@ said:
We are not developing the compiler.
We don't want to.
On the another hand OpenBSD/NetBSD are developing new compiler;)
 
dap said:
I couldn't find what it supports from C99, do you know that ?

Final goal is to support 100% C99. I am not sure in how many percentage support right now but as I said earlier it can compile kernel of OpenBSD an all of userland except Groff (C++) with only couple patches added to OpenBSD. OpenBSD will have entire tool chain based on its own code hopefully within next two years. That would decrease the size of present OpenBSD installation from around 550MB (including X org, all services and utilities including Apache server) to about 300MB. When Groff gets replaced we are going probably to 200-250MB range. That is almost DSL babe;)

People who tried to use GCC on non Wintel architectures will really appreciate new PCC. If ever had to compile something on SGI or Motorolla you will know what I am talking about.
Only GCC<3.0 works on those architectures and only with patches.
These architectures are very important for the debugging the
code and security enhancement. Since FreeBSD in practical sense supports only i386, amd64, pc98 I can see why FreeBSD guys see no
need for new compiler.
 
I'll have to disagree with one thing:
The only GCC code in LLVM is the frontend. Since the backend is independent, and they have their own alternative frontend (clang) that's supposedly more or less C99-ready, it's somewhat wrong to say that it's "based on GCC".

Granted, it'll need the gcc frontend to compile C++ (and thus itself) until clang does C++ well, and that could take years. They shouldn't have to sync it with the current gcc version especially often, though, so it should be able to avoid GPLv3.
 
Oko said:
Since FreeBSD in practical sense supports only i386, amd64, pc98 I can see why FreeBSD guys see no
need for new compiler.

You seem to have a little distorted view. :)

Right now architectures that are both critical, well-maintained and very actively developed in FreeBSD are i386, amd64, ARM and MIPS. Another important target - which basically works, but doesn't seem as actively developed in the FreeBSD - is PowerPC. Keep in mind that embedded is very important for us, since that is where much (most?) of the money come from (think Nokia or Juniper). Yet another target, that is not as crucial as some time ago, but still works quite nicely (at least on Ultra 5), is sparc64. Compiler that is expected to replace GCC must support these - otherwise we would need to keep two compilers in the base.
 
Djn said:
Granted, it'll need the gcc frontend to compile C++ (and thus itself) until clang does C++ well, and that could take years.

Given how Apple needs it for Xcode, I think we can expect usable results earlier. ;-)
 
trasz@ said:
You seem to have a little distorted view. :)

Right now architectures that are both critical, well-maintained and very actively developed in FreeBSD are i386, amd64, ARM and MIPS. Another important target - which basically works, but doesn't seem as actively developed in the FreeBSD - is PowerPC. Keep in mind that embedded is very important for us, since that is where much (most?) of the money come from (think Nokia or Juniper). Yet another target, that is not as crucial as some time ago, but still works quite nicely (at least on Ultra 5), is sparc64. Compiler that is expected to replace GCC must support these - otherwise we would need to keep two compilers in the base.

That is not what your web-site is saying. I listed Tier one architectures from your web-site. So you are saying that support for PC98 is dropped as well.

I do know that most embedded devices are ARM and MIPS based (probably 80% of the entire chip market are chips for embeded devices)
but I am not embedded device guy so I went with what you web-site is saying.

Your support for MIPS64 (SGI) hardware is non existing. You seems to be very proud of your support sparc64 so I hate to burst
your bubble. OpenBSD is the only operating system other than Solaris which support UltraSPARC IV/T1/T2 and Fujitsu SPARC64-V/VI/VII chip-sets. Last time I tried to use FreeBSD on Sparc it was chocking on Blade 1000. We are talking about 5 year old Blades here. I had Ultra 5 as my Unix workstation in mid 90s. Do you honestly thing of that as something which has any value outside of museum ;)?

Do you support SMP on sparc64;)?

What do you mean by PowerPC (IBM) or old Apple lagacy hardware? The second
one is irrelevant.
 
Oko said:
That is not what your web-site is saying. I listed Tier one architectures from your web-site. So you are saying that support for PC98 is dropped as well.

No. It's just I can't say anything about PC98 because, frankly, I have never seen machine that implements it. It seems that's it being kept up to date with i386, but I have no way to say how things look like here.

Your support for MIPS64 (SGI) hardware is non existing.

Nobody cares about SGI MIPS machines anymore. And I say that as a proud owner of Indigo 2. FreeBSD PowerPC support is important for the embedded sector.

You seems to be very proud of your support sparc64 so I hate to burst
your bubble. OpenBSD is the only operating system other than Solaris which support UltraSPARC IV/T1/T2 and Fujitsu SPARC64-V/VI/VII chip-sets. Last time I tried to use FreeBSD on Sparc it was chocking on Blade 1000. We are talking about 5 year old Blades here. I had Ultra 5 as my Unix workstation in mid 90s. Do you honestly thing of that as something which has any value outside of museum ;)?

I'm a computer history hobbyist. I really like old machines. However, I like them in their original form, with their original operating systems. Blade 1000 is great for Solaris, but for FreeBSD... Well, i I need FreeBSD, I just get an amd64 machine, either a "physical" or a virtual one.
 
I been playing around with LLVM and I must say I like it I might try compiling the FreeBSD sources with it using another OBJDIR so I do not mess up my already compiled sources with GCC. I'll tell you how it goes when I get it finished.
 
well llvm-gcc compiles some of world then errors out at /usr/src/lib/fasm or close to that did this last night so I need to rerun the make buildworld to make sure.
 
Back
Top