38e7 FreeBSD/CLANG ready for testing -> now imported in HEAD [Archive] - The FreeBSD Forums

PDA

View Full Version : FreeBSD/CLANG ready for testing -> now imported in HEAD


DutchDaemon
April 16th, 2010, 23:58
CLANG (http://clang.llvm.org/) is a new C compiler built to work with LLVM (http://llvm.org/). Getting away from gcc on the BSD side is kind of important (including, but (http://clang.llvm.org/features.html) not only (http://clang.llvm.org/comparison.html) because of GPLv3) so getting FreeBSD to compile and work with CLANG is a high profile project.

Read more ... (http://ivoras.sharanet.org/blog/tree/2010-04-16.freebsdclang-ready-for-testing!.html)

Oko
April 17th, 2010, 02:04
First test. Can it compile itself?

Andrius
April 17th, 2010, 12:06
It can, or at least it should be able to. If it doesn't, let us know.

dclau
April 17th, 2010, 12:34
Ivan's blog unavailable right now:
You tried to access the address http://ivoras.sharanet.org/blog/ , which is currently unavailable.

Andrius
April 17th, 2010, 12:56
Original email (http://lists.freebsd.org/pipermail/freebsd-current/2010-April/016648.html)

Just note that email says to do:
cd clangbsd && make buildworld
echo NO_WERROR= >> /etc/make.conf
echo WERROR= >> /etc/make.conf

But this is wrong, you should do WERROR stuff before buildworld.

oliverh
April 17th, 2010, 14:50
Ivan's blog unavailable right now:


No problems: http://ivoras.sharanet.org/blog/tree/2010-04-16.freebsdclang-ready-for-testing!.html

Maybe just a small hiccup.

kpedersen
April 17th, 2010, 20:33
I tried this a while ago and it compiled etc... perfectly, but the c++ was broken. Has any work been done on this?

OH
April 17th, 2010, 20:45
I tried this a while ago and it compiled etc... perfectly, but the c++ was broken. Has any work been done on this?

They have special page (http://clang.llvm.org/cxx_status.html) for it

Andrius
April 17th, 2010, 21:05
I tried this a while ago and it compiled etc... perfectly, but the c++ was broken. Has any work been done on this?

A lot of work has been done in improving clang's C++ support, and since "a while ago" it has most definitely gotten better. It's not perfect, but it's getting there.

troberts
April 18th, 2010, 01:00
I am using the FreeBSD boot manager to dual-boot Windows and FreeBSD. Do I need to take any special steps or does it not matter?

Since I use ccache, do I need to modify any settings in /.cshrc or /etc/make.conf?

Can I use FreeBSD/Clang to recompile ports or should I stick with using it to compile the OS and kernel?

Andrius
April 18th, 2010, 08:51
I am using the FreeBSD boot manager to dual-boot Windows and FreeBSD. Do I need to take any special steps or does it not matter?
You shouldn't need any special steps since it's still the same FreeBSD, just compiled by clang and includes clang/llvm in base system. But as the email mentions, you shouldn't install it on real hardware yet, it's not tested enough, and if you lose data, it's your own fault for trusting experimental software. I'm not saying it won't work, just make sure you have backups if you want to replace normal FreeBSD with ClangBSD.

Since I use ccache, do I need to modify any settings in /.cshrc or /etc/make.conf?
Sorry, can't tell anything about ccache because I never used it.

Can I use FreeBSD/Clang to recompile ports or should I stick with using it to compile the OS and kernel?
Using clang with ports right now would be a very bad idea. You should stick with gcc for now. There is some work done to get ports to work with clang, but it's nowhere near complete yet. I expect some/many clang fixes to go to ports tree in the next few months, but don't quote me on that.

aragon
April 21st, 2010, 15:10
FWIW, Phoronix benchmarked LLVM/Clang (http://www.phoronix.com/scan.php?page=article&item=gcc_llvm_clang&num=1) recently. Pity they didn't stack it up against GCC 4.2 though...

ckester
April 21st, 2010, 17:42
FWIW, Phoronix benchmarked LLVM/Clang (http://www.phoronix.com/scan.php?page=article&item=gcc_llvm_clang&num=1) recently. Pity they didn't stack it up against GCC 4.2 though...

There's nothing preventing us from running the benchmark tests ourselves, rather than waiting for Phoronix or someone else to do it for us. Seems like something we'd want to be doing anyway, if we're serious about moving to clang.

There are several benchmark suites (http://www.freshports.org/search.php?stype=shortdescription&method=match&query=benchmark&num=10&orderby=category&orderbyupdown=asc&search=Search) in the portstree. The apps Phoronix used to test compile times and performance are in the tree too.

atarahas
April 21st, 2010, 23:26
I believe that switching mainline FreeBSD to Clang would be a good idea. It would make FreeBSD dependent on a completely BSD toolchain. It would be great if 9.0 or 8.x is compiled with Clang. Clang has many other benefits such as better diagnostics. I support the idea of moving FreeBSD to Clang.

DutchDaemon
June 5th, 2010, 16:53
Import of clang/LLVM to happen on June 9th.

http://permalink.gmane.org/gmane.os.freebsd.current/125675

sossego
June 5th, 2010, 21:26
Is it available for testing on the PowerPC platform yet?

dennylin93
June 5th, 2010, 23:56
[INFO]: import of clang/LLVM to happen on June 9th (http://lists.freebsd.org/pipermail/freebsd-current/2010-June/017650.html):
Clang will be enabled to be built on amd64/i386/ppc by default and disabled
everywhere else.

It might be ready for testing. The post wasn't really clear though.

Carpetsmoker
June 6th, 2010, 01:11
My laptop overheated and shutdown while compiling llvm/clang :\

phoenix
June 6th, 2010, 11:31
Yeah, if you go through the archives, there's a post that shows the difference in time it takes to compile clang. Using gcc it was over 1100 (sec/min?) and building clang with clang was under 700.

namor
July 8th, 2011, 02:55
What's the problem with GPLv3 and BSD? What's _different_ compared to GPLv2, that makes it infeasible to use GCC as a userland tool in FreeBSD?

vermaden
July 8th, 2011, 06:07
What's the problem with GPLv3 and BSD? What's _different_ compared to GPLv2, that makes it infeasible to use GCC as a userland tool in FreeBSD?

http://www.mobileread.com/forums/showthread.php?t=31161
http://stackoverflow.com/questions/3808648/why-does-microsoft-and-apple-ban-gplv3-and-when-would-i-fall-into-the-same-situa/3809007#3809007
http://www.zdnet.com.au/gplv3-to-drive-users-from-linux-to-freebsd-339281694.htm
http://lists.nycbug.org/pipermail/talk/2007-September/010446.html

namor
July 8th, 2011, 17:43
http://www.mobileread.com/forums/showthread.php?t=31161
http://stackoverflow.com/questions/3808648/why-does-microsoft-and-apple-ban-gplv3-and-when-would-i-fall-into-the-same-situa/3809007#3809007
http://www.zdnet.com.au/gplv3-to-drive-users-from-linux-to-freebsd-339281694.htm
http://lists.nycbug.org/pipermail/talk/2007-September/010446.html

Ok, I read through all of the links yesterday and figured there are two major, suspected problems with GPLv3, that did not exist with GPLv2:


'Distributing' a FreeBSD (with GPLv3 Code in it, like gcc) in any way, be it a mirror or an embedded application makes YOU a distributor of GPLv3 code and by that, you basically promise to not sue anyone using that GPLv3 code with patents you hold 'against' that GPLv3 code. The big, presumed problem is, that you also promise not to sue anyone basing his or her work on that code. So if your company mirrors FreeBSD with a GPLv3 gcc, you cannot sue anyone for infringing your patents, as long as the infringement is based on the gcc
The second and less important point should be here, but while writing the first, I forgot it. I will replace this section once I remember and figure out how to edit posts. :-)


As for the first point, I read the FreeBSD foundation hired lawyers to look into it. Has there been a result so far?

vermaden
July 10th, 2011, 00:13
The biggest problem of GPL3 is probably that You need bunch of lawyers to actually understand what it means.

Crivens
July 11th, 2011, 15:21
The biggest problem of GPL3 is probably that You need bunch of lawyers to actually understand what it means.

... and the biggest problem with a bunch of lawyers is that you get more answers as said bunch contains lawyers.

IIRC Kishon (the author) refused to sign any contract with more than one page and written in such a way that he needed to read it more than once to understand it. Let that be the goal for licences and EULAs.

graudeejs
July 11th, 2011, 15:52
IIRC Kishon (the author) refused to sign any contract with more than one page and written in such a way that he needed to read it more than once to understand it. Let that be the goal for licences and EULAs.

Well stated

rockworldmi
September 23rd, 2011, 11:42
I think pcc will be incorporated in future BSDs!

Carpetsmoker
September 24th, 2011, 05:40
Not on FreeBSD ...

OpenBSD and NetBSD have distant future plans. With distant future I mean several years at least.

0