25fe2 FreeBSD/CLANG ready for testing -> now imported in HEAD - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Development > FreeBSD Development

FreeBSD Development Kernel development, writing drivers, coding, and questions regarding FreeBSD internals.

Reply
 
Thread Tools Display Modes
  #1  
Old April 16th, 2010, 23:58
DutchDaemon's Avatar
DutchDaemon DutchDaemon is offline
Administrator
 
Join Date: Nov 2008
Location: Rotterdam, the Netherlands
Posts: 9,816
Thanks: 29
Thanked 1,883 Times in 1,329 Posts
Default FreeBSD/CLANG ready for testing -> now imported in HEAD

CLANG is a new C compiler built to work with LLVM. Getting away from gcc on the BSD side is kind of important (including, but not only because of GPLv3) so getting FreeBSD to compile and work with CLANG is a high profile project.

Read more ...
__________________
FreeBSD Forums: Information for New Members | FreeBSD Forums Rules
FreeBSD Resources: The FreeBSD Handbook | Manuals | FAQ | Wiki
Before you post: How to ask questions the smart way
If you must know .. So, what does an Adminstrator/Moderator do?
---> Do not PM me with FreeBSD questions. I do not work here. <---

Last edited by DutchDaemon; April 17th, 2010 at 00:31.
Reply With Quote
The Following User Says Thank You to DutchDaemon For This Useful Post:
vertexSymphony (May 26th, 2010)
  #2  
Old April 17th, 2010, 02:04
Oko's Avatar
Oko Oko is offline
Member
 
Join Date: Nov 2008
Location: Kosovo, Srbija
Posts: 326
Thanks: 27
Thanked 66 Times in 49 Posts
Default

First test. Can it compile itself?
__________________
Wanting to learn is so rare a merit that it should be encouraged.
Reply With Quote
  #3  
Old April 17th, 2010, 12:06
Andrius Andrius is offline
Junior Member
 
Join Date: Nov 2008
Posts: 39
Thanks: 5
Thanked 6 Times in 5 Posts
Default

It can, or at least it should be able to. If it doesn't, let us know.
Reply With Quote
  #4  
Old April 17th, 2010, 12:34
dclau's Avatar
dclau dclau is offline
Junior Member
 
Join Date: Dec 2008
Location: Romania
Posts: 46
Thanks: 25
Thanked 10 Times in 6 Posts
Default

Ivan's blog unavailable right now:
Quote:
You tried to access the address http://ivoras.sharanet.org/blog/ , which is currently unavailable.
Reply With Quote
  #5  
Old April 17th, 2010, 12:56
Andrius Andrius is offline
Junior Member
 
Join Date: Nov 2008
Posts: 39
Thanks: 5
Thanked 6 Times in 5 Posts
Default

Original email

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.
Reply With Quote
  #6  
Old April 17th, 2010, 14:50
oliverh's Avatar
oliverh oliverh is offline
Member
 
Join Date: Nov 2008
Location: 127.0.0.1
Posts: 557
Thanks: 51
Thanked 36 Times in 33 Posts
Default

Quote:
Originally Posted by dclau View Post
Ivan's blog unavailable right now:

No problems: http://ivoras.sharanet.org/blog/tree...-testing!.html

Maybe just a small hiccup.
__________________
What was the goal of the Linux community--to replace Windows? One can imagine higher aspirations., Bill Joy
Reply With Quote
  #7  
Old April 17th, 2010, 20:33
kpedersen kpedersen is offline
Member
 
Join Date: Apr 2009
Posts: 674
Thanks: 9
Thanked 100 Times in 72 Posts
Default

I tried this a while ago and it compiled etc... perfectly, but the c++ was broken. Has any work been done on this?
Reply With Quote
  #8  
Old April 17th, 2010, 20:45
OH OH is offline
Member
 
Join Date: Aug 2009
Location: The Netherlands
Posts: 208
Thanks: 4
Thanked 31 Times in 27 Posts
Default

Quote:
Originally Posted by kpedersen View Post
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 for it
Reply With Quote
  #9  
Old April 17th, 2010, 21:05
Andrius Andrius is offline
Junior Member
 
Join Date: Nov 2008
Posts: 39
Thanks: 5
Thanked 6 Times in 5 Posts
Default

Quote:
Originally Posted by kpedersen View Post
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.
Reply With Quote
  #10  
Old April 18th, 2010, 01:00
troberts troberts is offline
Junior Member
 
Join Date: Dec 2008
Location: Waynesboro, Pennsylvania, USA
Posts: 71
Thanks: 8
Thanked 3 Times in 3 Posts
Default Some questions

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?
Reply With Quote
  #11  
Old April 18th, 2010, 08:51
Andrius Andrius is offline
Junior Member
 
Join Date: Nov 2008
Posts: 39
Thanks: 5
Thanked 6 Times in 5 Posts
Default

Quote:
Originally Posted by troberts View Post
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.

Quote:
Originally Posted by troberts View Post
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.

Quote:
Originally Posted by troberts View Post
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.
Reply With Quote
  #12  
Old April 21st, 2010, 15:10
aragon aragon is offline
Giant Locked
 
Join Date: Nov 2008
Location: Cape Town, South Africa
Posts: 2,031
Thanks: 68
Thanked 253 Times in 203 Posts
Default

FWIW, Phoronix benchmarked LLVM/Clang recently. Pity they didn't stack it up against GCC 4.2 though...
Reply With Quote
  #13  
Old April 21st, 2010, 17:42
ckester's Avatar
ckester ckester is offline
Member
 
Join Date: Nov 2008
Location: near Seattle, WA (USA)
Posts: 288
Thanks: 28
Thanked 36 Times in 31 Posts
Default

Quote:
Originally Posted by aragon View Post
FWIW, Phoronix benchmarked LLVM/Clang 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 in the portstree. The apps Phoronix used to test compile times and performance are in the tree too.

Last edited by ckester; April 21st, 2010 at 18:21. Reason: grammar
Reply With Quote
  #14  
Old April 21st, 2010, 23:26
atarahas atarahas is offline
Junior Member
 
Join Date: Apr 2010
Posts: 20
Thanks: 0
Thanked 1 Time in 1 Post
Default

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.
Reply With Quote
  #15  
Old June 5th, 2010, 16:53
DutchDaemon's Avatar
DutchDaemon DutchDaemon is offline
Administrator
 
Join Date: Nov 2008
Location: Rotterdam, the Netherlands
Posts: 9,816
Thanks: 29
Thanked 1,883 Times in 1,329 Posts
Default

Import of clang/LLVM to happen on June 9th.

http://permalink.gmane.org/gmane.os....current/125675
__________________
FreeBSD Forums: Information for New Members | FreeBSD Forums Rules
FreeBSD Resources: The FreeBSD Handbook | Manuals | FAQ | Wiki
Before you post: How to ask questions the smart way
If you must know .. So, what does an Adminstrator/Moderator do?
---> Do not PM me with FreeBSD questions. I do not work here. <---
Reply With Quote
The Following User Says Thank You to DutchDaemon For This Useful Post:
vertexSymphony (June 27th, 2010)
  #16  
Old June 5th, 2010, 21:26
sossego's Avatar
sossego sossego is offline
Member
 
Join Date: Mar 2009
Location: qualquer na ontem da amanhã
Posts: 953
Thanks: 107
Thanked 65 Times in 50 Posts
Default

Is it available for testing on the PowerPC platform yet?
__________________
Smiles and laughter are the medicines for tears and sadness.

Um humano, sou eu com culpa e dificuldades.

Stay a child with a child's view of the world and life is worth more every moment you live it.
Reply With Quote
  #17  
Old June 5th, 2010, 23:56
dennylin93 dennylin93 is offline
Member
 
Join Date: Dec 2008
Posts: 784
Thanks: 34
Thanked 103 Times in 71 Posts
Default

[INFO]: import of clang/LLVM to happen on June 9th:
Quote:
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.
Reply With Quote
  #18  
Old June 6th, 2010, 01:11
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Member
 
Join Date: Nov 2008
Location: Eindhoven, Netherlands
Posts: 794
Thanks: 19
Thanked 123 Times in 93 Posts
Default

My laptop overheated and shutdown while compiling llvm/clang
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #19  
Old June 6th, 2010, 11:31
phoenix's Avatar
phoenix phoenix is offline
Moderator
 
Join Date: Nov 2008
Location: Kamloops, BC, Canada
Posts: 3,140
Thanks: 43
Thanked 700 Times in 578 Posts
Default

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

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
  #20  
Old July 8th, 2011, 02:55
namor namor is offline
Junior Member
 
Join Date: Jul 2011
Posts: 14
Thanks: 2
Thanked 2 Times in 1 Post
Default

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?
Reply With Quote
  #21  
Old July 8th, 2011, 06:07
vermaden's Avatar
vermaden vermaden is offline
Giant Locked
 
Join Date: Nov 2008
Location: pl_PL.lodz
Posts: 2,191
Thanks: 59
Thanked 632 Times in 349 Posts
Default

Quote:
Originally Posted by namor View Post
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/3...809007#3809007
http://www.zdnet.com.au/gplv3-to-dri...-339281694.htm
http://lists.nycbug.org/pipermail/ta...er/010446.html
__________________
Religions, worst damnation of mankind.
"FreeBSD has always been the operating system that GNU/Linux should have been." Frank Pohlmann, IBM
http://vermaden.blogspot.com
Reply With Quote
The Following User Says Thank You to vermaden For This Useful Post:
vertexSymphony (July 8th, 2011)
  #22  
Old July 8th, 2011, 17:43
namor namor is offline
Junior Member
 
Join Date: Jul 2011
Posts: 14
Thanks: 2
Thanked 2 Times in 1 Post
Default

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:
  1. '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
  2. 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?

Last edited by DutchDaemon; July 8th, 2011 at 17:52. Reason: http://forums.freebsd.org/showthread.php?t=11799
Reply With Quote
  #23  
Old July 10th, 2011, 00:13
vermaden's Avatar
vermaden vermaden is offline
Giant Locked
 
Join Date: Nov 2008
Location: pl_PL.lodz
Posts: 2,191
Thanks: 59
Thanked 632 Times in 349 Posts
Default

The biggest problem of GPL3 is probably that You need bunch of lawyers to actually understand what it means.
__________________
Religions, worst damnation of mankind.
"FreeBSD has always been the operating system that GNU/Linux should have been." Frank Pohlmann, IBM
http://vermaden.blogspot.com
Reply With Quote
  #24  
Old July 11th, 2011, 15:21
Crivens Crivens is offline
Member
 
Join Date: Oct 2010
Posts: 549
Thanks: 72
Thanked 111 Times in 78 Posts
Default

Quote:
Originally Posted by vermaden View Post
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.
__________________
Optimists believe we live in the best world possible. Pessimists agree to this.

Two little lights, blinking out in a sky full of stars - we will never forget you. I miss you so much
Reply With Quote
The Following 3 Users Say Thank You to Crivens For This Useful Post:
graudeejs (July 11th, 2011), Slurp (November 19th, 2011), vertexSymphony (July 11th, 2011)
  #25  
Old July 11th, 2011, 15:52
graudeejs's Avatar
graudeejs graudeejs is offline
Style(9) Addict
 
Join Date: Nov 2008
Location: Riga, Latvia
Posts: 4,521
Thanks: 422
Thanked 607 Times in 475 Posts
Default

Quote:
Originally Posted by Crivens View Post
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
Reply With Quote
Reply

Tags
clang, llvm

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
www.ghostbsd.org and forum is ready to use. ericturgeon GNOME 5 November 25th, 2009 03:22
ZFS considered production ready in FreeBSD 8 danger@ News & Announcements 0 September 15th, 2009 21:34
Testing a FreeBSD port jack63ss Installation and Maintenance of FreeBSD Ports or Packages 7 September 1st, 2009 08:59
FreeBSD kernel compiles with clang? irkkaaja General 1 March 1st, 2009 19:42
[Solved] Documentation for setfib(2) in FreeBSD-HEAD Ole Networking 3 December 9th, 2008 09:28


All times are GMT +1. The time now is 15:42.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0