Jump to content

Photo

Clang and Portage

clang llvm portage

2 replies to this topic

#1
uxcn

uxcn

    Newbie

  • Members
  • Pip
  • 4 posts
  • LocationSeattle, WA

I'm curious if there is any current effort to track packages not building under Clang/LLVM.  FreeBSD switched as a default, and I've heard that Debian was considering a switch at one point.  Gentoo seemed to have an effort to track packages, but it seems like it may have fallen off the radar.

 

There are some major blockers, like glibc, but the list already seems fairly small.  Are there any formal plans for support Clang/LLVM as a system compiler going forward?


Some possibly useful scripts...


#2
paddymac

paddymac

    Advanced Member

  • Members
  • PipPipPip
  • 36 posts

The Gentoo tracker bug is just for Gentoo FreeBSD. That's probably because Clang is the default compiler for FreeBSD. Keep in mind that the primary reason FreeBSD switched to Clang as the default compiler was because Clang is BSD-licensed instead of GPL-licensed. It wasn't because of technical reasons. GCC is still a more reliable compiler.

 

That said, I'm assuming that the current attitude toward package compatibility with Clang is that it's primarily an upstream issue. In other words, if a package fails to compile with Clang, bugs should be filed either with the developers of Clang if it is a compiler bug or with the developers of specific software if it is an issue with the code. Gentoo would probably accept patches which allow packages to compile with Clang if they were submitted, but those patches should also be submitted upstream -- assuming the package is still being developed.



#3
uxcn

uxcn

    Newbie

  • Members
  • Pip
  • 4 posts
  • LocationSeattle, WA

Technically it's UoI-NCSA licensed, which essentially is BSD-3.  Clang/LLVM is still a newer compiler, and GCC is generally still more mature particularly where optimization is important.  Although, my experience is that compiling against more than one compiler tends to improve overall code quality, generally regardless.

 

Actually, I had noticed a funtoo wiki page on it (also gentoo), so I was curious if there were plans going forward.  I've personally been experimenting with it on my laptop, and I've had somewhat stable results so far.  There are some blockers and show stoppers though,  I'm submitting what I can upstream as I have time.

 

If anyone is curious or wants to experiment, I'm keeping track of issue packages here, generally including versions.


Some possibly useful scripts...




Reply to this topic



  



Also tagged with one or more of these keywords: clang, llvm, portage

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users