1 |
commit: 1d2ecacd2d5c7b5b7a7169722b43d5a107844707 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Aug 21 09:43:45 2016 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Aug 22 15:11:48 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d2ecacd |
7 |
|
8 |
sys-libs/compiler-rt: Add a stand-alone ebuild for compiler-rt |
9 |
|
10 |
sys-libs/compiler-rt/compiler-rt-9999.ebuild | 53 ++++++++++++++++++++++++++++ |
11 |
sys-libs/compiler-rt/metadata.xml | 10 ++++++ |
12 |
2 files changed, 63 insertions(+) |
13 |
|
14 |
diff --git a/sys-libs/compiler-rt/compiler-rt-9999.ebuild b/sys-libs/compiler-rt/compiler-rt-9999.ebuild |
15 |
new file mode 100644 |
16 |
index 0000000..7c93672 |
17 |
--- /dev/null |
18 |
+++ b/sys-libs/compiler-rt/compiler-rt-9999.ebuild |
19 |
@@ -0,0 +1,53 @@ |
20 |
+# Copyright 1999-2016 Gentoo Foundation |
21 |
+# Distributed under the terms of the GNU General Public License v2 |
22 |
+# $Id$ |
23 |
+ |
24 |
+EAPI=6 |
25 |
+ |
26 |
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja} |
27 |
+CMAKE_MIN_VERSION=3.4.3 |
28 |
+PYTHON_COMPAT=( python2_7 ) |
29 |
+ |
30 |
+inherit cmake-utils git-r3 python-single-r1 |
31 |
+ |
32 |
+DESCRIPTION="Compiler runtime libraries for clang" |
33 |
+HOMEPAGE="http://llvm.org/" |
34 |
+SRC_URI="" |
35 |
+EGIT_REPO_URI="http://llvm.org/git/compiler-rt.git |
36 |
+ https://github.com/llvm-mirror/compiler-rt.git" |
37 |
+ |
38 |
+LICENSE="UoI-NCSA" |
39 |
+SLOT="0/${PV%.*}" |
40 |
+KEYWORDS="" |
41 |
+IUSE="+sanitize" |
42 |
+ |
43 |
+RDEPEND=" |
44 |
+ ~sys-devel/llvm-${PV} |
45 |
+ !<sys-devel/llvm-${PV} |
46 |
+ sanitize? ( ${PYTHON_DEPS} )" |
47 |
+DEPEND="${RDEPEND} |
48 |
+ ${PYTHON_DEPS}" |
49 |
+ |
50 |
+REQUIRED_USE=${PYTHON_REQUIRED_USE} |
51 |
+ |
52 |
+src_configure() { |
53 |
+ local clang_version=4.0.0 |
54 |
+ local libdir=$(get_libdir) |
55 |
+ local mycmakeargs=( |
56 |
+ # used to find cmake modules |
57 |
+ -DLLVM_LIBDIR_SUFFIX="${libdir#lib}" |
58 |
+ -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${clang_version}" |
59 |
+ |
60 |
+ # TODO: tests do not support standalone builds |
61 |
+ -DCOMPILER_RT_INCLUDE_TESTS=OFF |
62 |
+ -DCOMPILER_RT_BUILD_SANITIZERS=$(usex sanitize) |
63 |
+ ) |
64 |
+ |
65 |
+ cmake-utils_src_configure |
66 |
+} |
67 |
+ |
68 |
+src_install() { |
69 |
+ cmake-utils_src_install |
70 |
+ |
71 |
+ use sanitize && python_doscript "${S}"/lib/asan/scripts/asan_symbolize.py |
72 |
+} |
73 |
|
74 |
diff --git a/sys-libs/compiler-rt/metadata.xml b/sys-libs/compiler-rt/metadata.xml |
75 |
new file mode 100644 |
76 |
index 0000000..ea472dc |
77 |
--- /dev/null |
78 |
+++ b/sys-libs/compiler-rt/metadata.xml |
79 |
@@ -0,0 +1,10 @@ |
80 |
+<?xml version="1.0" encoding="UTF-8"?> |
81 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
82 |
+<pkgmetadata> |
83 |
+ <maintainer type="project"> |
84 |
+ <email>llvm@g.o</email> |
85 |
+ </maintainer> |
86 |
+ <use> |
87 |
+ <flag name="sanitize">Build compiler-rt's sanitizers</flag> |
88 |
+ </use> |
89 |
+</pkgmetadata> |