LLVM/Clang - Default compiler in FreeBSD 9?

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

LLVM/Clang - Default compiler in FreeBSD 9?

Postby frooyo » 21 Dec 2011, 03:39

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)?
frooyo
Junior Member
 
Posts: 18
Joined: 11 Dec 2011, 01:59

Postby darcsis » 21 Dec 2011, 05:17

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
darcsis
Junior Member
 
Posts: 53
Joined: 17 Nov 2008, 03:37

Postby wblock@ » 21 Dec 2011, 05:25

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.
User avatar
wblock@
Old Fart
 
Posts: 10182
Joined: 07 Sep 2009, 23:23
Location: Milky Way galaxy

Postby frooyo » 21 Dec 2011, 05:29

wblock@ wrote: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.
frooyo
Junior Member
 
Posts: 18
Joined: 11 Dec 2011, 01:59

Postby wblock@ » 21 Dec 2011, 17:18

Probably no date, just "when it's ready".
User avatar
wblock@
Old Fart
 
Posts: 10182
Joined: 07 Sep 2009, 23:23
Location: Milky Way galaxy

Postby frooyo » 21 Dec 2011, 20:11

Thanks.
We can mark this topic closed.
frooyo
Junior Member
 
Posts: 18
Joined: 11 Dec 2011, 01:59

Postby gkontos » 22 Dec 2011, 00:16

frooyo wrote: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
User avatar
gkontos
Senior Member
 
Posts: 1370
Joined: 09 Dec 2009, 08:36
Location: Polidendri, GR

Postby arrowdodger » 22 Dec 2011, 13:53

IIRC, removing all GPL bits from base is planned for FreeBSD 10.
arrowdodger
Junior Member
 
Posts: 2
Joined: 06 Dec 2011, 08:37

Postby frooyo » 23 Dec 2011, 03:37

arrowdodger wrote:IIRC, removing all GPL bits from base is planned for FreeBSD 10.


Excellent!
frooyo
Junior Member
 
Posts: 18
Joined: 11 Dec 2011, 01:59

Postby oleglelchuk » 23 Dec 2011, 05:29

So, gcc 4.2.1 will be removed from the base system of FreeBSD 10? That's good news.
oleglelchuk
Junior Member
 
Posts: 34
Joined: 25 Oct 2009, 14:53

Postby vertexSymphony » 23 Dec 2011, 06:56

oleglelchuk wrote: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
User avatar
vertexSymphony
Junior Member
 
Posts: 78
Joined: 23 May 2010, 22:12
Location: Buenos Aires, Argentina

Postby Beastie » 23 Dec 2011, 08:08


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!
Beastie
Senior Member
 
Posts: 1859
Joined: 28 Mar 2009, 11:27
Location: /dev/earth0

Postby vertexSymphony » 23 Dec 2011, 09:00

Beastie wrote: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
User avatar
vertexSymphony
Junior Member
 
Posts: 78
Joined: 23 May 2010, 22:12
Location: Buenos Aires, Argentina


Return to General

Who is online

Users browsing this forum: No registered users and 0 guests