1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

LLVM/Clang - Default compiler in FreeBSD 9?

Discussion in 'General' started by frooyo, Dec 21, 2011.

  1. frooyo

    frooyo New Member

    Messages:
    18
    Thanks Received:
    0
    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)?
     
  2. darcsis

    darcsis New Member

    Messages:
    53
    Thanks Received:
    8
    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
     
    frooyo thanks for this.
  3. wblock@

    wblock@ Administrator Staff Member Administrator Moderator Developer

    Messages:
    11,693
    Thanks Received:
    2,264
    frooyo thanks for this.
  4. frooyo

    frooyo New Member

    Messages:
    18
    Thanks Received:
    0
    What's the current planned date to complete replace GCC with LLVM/Clang?

    That status page doesn't make it clear.
     
  5. wblock@

    wblock@ Administrator Staff Member Administrator Moderator Developer

    Messages:
    11,693
    Thanks Received:
    2,264
    Probably no date, just "when it's ready".
     
  6. frooyo

    frooyo New Member

    Messages:
    18
    Thanks Received:
    0
    Thanks.
    We can mark this topic closed.
     
  7. gkontos

    gkontos Active Member

    Messages:
    1,395
    Thanks Received:
    246
    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
     
  8. arrowdodger

    arrowdodger New Member

    Messages:
    2
    Thanks Received:
    2
    IIRC, removing all GPL bits from base is planned for FreeBSD 10.
     
  9. frooyo

    frooyo New Member

    Messages:
    18
    Thanks Received:
    0
    Excellent!
     
  10. oleglelchuk

    oleglelchuk New Member

    Messages:
    34
    Thanks Received:
    0
    So, gcc 4.2.1 will be removed from the base system of FreeBSD 10? That's good news.
     
  11. vertexSymphony

    vertexSymphony New Member

    Messages:
    79
    Thanks Received:
    13
    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
     
  12. Beastie

    Beastie Active Member

    Messages:
    1,928
    Thanks Received:
    339
    It's still relatively early but already looking quite promising. Over 18,000 is not that bad!
     
  13. vertexSymphony

    vertexSymphony New Member

    Messages:
    79
    Thanks Received:
    13
    Well, the fact that they build doesn't mean that they work, they may fail at runtime.
    But it's a promising number indeed