diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-libs/libFuzzer |
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-libs/libFuzzer')
-rw-r--r-- | dev-libs/libFuzzer/Manifest | 4 | ||||
-rw-r--r-- | dev-libs/libFuzzer/files/libFuzzer-3.9.1-32-bit.patch | 16 | ||||
-rw-r--r-- | dev-libs/libFuzzer/libFuzzer-3.9.1.ebuild | 48 | ||||
-rw-r--r-- | dev-libs/libFuzzer/metadata.xml | 10 |
4 files changed, 78 insertions, 0 deletions
diff --git a/dev-libs/libFuzzer/Manifest b/dev-libs/libFuzzer/Manifest new file mode 100644 index 000000000000..5669a3dcc6cc --- /dev/null +++ b/dev-libs/libFuzzer/Manifest @@ -0,0 +1,4 @@ +AUX libFuzzer-3.9.1-32-bit.patch 641 SHA256 28412406d69334f138362a68cf65e99ed8c4b1dbf665463001260e47b9658094 SHA512 0ef5c142530cdaeb46025c8a2f3bff14f0aac3c9c772008468a86ee3d9ebc54f8dbe133ee6a3b4c7bc29cc5d7363957d6db1b3a6e510460db52669982fd1e170 WHIRLPOOL a3a9c48d168f5e76f0b3ec2b36467f559bf3b7159f34aa4a884fecacc02f48663f4d149a78c093b468b2b680b21910d7f1d5ad0cdeac4fead6ef24417c170a88 +DIST llvm-3.9.1.src.tar.xz 18130436 SHA256 1fd90354b9cf19232e8f168faf2220e79be555df3aa743242700879e8fd329ee SHA512 50cbe8ee911080f586e77861c442348701bd02e2de0c090c54c34f82ac275ecfcd712af0f41e387c33b4a6057778a4258a27554292fe68ab4af3fd9dd6d90683 WHIRLPOOL 1cd1a25befcb178bec4a4aace4367167f3838d32edbe9db9de8c6e558c01c1fcf123f6d6f80b7ec9ff32b3d6dcf2de2f4eb4201d417c3d17a5c8a69934832903 +EBUILD libFuzzer-3.9.1.ebuild 1000 SHA256 84be3b5a302ed6ba350f8db0bb37b47e250719be800ad57466d833d917c14296 SHA512 2833285c4d2666dcad3d2ebd74e7d75f6cf8310f7ab728de61328ec524893016609f0a75a9d381bc1c1d71e0931e382c15fcc3e91dd4b053c8a33505326a9bcb WHIRLPOOL f335d9e43a9744f3daefd0125d42ba733154772e129f7abd03f827aba983cae235bd46d1d695e6dab231435fa75391a7c25a4bb9fd7bade6a2a73c6de662c5b9 +MISC metadata.xml 288 SHA256 1da842c16bfa4bed9071196a4b3496d836644db8f9c317bd03378799776bb32f SHA512 1b4ccb80b24e2843d577dfa4e2597058f1af080f28b3521293f72aca6b708e95b8922a29d227a58113a659deb3992d05ee20c3d950fda658c4cda48a39a90219 WHIRLPOOL e0c4b6681bbb5a21e1c056799818f57fd5673cd18cbef4712eb0120db21585e04ba8b80f3c50d40f9d9129eecb493e30b34c03427ffec2cdeed3147cb3a44010 diff --git a/dev-libs/libFuzzer/files/libFuzzer-3.9.1-32-bit.patch b/dev-libs/libFuzzer/files/libFuzzer-3.9.1-32-bit.patch new file mode 100644 index 000000000000..1257686d1c39 --- /dev/null +++ b/dev-libs/libFuzzer/files/libFuzzer-3.9.1-32-bit.patch @@ -0,0 +1,16 @@ +this code has been rewritten in newer versions so this patch can be thrown +away when we upgrade. + +https://bugs.gentoo.org/612656 + +--- a/FuzzerLoop.cpp ++++ b/FuzzerLoop.cpp +@@ -366,7 +366,7 @@ + double Lambda = 2.0 * log(2.0) / static_cast<double>(MaxCorpusLen); + std::exponential_distribution<> Dist(Lambda); + std::vector<double> Sizes; +- size_t TruncatePoints = std::max(1ul, TruncateMaxRuns / Corpus.size()); ++ size_t TruncatePoints = std::max((size_t)1, TruncateMaxRuns / Corpus.size()); + Sizes.reserve(TruncatePoints); + for (size_t I = 0; I < TruncatePoints; ++I) { + Sizes.push_back(Dist(MD.GetRand().Get_mt19937()) + 1); diff --git a/dev-libs/libFuzzer/libFuzzer-3.9.1.ebuild b/dev-libs/libFuzzer/libFuzzer-3.9.1.ebuild new file mode 100644 index 000000000000..43b99e894a91 --- /dev/null +++ b/dev-libs/libFuzzer/libFuzzer-3.9.1.ebuild @@ -0,0 +1,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" +} diff --git a/dev-libs/libFuzzer/metadata.xml b/dev-libs/libFuzzer/metadata.xml new file mode 100644 index 000000000000..83f3425f4281 --- /dev/null +++ b/dev-libs/libFuzzer/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>llvm@gentoo.org</email> +</maintainer> +<maintainer type="person"> + <email>vapier@gentoo.org</email> +</maintainer> +</pkgmetadata> |