Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 269651 - [ebuild] clang C compiler
Summary: [ebuild] clang C compiler
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2009-05-13 05:38 UTC by Ravi Pinjala
Modified: 2009-10-25 20:25 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
clang SVN ebuild (clang-9999.ebuild,1023 bytes, text/plain)
2009-05-13 05:40 UTC, Ravi Pinjala
Details
dev-lang/clang-2.6_pre1.ebuild (clang-2.6_pre1.ebuild,1.00 KB, text/plain)
2009-09-04 19:11 UTC, Ravi Pinjala
Details
dev-lang/clang-2.6_pre1.ebuild, with static analyzer (clang-2.6_pre1.ebuild,1.26 KB, text/plain)
2009-09-14 18:49 UTC, Ravi Pinjala
Details
dev-lang/clang-2.6_pre2.ebuild (clang-2.6_pre2.ebuild,1.33 KB, text/plain)
2009-09-26 07:54 UTC, Ravi Pinjala
Details
WIP version of clang-2.6_pre2 (clang-2.6_pre2.ebuild,2.09 KB, text/plain)
2009-09-28 13:54 UTC, Bernard Cafarelli
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ravi Pinjala 2009-05-13 05:38:01 UTC
Clang (http://clang.llvm.org) is a C compiler being developed by the LLVM project. It's supposed to be smaller, faster, and cleaner than GCC. 

Reproducible: Always
Comment 1 Ravi Pinjala 2009-05-13 05:40:24 UTC
Created attachment 191108 [details]
clang SVN ebuild

My initial attempt at an ebuild. Unfortunately, it pulls down all of LLVM as well - clang seems to be completely dependent on the LLVM build system, and won't build outside of its source tree. This ebuild only installs clang, though.
Comment 2 Ravi Pinjala 2009-09-04 19:11:50 UTC
Created attachment 203137 [details]
dev-lang/clang-2.6_pre1.ebuild

Ebuild for the prerelease of Clang 2.6 (or is that 1.0?). The paths are hardcoded, mainly because I don't know how upstream is going to version this in the future - right now it's tied to the LLVM version. 

Clang still doesn't have its own build system; see http://llvm.org/bugs/show_bug.cgi?id=4840 for details on that.
Comment 3 Ravi Pinjala 2009-09-14 18:49:19 UTC
Created attachment 204112 [details]
dev-lang/clang-2.6_pre1.ebuild, with static analyzer

Added a USE flag for installing the Clang static analyzer too
Comment 4 Ravi Pinjala 2009-09-26 07:54:31 UTC
Created attachment 205269 [details]
dev-lang/clang-2.6_pre2.ebuild

Ebuild for clang-2.6 prerelease 2. Biggest change in this ebuild is switching to EAPI 2 for SRC_URI arrows, since upstream uses the same filenames for the different prereleases, and just puts them in different directories. >_>
Comment 5 Bernard Cafarelli gentoo-dev 2009-09-28 13:54:58 UTC
Created attachment 205474 [details]
WIP version of clang-2.6_pre2

Thanks for the work so far on this!
I hope to add clang in tree at the same time as llvm 2.6 release, here is my current version of the ebuild (lots of parts taken from llvm ebuild, like src_configure)
Comment 6 Ravi Pinjala 2009-09-28 16:53:26 UTC
Oh, awesome! Looking forward to seeing this in the tree. :D

One question: Clang uses LLVM's build system, but is it actually modified by any of LLVM's configure options? My understanding was that it's mostly independent of LLVM, unless you enable LTO.
Comment 7 Bernard Cafarelli gentoo-dev 2009-09-28 23:11:09 UTC
It does still use a few parameters generated by llvm's configure (release/debug output directory, cflags, ...), but this is more of a leftover from initial build system (when it was a simple subtool of llvm).

Hopefully by next version it will build independently so we don't have to recompile parts of llvm twice :)
Comment 8 Bernard Cafarelli gentoo-dev 2009-10-25 20:25:07 UTC
I've just added final 2.6 clang in tree, enjoy!