15e68 [Solved] LLVM/Clang - Default compiler in FreeBSD 9? - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Base System > General

General General questions about the FreeBSD operating system. Ask here if your question does not fit elsewhere.

Reply
 
Thread Tools Display Modes
  #1  
Old December 21st, 2011, 04:39
frooyo frooyo is offline
Junior Member
 
Join Date: Dec 2011
Posts: 18
Thanks: 2
Thanked 0 Times in 0 Posts
Default LLVM/Clang - Default compiler in FreeBSD 9?

1a. Is LLVM/Clang the default C/C++ compiler for FreeBSD 9 (amd64)?

1b. If so, how do I envoke the llvm compiler, meaning - what's the equivalent of running "gcc ..."?

2. Was all of FreeBSD 9 (amd64) built using LLVM/Clang solely (no GCC)?

3. Is GCC completely removed from FreeBSD 9 (amd64)?
Reply With Quote
  #2  
Old December 21st, 2011, 06:17
darcsis darcsis is offline
Junior Member
 
Join Date: Nov 2008
Posts: 53
Thanks: 0
Thanked 8 Times in 6 Posts
Default

1. No
2. Search 'clang build' on wiki.freebsd.org for details about how to employ 'llvm/clang' while compile things.
3. For kernel and base system, yes. for the ports system, no. Many ports need patches to be built with clang. And some won't compile if clang is used.
4. No
Reply With Quote
The Following User Says Thank You to darcsis For This Useful Post:
frooyo (December 21st, 2011)
  #3  
Old December 21st, 2011, 06:25
wblock@'s Avatar
wblock@ wblock@ is offline
Moderator
 
Join Date: Sep 2009
Location: Milky Way galaxy
Posts: 7,720
Thanks: 432
Thanked 1,759 Times in 1,457 Posts
Default

1a. No, but it's available as an alternate to gcc.
1b. "clang ..."

2. No, although it can be: http://wiki.freebsd.org/BuildingFreeBSDWithClang

3. No. Maybe later.
Reply With Quote
The Following User Says Thank You to wblock@ For This Useful Post:
frooyo (December 21st, 2011)
  #4  
Old December 21st, 2011, 06:29
frooyo frooyo is offline
Junior Member
 
Join Date: Dec 2011
Posts: 18
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by wblock@ View Post
1a. No, but it's available as an alternate to gcc.
1b. "clang ..."

2. No, although it can be: http://wiki.freebsd.org/BuildingFreeBSDWithClang

3. No. Maybe later.
What's the current planned date to complete replace GCC with LLVM/Clang?

That status page doesn't make it clear.
Reply With Quote
  #5  
Old December 21st, 2011, 18:18
wblock@'s Avatar
wblock@ wblock@ is offline
Moderator
 
Join Date: Sep 2009
Location: Milky Way galaxy
Posts: 7,720
Thanks: 432
Thanked 1,759 Times in 1,457 Posts
Default

Probably no date, just "when it's ready".
Reply With Quote
  #6  
Old December 21st, 2011, 21:11
frooyo frooyo is offline
Junior Member
 
Join Date: Dec 2011
Posts: 18
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Thanks.
We can mark this topic closed.
Reply With Quote
  #7  
Old December 22nd, 2011, 01:16
gkontos's Avatar
gkontos gkontos is offline
Senior Member
 
Join Date: Dec 2009
Location: Polidendri, GR
Posts: 1,266
Thanks: 42
Thanked 218 Times in 164 Posts
Default

Quote:
Originally Posted by frooyo View Post
What's the current planned date to complete replace GCC with LLVM/Clang?

That status page doesn't make it clear.
Just to add here a few things. The main issue with this replacement is not with FreeBSD world & kernel. At least on i386 and amd64 architectures. The problem is getting ports to successfully compile. You can get some clues here:

http://wiki.freebsd.org/PortsAndClang
__________________
Powered by BareBSD
Reply With Quote
  #8  
Old December 22nd, 2011, 14:53
arrowdodger arrowdodger is offline
Junior Member
 
Join Date: Dec 2011
Posts: 2
Thanks: 4
Thanked 2 Times in 1 Post
Default

IIRC, removing all GPL bits from base is planned for FreeBSD 10.
Reply With Quote
  #9  
Old December 23rd, 2011, 04:37
frooyo frooyo is offline
Junior Member
 
Join Date: Dec 2011
Posts: 18
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by arrowdodger View Post
IIRC, removing all GPL bits from base is planned for FreeBSD 10.
Excellent!
Reply With Quote
  #10  
Old December 23rd, 2011, 06:29
oleglelchuk oleglelchuk is offline
Junior Member
 
Join Date: Oct 2009
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

So, gcc 4.2.1 will be removed from the base system of FreeBSD 10? That's good news.
Reply With Quote
  #11  
Old December 23rd, 2011, 07:56
vertexSymphony's Avatar
vertexSymphony vertexSymphony is offline
Junior Member
 
Join Date: May 2010
Location: Buenos Aires, Argentina
Posts: 78
Thanks: 166
Thanked 12 Times in 8 Posts
Default

Quote:
Originally Posted by oleglelchuk View Post
So, gcc 4.2.1 will be removed from the base system of FreeBSD 10? That's good news.
Well, as long as base system and ports cant be comfortably built with Clang, GCC will be there ... once that problem is gone, yeah, GCC 4.2 will be killed wih fire from base system and if a ports depends on it, well, it will depend on the gcc-4.2 (or a newer) port x'3
Here's the actual status of all this:

http://wiki.freebsd.org/BuildingFreeBSDWithClang
http://wiki.freebsd.org/GPLinBase
http://wiki.freebsd.org/PortsAndClang
Reply With Quote
  #12  
Old December 23rd, 2011, 09:08
Beastie Beastie is offline
Senior Member
 
Join Date: Mar 2009
Location: /dev/earth0
Posts: 1,702
Thanks: 0
Thanked 301 Times in 245 Posts
Default

Quote:
Originally Posted by gkontos View Post
Quote:
On the most recent run, you will note hundreds of regressions from a comparable run: 18036 packages were built (out of 22938), and there were 1161 errors.
It's still relatively early but already looking quite promising. Over 18,000 is not that bad!
__________________
May the source be with you!

Last edited by DutchDaemon; December 24th, 2011 at 04:30.
Reply With Quote
  #13  
Old December 23rd, 2011, 10:00
vertexSymphony's Avatar
vertexSymphony vertexSymphony is offline
Junior Member
 
Join Date: May 2010
Location: Buenos Aires, Argentina
Posts: 78
Thanks: 166
Thanked 12 Times in 8 Posts
Default

Quote:
Originally Posted by Beastie View Post
It's still relatively early but already looking quite promising. Over 18,000 is not that bad!
Well, the fact that they build doesn't mean that they work, they may fail at runtime.
But it's a promising number indeed
Reply With Quote
Reply

Tags
clang, compiling, freebsd 9, gcc, 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
[Solved] Clang/LLVM and /etc/make.conf nackpere FreeBSD Development 3 January 13th, 2013 17:31
[Solved] Is there any Fortran compiler works on freebsd 8.1 amd64? gchnhn Userland Programming & Scripting 3 October 1st, 2011 18:08
FreeBSD with GCC 4.6 compiler alie Off-Topic 5 September 26th, 2011 13:32
Is there any interest in this? - BASIC compiler for FreeBSD Eponasoft Userland Programming & Scripting 27 February 11th, 2010 18:30
D programming language compiler for FreeBSD WalterBright FreeBSD Development 2 April 9th, 2009 05:05


All times are GMT +1. The time now is 00:37.


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