blob: 43b99e894a9139c286b86239148fa83ddae3687e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
inherit cmake-multilib flag-o-matic
MY_P="llvm-${PV}"
DESCRIPTION="A fuzzing library distributed as part of LLVM"
HOMEPAGE="http://llvm.org/docs/LibFuzzer.html"
SRC_URI="http://llvm.org/releases/${PV}/${MY_P}.src.tar.xz"
LICENSE="UoI-NCSA"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
S_ROOT="${WORKDIR}/${MY_P}.src"
S="${S_ROOT}/lib/Fuzzer"
PATCHES=(
"${FILESDIR}"/${P}-32-bit.patch #612656
)
src_prepare() {
cmake-utils_src_prepare
sed -i '/CMAKE_CXX_FLAGS/d' CMakeLists.txt || die
}
multilib_src_configure() {
append-cxxflags -std=c++11
local mycmakeargs=(
"-DLLVM_USE_SANITIZE_COVERAGE=ON"
"-DLLVM_USE_SANITIZER=Address"
"-DLIB_DIR=$(get_libdir)"
)
cmake-utils_src_configure
}
multilib_src_install() {
newlib.a libLLVMFuzzer.a libFuzzer.a
newlib.a libLLVMFuzzerNoMain.a libFuzzerNoMain.a
}
multilib_src_install_all() {
dodoc "${S_ROOT}/docs/LibFuzzer.rst"
}
|