diff options
author | Bernard Cafarelli <voyageur@gentoo.org> | 2009-09-29 13:03:24 +0000 |
---|---|---|
committer | Bernard Cafarelli <voyageur@gentoo.org> | 2009-09-29 13:03:24 +0000 |
commit | 5b2689b7902b9861bef3e1730cca25d3afbd50b5 (patch) | |
tree | e644709be4bd1dbc6b42981f49ee7a775db7f232 | |
parent | Update license and metadata description (diff) | |
download | gnustep-5b2689b7902b9861bef3e1730cca25d3afbd50b5.tar.gz gnustep-5b2689b7902b9861bef3e1730cca25d3afbd50b5.tar.bz2 gnustep-5b2689b7902b9861bef3e1730cca25d3afbd50b5.zip |
Add USE-flag to build with llvm-gcc
svn path=/overlay/; revision=419
-rw-r--r-- | sys-devel/llvm/Manifest | 4 | ||||
-rw-r--r-- | sys-devel/llvm/llvm-2.6_pre2.ebuild | 27 | ||||
-rw-r--r-- | sys-devel/llvm/metadata.xml | 1 |
3 files changed, 24 insertions, 8 deletions
diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest index 347ca49..5bb3886 100644 --- a/sys-devel/llvm/Manifest +++ b/sys-devel/llvm/Manifest @@ -1,4 +1,4 @@ AUX llvm-2.6-nohtmltargz.patch 649 RMD160 be768d193d174df9ebfea94554525f38fde66ffd SHA1 a873ed000c90e6d58aef16f86a1ee1c1ac112d1a SHA256 b8628c865dc888dcb73a3548f91e1eefa71e49ed57d1e877f7b8e759f34e8109 DIST llvm-2.6_pre2.tar.gz 7782489 RMD160 142751db6e0f130ef6e442c0fe9c5943cab47b9e SHA1 ec4d9ffa1d3dbd8a3f657006d5cc62c5548484ac SHA256 da24eda98e32512e432d6996ccd8007cd0a18b773075e453b7f8058ee33e8f04 -EBUILD llvm-2.6_pre2.ebuild 4022 RMD160 12ea0187d0b48640da72a15c3cf112f5ad50c40a SHA1 23e9cbbfc6dd28387a7a94662a0797e0cca5a7c9 SHA256 f7831b89f6451757ec2632cbd0fab92096455254ee68a6877a3caa3b628d7582 -MISC metadata.xml 2080 RMD160 4d389cb326d77e0c166cabf9edad4aa7818b4cd2 SHA1 bd76fff2add8e529078f7fca32fcc55d9e417be9 SHA256 7acc78dcf54d7d3b2c5e21aee5aa739fcf6526f69865e759fc9cb8380a749b5c +EBUILD llvm-2.6_pre2.ebuild 4533 RMD160 1c396e65c51db79888d34988f2e9c98f37fd739c SHA1 ea79f004d101cf974a72011436461a9515ed28ac SHA256 b5f9781b118e16e71f79acaf0fc84f6510a9d20b41e3a2eebe4b45be24988301 +MISC metadata.xml 2159 RMD160 30145f0d3b8241dee5e6db79f86f0899cce412b9 SHA1 b2d0fea596fa2beb19ff83ee20b0a04e18f6079b SHA256 329f66555db96bd7100e69f5943e1604e882f896f007301eeac9265bc440a2ac diff --git a/sys-devel/llvm/llvm-2.6_pre2.ebuild b/sys-devel/llvm/llvm-2.6_pre2.ebuild index 889a757..1c65b2d 100644 --- a/sys-devel/llvm/llvm-2.6_pre2.ebuild +++ b/sys-devel/llvm/llvm-2.6_pre2.ebuild @@ -13,7 +13,7 @@ SRC_URI="http://llvm.org/prereleases/${PV/_pre*}/pre-release${PV/*_pre}/${PN}-${ LICENSE="UoI-NCSA" SLOT="0" KEYWORDS="~amd64 ~ppc ~x86" -IUSE="alltargets debug test" +IUSE="alltargets debug llvm-gcc test" DEPEND="dev-lang/perl >=sys-devel/make-3.79 @@ -23,6 +23,7 @@ DEPEND="dev-lang/perl !~sys-devel/bison-1.875 >=sys-devel/gcc-3.0 >=sys-devel/binutils-2.18 + llvm-gcc? ( sys-devel/llvm-gcc ) test? ( dev-util/dejagnu )" RDEPEND="dev-lang/perl" @@ -71,7 +72,7 @@ src_prepare() { -e 's,^PROJ_libdir.*,PROJ_libdir := $(DESTDIR)/usr/'$(get_libdir), \ -i Makefile.config.in || die "sed failed" - # points by default to the build directory + # this points by default to the build directory einfo "Fixing gccld and gccas" sed -e 's,^TOOLDIR.*,TOOLDIR=/usr/bin,' \ -i tools/gccld/gccld.sh tools/gccas/gccas.sh || die "sed failed" @@ -113,11 +114,25 @@ src_configure() { fi # things would be built differently depending on whether llvm-gcc is - # used or not. Forcibly disabled here until someone add llvm-gcc + # used or not. + local LLVM_GCC_DIR=/dev/null + local LLVM_GCC_DRIVER=nope ; local LLVM_GPP_DRIVER=nope + if use llvm-gcc ; then + LLVM_GCC_DIR=$(find /usr/$(get_libdir)/llvm-gcc/ -mindepth 1 -maxdepth 1 2> /dev/null) + LLVM_GCC_DRIVER=$(find ${LLVM_GCC_DIR} -name 'llvm*-gcc' 2> /dev/null) + + if [[ -z ${LLVM_GCC_DRIVER} ]] ; then + die "failed to find installed llvm-gcc, LLVM_GCC_DIR=${LLVM_GCC_DIR}" + fi + + einfo "Using $LLVM_GCC_DRIVER" + LLVM_GPP_DRIVER=${LLVM_GCC_DRIVER/%-gcc/-g++} + fi + CONF_FLAGS="${CONF_FLAGS} \ - --with-llvmgccdir=/dev/null \ - --with-llvmgcc=none \ - --with-llvmgxx=none" + --with-llvmgccdir=${LLVM_GCC_DIR} \ + --with-llvmgcc=${LLVM_GCC_DRIVER} \ + --with-llvmgxx=${LLVM_GPP_DRIVER}" econf ${CONF_FLAGS} || die "econf failed" } diff --git a/sys-devel/llvm/metadata.xml b/sys-devel/llvm/metadata.xml index c0ec75a..7181bf0 100644 --- a/sys-devel/llvm/metadata.xml +++ b/sys-devel/llvm/metadata.xml @@ -13,5 +13,6 @@ 4. LLVM does not imply things that you would expect from a high-level virtual machine. It does not require garbage collection or run-time code generation (In fact, LLVM makes a great static compiler!). Note that optional LLVM components can be used to build high-level virtual machines and other systems that need these services.</longdescription> <use> <flag name='alltargets'>Build all host targets (default: host only)</flag> + <flag name='llvm-gcc'>Build LLVM with <pkg>sys-devel/llvm-gcc</pkg></flag> </use> </pkgmetadata> |