In upstream commit 45a6fbff825047582979c93ca363d8483122c3d5, sparse gained LLVM support. It is an optional compile-time feature. The live ebuild should have a use flag for LLVM. (This is especially useful since it seems somewhat experimental and is currently broken on HEAD.) Reproducible: Always
Created attachment 357436 [details] sys-devel/sparse-9999 w/ USE=llvm
Comment on attachment 357436 [details] sys-devel/sparse-9999 w/ USE=llvm --- sparse-9999.ebuild 2013-05-12 17:43:47.742070472 +0200 +++ - 2013-08-30 17:53:03.326571018 +0200 @@ -23,9 +23,10 @@ LICENSE="OSL-1.1" SLOT="0" -IUSE="gtk test xml" +IUSE="gtk llvm test xml" RDEPEND="gtk? ( x11-libs/gtk+:2 ) + llvm? ( >=sys-devel/llvm-3.0 ) xml? ( dev-libs/libxml2 )" DEPEND="${RDEPEND} gtk? ( virtual/pkgconfig ) @@ -39,7 +40,7 @@ -e '/^CFLAGS =/{s:=:+= $(CPPFLAGS):;s:-O2 -finline-functions::}' \ -e "s:pkg-config:${PKG_CONFIG}:" \ Makefile || die - export MAKEOPTS+=" V=1 AR=${AR} CC=${CC} HAVE_GTK2=$(usex gtk) HAVE_LIBXML=$(usex xml)" + export MAKEOPTS+=" V=1 AR=${AR} CC=${CC} HAVE_GTK2=$(usex gtk) HAVE_LLVM=$(usex llvm) HAVE_LIBXML=$(usex xml)" } src_compile() {
Created attachment 357442 [details, diff] patch for as-needed LDFLAG
Created attachment 357444 [details, diff] Add as-needed patch to ebuild
The aforementioned problem builing with llvm is related to as-needed. The upstream makefile add LDFLAGS from llvm-config before the objects that depend on them, causing the linker to skip some needed libraries thus breaking the build. The attached patch corrects this behavior.
Comment on attachment 357442 [details, diff] patch for as-needed LDFLAG this is incorrect. you've moved LDFLAGS to after the objects making the needed behavior be disabled rather than fixing the underlying problem.
should be all set now in the tree; thanks for the report! Commit message: Add USE=llvm support http://sources.gentoo.org/sys-devel/sparse/metadata.xml?r1=1.6&r2=1.7 http://sources.gentoo.org/sys-devel/sparse/sparse-9999.ebuild?r1=1.12&r2=1.13