Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 483026 - sys-devel/sparse-9999 - add USE=llvm
Summary: sys-devel/sparse-9999 - add USE=llvm
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Miscellaneous
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-08-30 15:33 UTC by Daniel M. Weeks
Modified: 2013-09-05 09:17 UTC (History)
1 user (show)

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


Attachments
sys-devel/sparse-9999 w/ USE=llvm (sparse-9999.ebuild,1.31 KB, text/plain)
2013-08-30 15:35 UTC, Daniel M. Weeks
Details
patch for as-needed LDFLAG (sparse-9999-as-needed.patch,423 bytes, patch)
2013-08-30 18:08 UTC, Daniel M. Weeks
Details | Diff
Add as-needed patch to ebuild (sparse-9999.ebuild.patch,927 bytes, patch)
2013-08-30 18:10 UTC, Daniel M. Weeks
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel M. Weeks 2013-08-30 15:33:39 UTC
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
Comment 1 Daniel M. Weeks 2013-08-30 15:35:04 UTC
Created attachment 357436 [details]
sys-devel/sparse-9999 w/ USE=llvm
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2013-08-30 15:53:11 UTC
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() {
Comment 3 Daniel M. Weeks 2013-08-30 18:08:21 UTC
Created attachment 357442 [details, diff]
patch for as-needed LDFLAG
Comment 4 Daniel M. Weeks 2013-08-30 18:10:07 UTC
Created attachment 357444 [details, diff]
Add as-needed patch to ebuild
Comment 5 Daniel M. Weeks 2013-08-30 18:14:28 UTC
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 6 SpanKY gentoo-dev 2013-09-05 09:15:04 UTC
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.
Comment 7 SpanKY gentoo-dev 2013-09-05 09:17:56 UTC
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