summaryrefslogtreecommitdiff
path: root/sys-libs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-05-06 11:18:16 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-05-06 11:18:16 +0100
commitebce8994fe3cc4ca9fbc96ca837cb4c4e98adcbd (patch)
treef2204ce5f94dc3cb13728ff93649d889944952bb /sys-libs
parentfe1c8b732bd548b699d4c2ef725f67f8b8c8911c (diff)
gentoo resync : 06.05.2018
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/Manifest.gzbin15753 -> 15739 bytes
-rw-r--r--sys-libs/compiler-rt-sanitizers/Manifest3
-rw-r--r--sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-5.0.2.ebuild178
-rw-r--r--sys-libs/compiler-rt/Manifest2
-rw-r--r--sys-libs/compiler-rt/compiler-rt-5.0.2.ebuild112
-rw-r--r--sys-libs/freeipmi/Manifest4
-rw-r--r--sys-libs/freeipmi/freeipmi-1.6.2.ebuild (renamed from sys-libs/freeipmi/freeipmi-1.5.6.ebuild)2
-rw-r--r--sys-libs/glibc/Manifest7
-rw-r--r--sys-libs/glibc/glibc-2.19-r2.ebuild10
-rw-r--r--sys-libs/glibc/glibc-2.27-r1.ebuild1428
-rw-r--r--sys-libs/glibc/glibc-2.27-r2.ebuild10
-rw-r--r--sys-libs/glibc/glibc-9999.ebuild10
-rw-r--r--sys-libs/libcxx/Manifest2
-rw-r--r--sys-libs/libcxx/libcxx-5.0.2.ebuild207
-rw-r--r--sys-libs/libcxxabi/Manifest3
-rw-r--r--sys-libs/libcxxabi/libcxxabi-5.0.2.ebuild123
-rw-r--r--sys-libs/libomp/Manifest2
-rw-r--r--sys-libs/libomp/libomp-5.0.2.ebuild90
-rw-r--r--sys-libs/llvm-libunwind/Manifest2
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-5.0.2.ebuild46
20 files changed, 791 insertions, 1450 deletions
diff --git a/sys-libs/Manifest.gz b/sys-libs/Manifest.gz
index c52d6ccbf914..665aa30c1474 100644
--- a/sys-libs/Manifest.gz
+++ b/sys-libs/Manifest.gz
Binary files differ
diff --git a/sys-libs/compiler-rt-sanitizers/Manifest b/sys-libs/compiler-rt-sanitizers/Manifest
index e0893871916d..d82a39ad07ee 100644
--- a/sys-libs/compiler-rt-sanitizers/Manifest
+++ b/sys-libs/compiler-rt-sanitizers/Manifest
@@ -1,12 +1,15 @@
DIST compiler-rt-4.0.1.src.tar.xz 1434100 BLAKE2B ca6bf78fc07f387b7244a52ef648b06a5685effb46a66b241a9ee847ecafb17d02602f49b0dbe473d47202586874a043a6d75141400062f526d2f808da323e1e SHA512 cfeb625884b273f7c0e6767b81a8d3e5f24e0b96a510d5764d9d47a0e215fc841b4cb9d1843c8fb428cd21def720cfbfe8d3593ff5bb390548ebc8c32a902649
DIST compiler-rt-5.0.1.src.tar.xz 1498220 BLAKE2B 61503df8a4075c2fe1e42d480753b861321b5de127e340f48d648fc38d81c7967cead17e136beaa5235cc92540f158915fccec77cf39aa7c336d106c9d265222 SHA512 61e23775db78bdeed3003a509b45ae609287db31302fed186f3210d481ecf062d1828571e63482215ab00ff732df8f3fa6c77334dfb677e4b76eb555d476b8c4
+DIST compiler-rt-5.0.2.src.tar.xz 1543256 BLAKE2B 09fa84b8f3e9b8627a14387bc6eaa3d6b4588b9c8f1ac5a0114135fd830e3d45922408b237866789eb81bf38defde1186e0f7430a69f825bee12776b7cd9f74e SHA512 605a6d064877a860d6c9097e0220896dfceafed0a2392ad495c97aa347b97899d89f7e21932e29d3274f396615837414a3e730a915fe4f53eaa858ce3642a666
DIST compiler-rt-6.0.0.src.tar.xz 1633096 BLAKE2B d5df9b16ad474f687507013fb6eda8c7c3bbe479c85aab6ce428b93bbef2467538c0ba59c54dd9266b978da53c8c312a59e3b7abac843702048900f5cdbc1011 SHA512 717bed116ef43ebb2e18daf6fb737472edf57564947f53fe6368d3bbb080f63e986c0d1b94dbd087be998196ad7be54f4361854f8eb5214600b82449ba02c9c1
DIST compiler-rt-sanitizers-4.0.1-patchset.tar.xz 2384 BLAKE2B 6f9eee711c83570767f0bb634d0f91c18ee7f2af93a478938b8d5b6ce6f2c2fbaadb7bd5c7ee94a14dc1834359a046187db6bc7005b7c2efa539325dc0701ad9 SHA512 72d7357b4c27bbf8fa8b34803ddea905a9f1054e8fc7bf99a4ead9dc00408989ea2709f04be9cf45a27eeb4b9386c89feeb25b53a84f3cac9739196b89813887
DIST llvm-4.0.1.src.tar.xz 21065652 BLAKE2B 6327eed2d1feb108440f22d2581d1ff86c10a10c29793538d8d899c7e2dc83d3f7b147d3fd4bcce2bd2bf57c071b08c624aeafe40a3e7a3914506e7751727e6c SHA512 16adc39b34ddb628f81b171119a8e2a0e9138b25011e803ef0b688e2fbea116fc4953d3a1b61b90a98a75e33619f81566b7cb06a9a2ea4d04ac5e0eb303a2d1d
DIST llvm-5.0.1.src.tar.xz 23428720 BLAKE2B 3db4d33df21018d17eef0042c0d8d82a8412bd5daa99cfb5405a6ec83c5774178fa76b220e8731c2a9a64dabf898aa90fe29c685327bd63a4f078e8e94a9a77e SHA512 bee1d45fca15ce725b1f2b1339b13eb6f750a3a321cfd099075477ec25835a8ca55b5366172c4aad46592dfd8afe372349ecf264f581463d017f9cee2d63c1cb
+DIST llvm-5.0.2.src.tar.xz 23451868 BLAKE2B b7082be2e4ad557b29b9f6869811f262adcf5c73d552faf91b339bede75cf5eab58afefa12fa779a38be71fe2b8f4ea297c3213ee4e8370cc01972c59249d91c SHA512 3588be5ed969c3f7f6f16f56a12a6af2814d3d3c960d4a36ffebb0446cc75f19220bccee7fc605f9b01f5d5c188a905a046193cc12dec42dd5922048b5c27fe1
DIST llvm-6.0.0.src.tar.xz 25296048 BLAKE2B 7ea90bb63d6f26cfbc1c1ed2f243b0fcd8ad2ceb7963cf768d262cd55e9a0c71a9cfdea0333fb220faacf4540d924d2512532774dcfb52b52490ad74e38c09e0 SHA512 a71fdd5ddc46f01327ad891cfcc198febdbe10769c57f14d8a4fb7d514621ee4080e1a641200d3353c16a16731d390270499ec6cd3dc98fadc570f3eb6b52b8c
EBUILD compiler-rt-sanitizers-4.0.1.ebuild 4778 BLAKE2B 5689080c9783d288206a9a7f4d8cee487ef73a951d95baf7083719c89239b299a7cb71361e060876a7564701c353a857e9a640ff5e8f5054d76c6ede66523b5e SHA512 937fab2e9791bd122005469704e5cbbc8907d0f52cb277d779bd93451178e49c8f369be0dec5bff22338a7ed3920f0e125337e9ede02c957c123f968b69ec442
EBUILD compiler-rt-sanitizers-5.0.1.ebuild 5088 BLAKE2B 987b66738deed02d6b80f277e3c35db84290fe6c5dfc69c8b7cfaed7cdd5d9741a07c4d049825cd4c18ce1c1494042599ba84d1198064105d2d21e31bff3922d SHA512 6f04614e69ce636c69a80709aacdb0977b2dd670d6895fabef573ea1446bbf1764b9e437d811561a9e4a39f365f80c5a3417528f2f3dba19e55a3b5768de1d44
+EBUILD compiler-rt-sanitizers-5.0.2.ebuild 5090 BLAKE2B 8df55161104d4c26c378b1b429ab2f92132674235997f93a45c2627eda2cf01f9cbf6c20379ad7ed60728dc28ed4e17f7929248d21121255b8001da8d5ad2c78 SHA512 018f03bae139b7e88152f8f48cc85dd452cb0c9a9a858165709112c72791b6966f00a4d160c5b26a633ec1a8a69b68973c05f4d2d1c0e1513143c242d49d476a
EBUILD compiler-rt-sanitizers-6.0.0.ebuild 5010 BLAKE2B ed42f30c2bb225f949ae4fbb5e1cf17feace321101ea52d46eace6ce77e3d33daf59bef5c7e65e6b0a4aba5c51254a6673b8df909b792a4b25dc1b13c616c1b6 SHA512 2831e0d85ec4c9861da756c5816de481a978efb704fb2223dba078033eae0f65fec2f912d1557481b3449cabc7c62e4e88e2031500136d32cf4bba93b445b7a2
EBUILD compiler-rt-sanitizers-6.0.9999.ebuild 4960 BLAKE2B 583c1e1ea7a2b59a41f57e0b70be4d443f3d91a22a437ef34258428abb39f82e5161eb57b491599c9acb5b138a568e2b4c212f0a2d3a61bba4134694cb3b58e3 SHA512 2428b3aaecc8fae1c512216c1cbfb23f59d03f06e2e33e7053029fb2355b7f132aa06a34bd991f8e21e401f1d44cfa3f4e5aa0548c93b15469f8b19d20c18283
EBUILD compiler-rt-sanitizers-9999.ebuild 4935 BLAKE2B 92426b7c2e68887ad859fdf773f0ac601cb7e15df506ab590e106f26ea729721d0425fab4326d14936ef8a21bfd0d8889fa5b6706e1f44f60ce0107f565c826a SHA512 942b386808a78e1f5bb701daff9e590a0b16cd477fa014456f0f6b41cc45a682e71d2f2c15e05cc282c6fec011a260e22ba642cd8ffc9f86ebed1332432c5f8e
diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-5.0.2.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-5.0.2.ebuild
new file mode 100644
index 000000000000..299ce44377b4
--- /dev/null
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-5.0.2.ebuild
@@ -0,0 +1,178 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
+# (needed due to CMAKE_BUILD_TYPE != Gentoo)
+CMAKE_MIN_VERSION=3.7.0-r1
+PYTHON_COMPAT=( python2_7 )
+
+inherit check-reqs cmake-utils flag-o-matic llvm python-any-r1
+
+MY_P=compiler-rt-${PV/_/}.src
+LLVM_P=llvm-${PV/_/}.src
+
+DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)"
+HOMEPAGE="https://llvm.org/"
+SRC_URI="https://releases.llvm.org/${PV/_//}/${MY_P}.tar.xz
+ test? ( https://releases.llvm.org/${PV/_//}/${LLVM_P}.tar.xz )"
+
+LICENSE="|| ( UoI-NCSA MIT )"
+SLOT="${PV%_*}"
+KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="+clang test elibc_glibc"
+
+CLANG_SLOT=${SLOT%%.*}
+# llvm-4 needed for --cmakedir
+DEPEND="
+ >=sys-devel/llvm-4
+ clang? ( sys-devel/clang )
+ test? (
+ !<sys-apps/sandbox-2.13
+ $(python_gen_any_dep ">=dev-python/lit-5[\${PYTHON_USEDEP}]")
+ =sys-devel/clang-${PV%_*}*:${CLANG_SLOT}
+ sys-libs/compiler-rt:${SLOT} )
+ ${PYTHON_DEPS}"
+
+S=${WORKDIR}/${MY_P}
+
+# least intrusive of all
+CMAKE_BUILD_TYPE=RelWithDebInfo
+
+check_space() {
+ if use test; then
+ local CHECKREQS_DISK_BUILD=11G
+ check-reqs_pkg_pretend
+ fi
+}
+
+pkg_pretend() {
+ check_space
+}
+
+pkg_setup() {
+ check_space
+ llvm_pkg_setup
+ python-any-r1_pkg_setup
+}
+
+src_unpack() {
+ einfo "Unpacking ${MY_P}.tar.xz ..."
+ tar -xf "${DISTDIR}/${MY_P}.tar.xz" || die
+
+ if use test; then
+ einfo "Unpacking parts of ${LLVM_P}.tar.xz ..."
+ tar -xf "${DISTDIR}/${LLVM_P}.tar.xz" \
+ "${LLVM_P}"/utils/{lit,unittest} || die
+ mv "${LLVM_P}" llvm || die
+ fi
+}
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ if use test; then
+ # remove tests that are broken by new glibc
+ # (disabled in 6.0.0+, r313069)
+ if use elibc_glibc && has_version '>=sys-libs/glibc-2.24'; then
+ rm test/tsan/Linux/user_malloc.cc || die
+ fi
+ # https://bugs.llvm.org/show_bug.cgi?id=36065
+ if use elibc_glibc && has_version '>=sys-libs/glibc-2.25'; then
+ rm test/lsan/TestCases/Linux/use_tls_dynamic.cc || die
+ rm test/msan/dtls_test.c || die
+ rm test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc || die
+ fi
+ fi
+}
+
+src_configure() {
+ # pre-set since we need to pass it to cmake
+ BUILD_DIR=${WORKDIR}/${P}_build
+
+ if use clang; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ strip-unsupported-flags
+ fi
+
+ local mycmakeargs=(
+ -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
+ # use a build dir structure consistent with install
+ # this makes it possible to easily deploy test-friendly clang
+ -DCOMPILER_RT_OUTPUT_DIR="${BUILD_DIR}/lib/clang/${SLOT}"
+
+ -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
+ # built-ins installed by sys-libs/compiler-rt
+ -DCOMPILER_RT_BUILD_BUILTINS=OFF
+ -DCOMPILER_RT_BUILD_SANITIZERS=ON
+ -DCOMPILER_RT_BUILD_XRAY=ON
+ )
+ if use test; then
+ if has_version '>=sys-devel/llvm-6'; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ )
+ else
+ mycmakeargs+=(
+ -DLIT_COMMAND="${EPREFIX}"/usr/bin/lit
+ )
+ fi
+
+ mycmakeargs+=(
+ -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
+
+ # they are created during src_test()
+ -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang"
+ -DCOMPILER_RT_TEST_CXX_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang++"
+ )
+
+ # same flags are passed for build & tests, so we need to strip
+ # them down to a subset supported by clang
+ CC=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang \
+ CXX=${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++ \
+ strip-unsupported-flags
+ fi
+
+ if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+ mycmakeargs+=(
+ # disable use of SDK for the system itself
+ -DDARWIN_macosx_CACHED_SYSROOT=/
+ )
+ fi
+
+ cmake-utils_src_configure
+
+ if use test; then
+ local sys_dir=( "${EPREFIX}"/usr/lib/clang/${SLOT}/lib/* )
+ [[ -e ${sys_dir} ]] || die "Unable to find ${sys_dir}"
+ [[ ${#sys_dir[@]} -eq 1 ]] || die "Non-deterministic compiler-rt install: ${sys_dir[*]}"
+
+ # copy clang over since resource_dir is located relatively to binary
+ # therefore, we can put our new libraries in it
+ mkdir -p "${BUILD_DIR}"/lib/{llvm/${CLANG_SLOT}/{bin,$(get_libdir)},clang/${SLOT}/include} || die
+ cp "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/bin/clang{,++} \
+ "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/bin/ || die
+ cp "${EPREFIX}"/usr/lib/clang/${SLOT}/include/*.h \
+ "${BUILD_DIR}"/lib/clang/${SLOT}/include/ || die
+ cp "${sys_dir}"/*builtins*.a \
+ "${BUILD_DIR}/lib/clang/${SLOT}/lib/${sys_dir##*/}/" || die
+ # we also need LLVMgold.so for gold-based tests
+ if [[ -f ${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so ]]; then
+ ln -s "${EPREFIX}"/usr/lib/llvm/${CLANG_SLOT}/$(get_libdir)/LLVMgold.so \
+ "${BUILD_DIR}"/lib/llvm/${CLANG_SLOT}/$(get_libdir)/ || die
+ fi
+ fi
+}
+
+src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+ # disable sandbox to have it stop clobbering LD_PRELOAD
+ local -x SANDBOX_ON=0
+ # wipe LD_PRELOAD to make ASAN happy
+ local -x LD_PRELOAD=
+
+ cmake-utils_src_make check-all
+}
diff --git a/sys-libs/compiler-rt/Manifest b/sys-libs/compiler-rt/Manifest
index 7c48b74ce8af..8ce0864feccd 100644
--- a/sys-libs/compiler-rt/Manifest
+++ b/sys-libs/compiler-rt/Manifest
@@ -1,8 +1,10 @@
DIST compiler-rt-4.0.1.src.tar.xz 1434100 BLAKE2B ca6bf78fc07f387b7244a52ef648b06a5685effb46a66b241a9ee847ecafb17d02602f49b0dbe473d47202586874a043a6d75141400062f526d2f808da323e1e SHA512 cfeb625884b273f7c0e6767b81a8d3e5f24e0b96a510d5764d9d47a0e215fc841b4cb9d1843c8fb428cd21def720cfbfe8d3593ff5bb390548ebc8c32a902649
DIST compiler-rt-5.0.1.src.tar.xz 1498220 BLAKE2B 61503df8a4075c2fe1e42d480753b861321b5de127e340f48d648fc38d81c7967cead17e136beaa5235cc92540f158915fccec77cf39aa7c336d106c9d265222 SHA512 61e23775db78bdeed3003a509b45ae609287db31302fed186f3210d481ecf062d1828571e63482215ab00ff732df8f3fa6c77334dfb677e4b76eb555d476b8c4
+DIST compiler-rt-5.0.2.src.tar.xz 1543256 BLAKE2B 09fa84b8f3e9b8627a14387bc6eaa3d6b4588b9c8f1ac5a0114135fd830e3d45922408b237866789eb81bf38defde1186e0f7430a69f825bee12776b7cd9f74e SHA512 605a6d064877a860d6c9097e0220896dfceafed0a2392ad495c97aa347b97899d89f7e21932e29d3274f396615837414a3e730a915fe4f53eaa858ce3642a666
DIST compiler-rt-6.0.0.src.tar.xz 1633096 BLAKE2B d5df9b16ad474f687507013fb6eda8c7c3bbe479c85aab6ce428b93bbef2467538c0ba59c54dd9266b978da53c8c312a59e3b7abac843702048900f5cdbc1011 SHA512 717bed116ef43ebb2e18daf6fb737472edf57564947f53fe6368d3bbb080f63e986c0d1b94dbd087be998196ad7be54f4361854f8eb5214600b82449ba02c9c1
EBUILD compiler-rt-4.0.1.ebuild 4144 BLAKE2B a89fa2681b1254b285aeab803103860efddb6990b33bbe725fe52f7ebba5652f4ba9ecebbced1f63adc84dac4dc7dd26b10a6e7863169bc08f8e95cc2ba868fa SHA512 f14a4a61cc42a37d62e6662aeb95c8d2c3534b0ffbee57cf788ce1df62ab1387af76e90a2d79708c50b8b70d073b00298b0d31c71e8d69e11f2e9204dcbaca4e
EBUILD compiler-rt-5.0.1.ebuild 2833 BLAKE2B aa0ee1db389ffdf8465ea15a00276c15cd5ef16eb31918f69b55b7a8bbaafc11c0da95c34e9c40597b46430f8288b6c6c96c022d7a5b53b5b7110a908ca4d847 SHA512 53b0dedceacd860a35f3fa00186816473cb5f2c87b390909d3dfb9699c6990a7df482252bdd3fcdfb4d7e3891b02000a90c22a09515775187f854adc956d8d8f
+EBUILD compiler-rt-5.0.2.ebuild 2835 BLAKE2B 02a2629eb49aa61bf89e2aa191c8e0171bba122afad4f904d6927341b7b0e7262a1f63af34f00e156a027ea4d30b6cf711051819ec036192fb21f50e1f976fd6 SHA512 faa4776110c24a3dfa9c31cf1469e8a632da0d79ca065bf1b407bac2c78b2baa3189937f7e560cac22ddbf74533b88df326076495d7a476b4a30ae211c5c53da
EBUILD compiler-rt-6.0.0.ebuild 2907 BLAKE2B 53a1f886d5df143d35c754521eef1112eda7a7ec0ca9492b6b42276190f6451da2d27bb2866942dae75277abe689d3a8a4666304bc881b679978d32510105854 SHA512 83851e748f9d7e8102143844aa6714d5ed18fff6fe6448c68b8994107982f112d70681df6c4d82ee750fdb48ff68743caf6ac3b2938ec913ae9ff97896b5fe04
EBUILD compiler-rt-6.0.9999.ebuild 2949 BLAKE2B c6b212a50f84609b173fbc652de5bccca996951568b9dc16bf122696bb1fc6ea1fa3f414b9934a1181c2462d0305694e8356dbbfb5c0155575b9a490d976a164 SHA512 f82c6ca479507995a7a15551568517067eaee38d06aee85d05736fe28ce1dbd4cfc105d32fe595d147b5241ae7528bfd82d0506cf86ad525a05ac67dfb031334
EBUILD compiler-rt-9999.ebuild 2924 BLAKE2B f5f2739f3c8d70d0464334862f21c50ab1266cbd5b96c0f9a10cc0d1014e87b6246f8d3f3fe139d6dbca9e22c87f72ec6c93f56656fde6977d7a7704c0f81acb SHA512 c14a2dd7c4a5ed8605403fd404de33d45b51432f54d7f9a3a54a3826cff36840ff3d64447c2b0617b24047f7d6c56c4263874a1606e64555cf21d32ad01e0b12
diff --git a/sys-libs/compiler-rt/compiler-rt-5.0.2.ebuild b/sys-libs/compiler-rt/compiler-rt-5.0.2.ebuild
new file mode 100644
index 000000000000..cdb43e43bb4b
--- /dev/null
+++ b/sys-libs/compiler-rt/compiler-rt-5.0.2.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
+# (needed due to CMAKE_BUILD_TYPE != Gentoo)
+CMAKE_MIN_VERSION=3.7.0-r1
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils flag-o-matic llvm python-any-r1 toolchain-funcs
+
+DESCRIPTION="Compiler runtime library for clang (built-in part)"
+HOMEPAGE="https://llvm.org/"
+SRC_URI="https://releases.llvm.org/${PV/_//}/${P/_/}.src.tar.xz"
+
+LICENSE="|| ( UoI-NCSA MIT )"
+SLOT="${PV%_*}"
+KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="+clang test"
+
+CLANG_SLOT=${SLOT%%.*}
+# llvm-4 needed for --cmakedir
+DEPEND="
+ >=sys-devel/llvm-4
+ clang? ( sys-devel/clang )
+ test? (
+ $(python_gen_any_dep "dev-python/lit[\${PYTHON_USEDEP}]")
+ =sys-devel/clang-${PV%_*}*:${CLANG_SLOT} )
+ ${PYTHON_DEPS}"
+
+S=${WORKDIR}/${P/_/}.src
+
+# least intrusive of all
+CMAKE_BUILD_TYPE=RelWithDebInfo
+
+pkg_pretend() {
+ if ! use clang && ! tc-is-clang; then
+ ewarn "Building using a compiler other than clang may result in broken atomics"
+ ewarn "library. Enable USE=clang unless you have a very good reason not to."
+ fi
+}
+
+pkg_setup() {
+ llvm_pkg_setup
+ python-any-r1_pkg_setup
+}
+
+test_compiler() {
+ $(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \
+ <<<'int main() { return 0; }' &>/dev/null
+}
+
+src_configure() {
+ # pre-set since we need to pass it to cmake
+ BUILD_DIR=${WORKDIR}/${P}_build
+
+ local nolib_flags=( -nodefaultlibs -lc )
+ if use clang; then
+ local -x CC=${CHOST}-clang
+ local -x CXX=${CHOST}-clang++
+ # ensure we can use clang before installing compiler-rt
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+ strip-unsupported-flags
+ elif ! test_compiler; then
+ if test_compiler "${nolib_flags[@]}"; then
+ local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"
+ ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}"
+ fi
+ fi
+
+ local mycmakeargs=(
+ -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}"
+
+ -DCOMPILER_RT_INCLUDE_TESTS=$(usex test)
+ -DCOMPILER_RT_BUILD_SANITIZERS=OFF
+ -DCOMPILER_RT_BUILD_XRAY=OFF
+ )
+
+ if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then
+ mycmakeargs+=(
+ # disable use of SDK for the system itself
+ -DDARWIN_macosx_CACHED_SYSROOT=/
+ )
+ fi
+
+ if use test; then
+ if has_version '>=sys-devel/llvm-6'; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ )
+ else
+ mycmakeargs+=(
+ -DLIT_COMMAND="${EPREFIX}"/usr/bin/lit
+ )
+ fi
+
+ mycmakeargs+=(
+ -DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang"
+ -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++"
+ )
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+
+ cmake-utils_src_make check-builtins
+}
diff --git a/sys-libs/freeipmi/Manifest b/sys-libs/freeipmi/Manifest
index 903c42f5afbe..656771a3b574 100644
--- a/sys-libs/freeipmi/Manifest
+++ b/sys-libs/freeipmi/Manifest
@@ -4,11 +4,11 @@ AUX freeipmi.icinga 117 BLAKE2B 12409a509d0b06d54196961f703fbe91034e1f68cfc19e5c
AUX ipmidetectd.confd 185 BLAKE2B ea7164e6b126cc684482557cafae3ac0c39611484243e95a3e8946488cc234f4d3100f931549f08c917d454768845e276d83fa3f9e2d7a57c4454a55090bfa38 SHA512 f10e908a451c646b2c61338d79e69663c05216a54093745bd2b659041e0b91adb9be4077c92d63f6f3d62cb5510168b6a57e5e86375533e235fd3abb2b72a49c
AUX ipmiseld.confd 192 BLAKE2B 52b125e63ca3e13fcb24f5b304f73c78269fc58b2c3e40cb185b28697c409ccf5ecd4b95599c38119bfe8c97977c3cc87e3633989e2b9d4095cded4b2b248dc4 SHA512 0a031f29a4692085054d5fc2dfe6d0ad7fb762f7ee96849ce2d562a90d6e3b0f3ae8328ab852dc22bee6221bc5cd8b588bd02075222038fa0f0e2f64ac185799
DIST freeipmi-1.4.8.tar.gz 3185068 BLAKE2B 4133a7cdb5f66a28c07e965e6842c9d5931edaab7c19a4d4e89f5907ffa5c3f9e753b7738141206835346d06ecb7045780fe2913682ce70153822895c4da4425 SHA512 3cd4acde402bbc945b007e31e7f8dad3ad4539d2cf00310e9168d7cec8024203a280c8ad91e3f08b86dfa9be536779969c5393c4523df2fe8eb904f765fcfc56
-DIST freeipmi-1.5.6.tar.gz 3321440 BLAKE2B 4e40379e06b7e1b45aa4720c674a99f1ce54b167e597e0cc1aae82329e703eee95f9783086a2fec901585637c9209837f764e0b8028b78d6feaaa85e515e561b SHA512 2a33c4068af03be5d99a9a0098ded3177bedbc1b71df14c2ba67d40012bee6791388947b0dc552433feb9098753182d62a84f43af6036fbfbd06a7f277ef8b6a
DIST freeipmi-1.5.7.tar.gz 3321187 BLAKE2B c6f7e9c4e0a03ce1d50972fee99741ec00a8f5beb0323d61d9217b3773eed33cb04e7bb92e1f293cb39c8012872babdc4774e6d81cf808615b8b283510e1e67c SHA512 a4d39d11d4e4b9635c272ee3a197729ac61c3e1c909c202498fb480c41289116eb933cd716fe2e0b5aa6dc258751ee204892bfb009398b6d5c2c65ee1cc58544
DIST freeipmi-1.6.1.tar.gz 3398508 BLAKE2B 48c7cd791a635a1d82cc6304c8080aa2f88415c33a8dabf80a844305de5d21ef3bf20fd236c5a56d3a761fdadc1449b8750728465263828b157f93ba6080ad87 SHA512 f8ee5b3b59c0ccffeb52717a134cb8c149e42f3f66ea20420e4efbdbdc79d527e52e6d20b2a75a4406bc8c2190f368f83d8d36cef611eeeabd58ff7bf95380e5
+DIST freeipmi-1.6.2.tar.gz 3399236 BLAKE2B aedbfc785c1ec68418b9cfa79873d1b39a9591bfc5536a52c699c68558626c60aa11d29297252aa5fd2911fd47b88ab7010b8e72054431005f38a70268966bed SHA512 5c3f0b3f0632ad89a49a69aae28420c6ec342c9924aff5a8b6c0ccc1dc2f26f8c68906fbd1bc00f0f102dc50690596bb9e8c3443cdcbf93dabb91a7529d87ee8
EBUILD freeipmi-1.4.8.ebuild 2437 BLAKE2B 94a08cc0def79256536a9b912610611b324804aa56b07e74db6dc69c9b96ec4013ed592d5a345b0f1f9016434b54aba80135d3656fa51a582ab1bdde60917ca4 SHA512 f1587c29e63fa8d11e98857a816c22f2e7bed14d6e5fbf65fff3e0fd9f7ae8a391993dfd28883808365f2be9a51994a2903e7905f13f1ec0fa9a309eddf39ad9
-EBUILD freeipmi-1.5.6.ebuild 2376 BLAKE2B 1efb6ad0146bc811a2997e58e85f6d00a8c801e9e3b25e4350d73c5c25b57899c8adbde33914974735ac6c13f885de1c91692b7ee65e8042b66669e1b37331cc SHA512 d9d8700d2a8bb6b438273d02b3ce50540c837fd7436afb776f5691c476a051213491acfdd9671d29b7ba403f3aa9a77920e07ef33e7025c499a823668ef5aebd
EBUILD freeipmi-1.5.7.ebuild 2375 BLAKE2B 6cf2866bcf7e355bfe9c5e803d7423eb9adce18274b27b4d25be91a3e309d71934e187f0f53418c18eacb329879aeaaa518534620ca1f6d129ae0ffc657bfb19 SHA512 b6e1f15b39894f475a56981a3721e1a2fef14205bf0aa51cd43f837aeeb96cb14c70bcb1f7d3580a5f6d474d1300bab4b7f654511560090c3d70fefbfee3faaf
EBUILD freeipmi-1.6.1.ebuild 2375 BLAKE2B 6cf2866bcf7e355bfe9c5e803d7423eb9adce18274b27b4d25be91a3e309d71934e187f0f53418c18eacb329879aeaaa518534620ca1f6d129ae0ffc657bfb19 SHA512 b6e1f15b39894f475a56981a3721e1a2fef14205bf0aa51cd43f837aeeb96cb14c70bcb1f7d3580a5f6d474d1300bab4b7f654511560090c3d70fefbfee3faaf
+EBUILD freeipmi-1.6.2.ebuild 2375 BLAKE2B 6cf2866bcf7e355bfe9c5e803d7423eb9adce18274b27b4d25be91a3e309d71934e187f0f53418c18eacb329879aeaaa518534620ca1f6d129ae0ffc657bfb19 SHA512 b6e1f15b39894f475a56981a3721e1a2fef14205bf0aa51cd43f837aeeb96cb14c70bcb1f7d3580a5f6d474d1300bab4b7f654511560090c3d70fefbfee3faaf
MISC metadata.xml 376 BLAKE2B f9bd1d470315ace8e1a7b71b77a2616131dec7530cba329cf10118df75e78b5c26e2891f3f5ff78b5df94f1ff67e93e05721d941a94cef847eabfea90b860abf SHA512 10922a1b392edce6cdb447eb2a06694570a88f765fd49eb7f154deed1cb3a33901c68ff1881f3068ae212ba6182c61e598e7ab7d4d683602f4016adc3ca7d7e8
diff --git a/sys-libs/freeipmi/freeipmi-1.5.6.ebuild b/sys-libs/freeipmi/freeipmi-1.6.2.ebuild
index cc0e166d4fc4..44c0af38ab67 100644
--- a/sys-libs/freeipmi/freeipmi-1.5.6.ebuild
+++ b/sys-libs/freeipmi/freeipmi-1.6.2.ebuild
@@ -22,7 +22,7 @@ IUSE="debug nagios"
RDEPEND="dev-libs/libgcrypt:0"
DEPEND="${RDEPEND}
- virtual/os-headers"
+ virtual/os-headers"
RDEPEND="${RDEPEND}
nagios? (
|| ( net-analyzer/icinga net-analyzer/nagios )
diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest
index 3fcf9266acd0..d1f871928a88 100644
--- a/sys-libs/glibc/Manifest
+++ b/sys-libs/glibc/Manifest
@@ -39,7 +39,7 @@ DIST glibc-2.27.tar.xz 15395316 BLAKE2B ea206d304c8c9aa86d69db981a14bea008602cea
DIST glibc-9999-patches-5.tar.bz2 15979 BLAKE2B f59b4d7096fd876c9176f6ebdd9a4a510f3c6c90dd69a1fbb092a18f296767759d8d73dc7a81e29e3f6152043a4179056d5e224896c7bb96cc09ede2e2dd16e1 SHA512 c29ad59977b2c4dfd58ee16d0898a1c16e6cde974d5c29c3a7a55e0dee4ade7f1a3d45c9481c1d35df7fcedbdb67267f5d61759cacab677b6288b5ece3871a4b
EBUILD glibc-2.18-r1.ebuild 5522 BLAKE2B c087f7ac58924d29211b8227796eede63074c7a3e87821ee21c676b4831ae5fa213693d9476af30d1a50e132b5e53e31b722ea1ebcd1801fed319930839d36e8 SHA512 adf20c016104ecaa137c8123a7731daeeec8bbdad4220d379ab5ce2e89f4b548820097936b1f51bb03d617956fe7b36d3630665754999273363f12ec39e085d5
EBUILD glibc-2.19-r1.ebuild 5479 BLAKE2B 68bb9535b64e564879ecb66f4e8a2df99d5edef8d7591cb239c75766dc038cf3fa18f4b5d9b49662fabcec4157ba00590f9678076db4c2966fd75614ec833fec SHA512 336bfdcb0c6d6ac4ebad7389e84fefee9e3930cbd6af1d094ac4e37efec335d5cb14f781bf8ac8c1f6a7fcccf00c2c836b3f08fd09e03af767fea62c462e3095
-EBUILD glibc-2.19-r2.ebuild 40699 BLAKE2B ee2d9ac1596b53d5169d2943892363fe33a2ead64aa8ee4a730a031b89d30075a5b4146c98c9b946c132d288eb4b1f683b449150297de3573da5833e6637e8ca SHA512 145ac3ce6eab581c7af006ee4828f94d884527ae5f6d7bf6620eb1593bd68e24391c5496e98d5acf1e0aa4976261b61c2fac95bbd2438c3b8f7a11f06d42f0a7
+EBUILD glibc-2.19-r2.ebuild 40613 BLAKE2B 3cb96b82da71e6019d1e2721de6287366ae19d207d931f8d5b6455f81a440728bf63d1136543f82618230a85420e494f81e4a90dc9379ab1d8d9d052872d97b9 SHA512 c3e018b24caf7fcbc15ee11e444f74246eca8d0bf16eaafb93add19d1501dcb827f5f4f1dd7d82fec0fe1643ad5df4b71bcdf48dafae486d0614ab9632155329
EBUILD glibc-2.20-r2.ebuild 4947 BLAKE2B 24062f002678df912ced724a3d919bc2f07476c98000092cb3fa3f2be1836db57348c88b6fc1da7a9364103136eecbe687fe365d131f10c82de3cb0edd3eb8c5 SHA512 ff76e9173ab6bfccb1c659f79cefb93f6fa6266adab40a3816f56acddb7866cee67ba6bfa8d1b9988eff755e9d1a879e62973fc332566c185f019af5e17a9f1d
EBUILD glibc-2.21-r2.ebuild 4922 BLAKE2B 99bd1be39a3643f845c0daff4f7b19a0abb37de95a8494b4dc9d29aaee74281d4a252792010ff4935e5d661a7240cf4d5944907267e9059ce208b59891528085 SHA512 ff896f5bb20502db03f00d1438a06a026e0940106e368b4bb27abb72bb927fb235371a5a6b01130e35906f17c478e79e44bec6dda02bd5fedb30552bf4a6cc86
EBUILD glibc-2.22-r4.ebuild 4973 BLAKE2B 6f4f632413cacf34a2a011d8cc83d0a92deaa0980aa9b6fe0d11cf45850a7bec482b77c8a0aa00b66a2103d4ff03ca16b0b7d38cd089b8f010039faaaf26d76b SHA512 1a056e465dc38dc4956b4707ff9fc9da8df4046d95edeb3dd6ae36fc229545acefdd317c50961a153ec83f21cba3d645d1e45b526157f8209a932242c2b08c33
@@ -48,7 +48,6 @@ EBUILD glibc-2.24-r4.ebuild 5011 BLAKE2B 71050f0449074652d4fabc709326025b4de2e66
EBUILD glibc-2.25-r11.ebuild 5001 BLAKE2B 30988b55a9f655033db8cb2ac3c6ae0183c8a240134bcf26b9b98503a2351bf30fb3742cf84c23b4c81d56797b0c83d138341d6335659046784208a6404776f8 SHA512 43118e02defd07a02b3a9bd8220ed0dcfb7fb0b2c4bcf3b6d510a78a978295814e44ae329fa4a41ef99a73c10d8fbf9a31f84a53a9196bc848af28f3a33720d3
EBUILD glibc-2.26-r6.ebuild 25614 BLAKE2B 32bd3f11186c7f5619a7c83358cd5e416bc9c4ff6f6355ab9f65d68e94fefad99557bc993033a711fbea3f402c898ddcd494ecbc3c10f5e0c8dacdfce632b8e0 SHA512 256bbd3e1a5c4aaee844e4da88a0851608ec75fe7d1d10486849be57d14a202e4d10904873cdae565ae9ac216607072f765d18967007a0d16ea5f2103a76b20c
EBUILD glibc-2.26-r7.ebuild 25643 BLAKE2B fdea0aab9a1601b898409fcda1e4c8933b6fef941683d3abb579488d720cac11f1b4d5eea2644e76cfe3f5f9ca1abafc8d354924964d987d70df108ca949b125 SHA512 d3daaaa561643b6e02b28a97a756257c3f61222d271e6d043ae09ef3e644f85bb64b5105327df60acc88d8db6fbae4550be387f666ed38c8aeb834b954ba5d87
-EBUILD glibc-2.27-r1.ebuild 41940 BLAKE2B 362f65f0916a3db9f3ba2ded07d5b8fda7d47ccc2ac3e501fb9623ea59f016d677cc62ab3e172d2254656889b253f9c89538d5f55e0e821af0c761c32c49e808 SHA512 84b0c542833fb34a77b77d01dc99e849fa163de4f241cce41fd6eefb3e6122babd6af190972f5d9a60aadd45d43d8687e64492961c1c1bd384f4a3d7f2b519ff
-EBUILD glibc-2.27-r2.ebuild 41955 BLAKE2B 1b5cb8b8e07e5baa2a402942e1ca9747eb084badb7b2955bcb9880b35f7fb372107dece0c3b78f0b9d06d6c1300537a366e648650df2c2bb2d1399652ce4e64e SHA512 a6a643e2055c41ebd4d706271d0edafba1b9abdea2d03073646895ede105cbb5f2fca01dfd4d501212a3abe9c794e07e27cf1ef90f6863f545584d4385152e01
-EBUILD glibc-9999.ebuild 41634 BLAKE2B 77194b3350ca9455a49d0aa98b8178b2dab995bdfe1a12e40f34ed2d7dc2589c739d7074f0730cc599b6d816a0a9c250f9bcd9858671c6e30a5ba9164662a236 SHA512 1e78f43986ab4379ee2eeac3a738f9b58f2013ae5cde91640da223f01749fc3e8cd9e615da44fed8fd88f22657b31f7379aa2a214b87a01da77526cc2881d23d
+EBUILD glibc-2.27-r2.ebuild 41869 BLAKE2B 7692dd9fb9ce0756ecf1eea1e106640bad6519a695a08f7db910015e9ebc5a0bfd207b301611e505a8100cb68534ccaa7d35d6b72d1d175bfbca60e96e8e496a SHA512 34b9f1c76d4923b5f9c798a005775cd5a26722923f7e99bd70a1b7e326076fdf4cd19539b5373d8a12f24da4f53fc965904755e718810daf5439a4b225acf304
+EBUILD glibc-9999.ebuild 41548 BLAKE2B 0c51dd9092b884e3372eb706c9fd3267ccca4aa183f6df1ecc18d67152c0996a871121b69d09029c77a26d8bfbbca837c1a4bf50fca782b1979f425b1132a965 SHA512 3c58def46015d2867bf992195a1342b47dcf0077ee934828b6489c5e6e4062b163a6c6050b8606d041aaeed06d577c61b7cffbc9510f4da61e361c96a903e809
MISC metadata.xml 1054 BLAKE2B dbc091e54130729385bc02aaa1025885f101caa88d601b1f7670974d89e7e24aae5d37fd6699278a37c0064e1f3232c04954dc127869427317b5d80b499f3813 SHA512 65474b7d32ceb6bafe8ae0e18aa0b46b68cefecce5570a0e8d4a0117019e6540f2feae35cecbebad382b4f06d6e5ae1dfa9b8a61889881e8534956dd42df8e4b
diff --git a/sys-libs/glibc/glibc-2.19-r2.ebuild b/sys-libs/glibc/glibc-2.19-r2.ebuild
index 1b071fb4d3d5..b2b9a397b55c 100644
--- a/sys-libs/glibc/glibc-2.19-r2.ebuild
+++ b/sys-libs/glibc/glibc-2.19-r2.ebuild
@@ -895,8 +895,8 @@ glibc_do_configure() {
--with-bugurl=https://bugs.gentoo.org/
--with-pkgversion="$(glibc_banner)"
$(use_multiarch || echo --disable-multi-arch)
- $(in_iuse systemtap && use_enable systemtap)
- $(in_iuse nscd && use_enable nscd)
+ $(use_enable systemtap)
+ $(use_enable nscd)
${EXTRA_ECONF}
)
@@ -904,8 +904,8 @@ glibc_do_configure() {
myconf+=( $(use_enable vanilla timezone-tools) )
# These libs don't have configure flags.
- ac_cv_lib_audit_audit_log_user_avc_message=$(in_iuse audit && usex audit || echo no)
- ac_cv_lib_cap_cap_init=$(in_iuse caps && usex caps || echo no)
+ ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no)
+ ac_cv_lib_cap_cap_init=$(usex caps || echo no)
# There is no configure option for this and we need to export it
# since the glibc build will re-run configure on itself
@@ -1174,7 +1174,7 @@ glibc_do_src_install() {
# With devpts under Linux mounted properly, we do not need the pt_chown
# binary to be setuid. This is because the default owners/perms will be
# exactly what we want.
- if in_iuse suid && ! use suid ; then
+ if ! use suid ; then
find "${ED}" -name pt_chown -exec chmod -s {} +
fi
diff --git a/sys-libs/glibc/glibc-2.27-r1.ebuild b/sys-libs/glibc/glibc-2.27-r1.ebuild
deleted file mode 100644
index fe60c1f83c37..000000000000
--- a/sys-libs/glibc/glibc-2.27-r1.ebuild
+++ /dev/null
@@ -1,1428 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit prefix eutils versionator toolchain-funcs flag-o-matic gnuconfig \
- multilib systemd multiprocessing
-
-DESCRIPTION="GNU libc C library"
-HOMEPAGE="https://www.gnu.org/software/libc/"
-LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE"
-RESTRICT="strip" # Strip ourself #46186
-SLOT="2.2"
-
-EMULTILIB_PKG="true"
-
-if [[ ${PV} == 9999* ]]; then
- EGIT_REPO_URI="https://sourceware.org/git/glibc.git"
- inherit git-r3
-else
- # KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
- KEYWORDS=""
- SRC_URI="mirror://gnu/glibc/${P}.tar.xz"
-fi
-
-RELEASE_VER=${PV}
-
-GCC_BOOTSTRAP_VER="4.7.3-r1"
-
-# Gentoo patchset
-PATCH_VER=1
-
-SRC_URI+=" https://dev.gentoo.org/~dilfridge/distfiles/${P}-patches-${PATCH_VER}.tar.bz2"
-SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2 )"
-
-IUSE="audit caps compile-locales debug doc gd hardened headers-only multilib nscd profile selinux suid systemtap vanilla"
-
-# Minimum kernel version that glibc requires
-MIN_KERN_VER="3.2.0"
-
-# Here's how the cross-compile logic breaks down ...
-# CTARGET - machine that will target the binaries
-# CHOST - machine that will host the binaries
-# CBUILD - machine that will build the binaries
-# If CTARGET != CHOST, it means you want a libc for cross-compiling.
-# If CHOST != CBUILD, it means you want to cross-compile the libc.
-# CBUILD = CHOST = CTARGET - native build/install
-# CBUILD != (CHOST = CTARGET) - cross-compile a native build
-# (CBUILD = CHOST) != CTARGET - libc for cross-compiler
-# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler
-# For install paths:
-# CHOST = CTARGET - install into /
-# CHOST != CTARGET - install into /usr/CTARGET/
-#
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY} == cross-* ]] ; then
- export CTARGET=${CATEGORY#cross-}
- fi
-fi
-
-# We need a new-enough binutils/gcc to match upstream baseline.
-# Also we need to make sure our binutils/gcc supports TLS.
-COMMON_DEPEND="
- nscd? ( selinux? (
- audit? ( sys-process/audit )
- caps? ( sys-libs/libcap )
- ) )
- suid? ( caps? ( sys-libs/libcap ) )
- selinux? ( sys-libs/libselinux )
- systemtap? ( dev-util/systemtap )
-"
-DEPEND="${COMMON_DEPEND}
- >=app-misc/pax-utils-0.1.10
- !<sys-apps/sandbox-1.6
- !<sys-apps/portage-2.1.2
- !<sys-devel/bison-2.7
- doc? ( sys-apps/texinfo )
-"
-RDEPEND="${COMMON_DEPEND}
- sys-apps/gentoo-functions
- !sys-kernel/ps3-sources
- !sys-libs/nss-db
-"
-
-if [[ ${CATEGORY} == cross-* ]] ; then
- DEPEND+=" !headers-only? (
- >=${CATEGORY}/binutils-2.24
- >=${CATEGORY}/gcc-4.9
- )"
- [[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
-else
- DEPEND+="
- >=sys-devel/binutils-2.24
- >=sys-devel/gcc-4.9
- virtual/os-headers
- "
- RDEPEND+=" vanilla? ( !sys-libs/timezone-data )"
- PDEPEND+=" !vanilla? ( sys-libs/timezone-data )"
-fi
-
-#
-# Small helper functions
-#
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-just_headers() {
- is_crosscompile && use headers-only
-}
-
-alt_prefix() {
- is_crosscompile && echo /usr/${CTARGET}
-}
-
-# We need to be able to set alternative headers for compiling for non-native
-# platform. Will also become useful for testing kernel-headers without screwing
-# up the whole system.
-alt_headers() {
- echo ${ALT_HEADERS:=$(alt_prefix)/usr/include}
-}
-
-alt_build_headers() {
- if [[ -z ${ALT_BUILD_HEADERS} ]] ; then
- ALT_BUILD_HEADERS="${EPREFIX}$(alt_headers)"
- if tc-is-cross-compiler ; then
- ALT_BUILD_HEADERS=${SYSROOT}$(alt_headers)
- if [[ ! -e ${ALT_BUILD_HEADERS}/linux/version.h ]] ; then
- local header_path=$(echo '#include <linux/version.h>' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h')
- ALT_BUILD_HEADERS=${header_path%/linux/version.h}
- fi
- fi
- fi
- echo "${ALT_BUILD_HEADERS}"
-}
-
-alt_libdir() {
- echo $(alt_prefix)/$(get_libdir)
-}
-alt_usrlibdir() {
- echo $(alt_prefix)/usr/$(get_libdir)
-}
-
-builddir() {
- echo "${WORKDIR}/build-${ABI}-${CTARGET}-$1"
-}
-
-do_compile_test() {
- local ret save_cflags=${CFLAGS}
- CFLAGS+=" $1"
- shift
-
- pushd "${T}" >/dev/null
-
- rm -f glibc-test*
- printf '%b' "$*" > glibc-test.c
-
- nonfatal emake -s glibc-test
- ret=$?
-
- popd >/dev/null
-
- CFLAGS=${save_cflags}
- return ${ret}
-}
-
-do_run_test() {
- local ret
-
- if [[ ${MERGE_TYPE} == "binary" ]] ; then
- # ignore build failures when installing a binary package #324685
- do_compile_test "" "$@" 2>/dev/null || return 0
- else
- if ! do_compile_test "" "$@" ; then
- ewarn "Simple build failed ... assuming this is desired #324685"
- return 0
- fi
- fi
-
- pushd "${T}" >/dev/null
-
- ./glibc-test
- ret=$?
- rm -f glibc-test*
-
- popd >/dev/null
-
- return ${ret}
-}
-
-setup_target_flags() {
- # This largely mucks with compiler flags. None of which should matter
- # when building up just the headers.
- just_headers && return 0
-
- case $(tc-arch) in
- x86)
- # -march needed for #185404 #199334
- # TODO: When creating the first glibc cross-compile, this test will
- # always fail as it does a full link which in turn requires glibc.
- # Probably also applies when changing multilib profile settings (e.g.
- # enabling x86 when the profile was amd64-only previously).
- # We could change main to _start and pass -nostdlib here so that we
- # only test the gcc code compilation. Or we could do a compile and
- # then look for the symbol via scanelf.
- if ! do_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n' 2>/dev/null ; then
- local t=${CTARGET_OPT:-${CTARGET}}
- t=${t%%-*}
- filter-flags '-march=*'
- export CFLAGS="-march=${t} ${CFLAGS}"
- einfo "Auto adding -march=${t} to CFLAGS #185404"
- fi
- ;;
- amd64)
- # -march needed for #185404 #199334
- # Note: This test only matters when the x86 ABI is enabled, so we could
- # optimize a bit and elide it.
- # TODO: See cross-compile issues listed above for x86.
- if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n' 2>/dev/null ; then
- local t=${CTARGET_OPT:-${CTARGET}}
- t=${t%%-*}
- # Normally the target is x86_64-xxx, so turn that into the -march that
- # gcc actually accepts. #528708
- [[ ${t} == "x86_64" ]] && t="x86-64"
- filter-flags '-march=*'
- # ugly, ugly, ugly. ugly.
- CFLAGS_x86=$(CFLAGS=${CFLAGS_x86} filter-flags '-march=*'; echo "${CFLAGS}")
- export CFLAGS_x86="${CFLAGS_x86} -march=${t}"
- einfo "Auto adding -march=${t} to CFLAGS_x86 #185404"
- fi
- ;;
- mips)
- # The mips abi cannot support the GNU style hashes. #233233
- filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both
- ;;
- sparc)
- # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though.
- filter-flags "-fcall-used-g7"
- append-flags "-fcall-used-g6"
-
- # If the CHOST is the basic one (e.g. not sparcv9-xxx already),
- # try to pick a better one so glibc can use cpu-specific .S files.
- # We key off the CFLAGS to get a good value. Also need to handle
- # version skew.
- # We can't force users to set their CHOST to their exact machine
- # as many of these are not recognized by config.sub/gcc and such :(.
- # Note: If the mcpu values don't scale, we might try probing CPP defines.
- # Note: Should we factor in -Wa,-AvXXX flags too ? Or -mvis/etc... ?
-
- local cpu
- case ${CTARGET} in
- sparc64-*)
- case $(get-flag mcpu) in
- niagara[234])
- if version_is_at_least 2.8 ; then
- cpu="sparc64v2"
- elif version_is_at_least 2.4 ; then
- cpu="sparc64v"
- elif version_is_at_least 2.2.3 ; then
- cpu="sparc64b"
- fi
- ;;
- niagara)
- if version_is_at_least 2.4 ; then
- cpu="sparc64v"
- elif version_is_at_least 2.2.3 ; then
- cpu="sparc64b"
- fi
- ;;
- ultrasparc3)
- cpu="sparc64b"
- ;;
- *)
- # We need to force at least v9a because the base build doesn't
- # work with just v9.
- # https://sourceware.org/bugzilla/show_bug.cgi?id=19477
- [[ -z ${cpu} ]] && append-flags "-Wa,-xarch=v9a"
- ;;
- esac
- ;;
- sparc-*)
- case $(get-flag mcpu) in
- niagara[234])
- if version_is_at_least 2.8 ; then
- cpu="sparcv9v2"
- elif version_is_at_least 2.4 ; then
- cpu="sparcv9v"
- elif version_is_at_least 2.2.3 ; then
- cpu="sparcv9b"
- else
- cpu="sparcv9"
- fi
- ;;
- niagara)
- if version_is_at_least 2.4 ; then
- cpu="sparcv9v"
- elif version_is_at_least 2.2.3 ; then
- cpu="sparcv9b"
- else
- cpu="sparcv9"
- fi
- ;;
- ultrasparc3)
- cpu="sparcv9b"
- ;;
- v9|ultrasparc)
- cpu="sparcv9"
- ;;
- v8|supersparc|hypersparc|leon|leon3)
- cpu="sparcv8"
- ;;
- esac
- ;;
- esac
- [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}"
- ;;
- esac
-}
-
-setup_flags() {
- # Make sure host make.conf doesn't pollute us
- if is_crosscompile || tc-is-cross-compiler ; then
- CHOST=${CTARGET} strip-unsupported-flags
- fi
-
- # Store our CFLAGS because it's changed depending on which CTARGET
- # we are building when pulling glibc on a multilib profile
- CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}}
- CFLAGS=${CFLAGS_BASE}
- CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}}
- CXXFLAGS=${CXXFLAGS_BASE}
- ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}}
- ASFLAGS=${ASFLAGS_BASE}
-
- # Over-zealous CFLAGS can often cause problems. What may work for one
- # person may not work for another. To avoid a large influx of bugs
- # relating to failed builds, we strip most CFLAGS out to ensure as few
- # problems as possible.
- strip-flags
- strip-unsupported-flags
- filter-flags -m32 -m64 '-mabi=*'
-
- # glibc aborts if rpath is set by LDFLAGS
- filter-ldflags '-Wl,-rpath=*'
-
- # #492892
- filter-flags -frecord-gcc-switches
-
- unset CBUILD_OPT CTARGET_OPT
- if use multilib ; then
- CTARGET_OPT=$(get_abi_CTARGET)
- [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST)
- fi
-
- setup_target_flags
-
- if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then
- CBUILD_OPT=${CTARGET_OPT}
- fi
-
- # Lock glibc at -O2; we want to be conservative here.
- # -fno-strict-aliasing is to work around #155906.
- filter-flags '-O?'
- append-flags -O2 -fno-strict-aliasing
-
- filter-flags '-fstack-protector*'
-
- # Starting with gcc-6 (and fully upstreamed pie patches) we control
- # default enabled/disabled pie via use flags. So nothing to do
- # here then. #618160
- if [[ $(gcc-major-version) -lt 6 ]]; then
- if use hardened && tc-enables-pie ; then
- # Force PIC macro definition for all compilations since they're all
- # either -fPIC or -fPIE with the default-PIE compiler.
- append-cppflags -DPIC
- else
- # Don't build -fPIE without the default-PIE compiler and the
- # hardened-pie patch
- filter-flags -fPIE
- fi
- fi
-}
-
-want_tls() {
- # Archs that can use TLS (Thread Local Storage)
- case $(tc-arch) in
- x86)
- # requires i486 or better #106556
- [[ ${CTARGET} == i[4567]86* ]] && return 0
- return 1
- ;;
- esac
- return 0
-}
-
-want__thread() {
- want_tls || return 1
-
- # For some reason --with-tls --with__thread is causing segfaults on sparc32.
- [[ ${PROFILE_ARCH} == "sparc" ]] && return 1
-
- [[ -n ${WANT__THREAD} ]] && return ${WANT__THREAD}
-
- # only test gcc -- can't test linking yet
- tc-has-tls -c ${CTARGET}
- WANT__THREAD=$?
-
- return ${WANT__THREAD}
-}
-
-use_multiarch() {
- # Make sure binutils is new enough to support indirect functions,
- # #336792. This funky sed supports gold and bfd linkers.
- local bver nver
- bver=$($(tc-getLD ${CTARGET}) -v | sed -n -r '1{s:[^0-9]*::;s:^([0-9.]*).*:\1:;p}')
- case $(tc-arch ${CTARGET}) in
- amd64|x86) nver="2.20" ;;
- arm) nver="2.22" ;;
- hppa) nver="2.23" ;;
- ppc|ppc64) nver="2.20" ;;
- # ifunc support was added in 2.23, but glibc also needs
- # machinemode which is in 2.24.
- s390) nver="2.24" ;;
- sparc) nver="2.21" ;;
- *) return 1 ;;
- esac
- version_is_at_least ${nver} ${bver}
-}
-
-# Setup toolchain variables that had historically been defined in the
-# profiles for these archs.
-setup_env() {
- # silly users
- unset LD_RUN_PATH
- unset LD_ASSUME_KERNEL
-
- if is_crosscompile || tc-is-cross-compiler ; then
- multilib_env ${CTARGET_OPT:-${CTARGET}}
-
- if ! use multilib ; then
- MULTILIB_ABIS=${DEFAULT_ABI}
- else
- MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}}
- fi
-
- # If the user has CFLAGS_<CTARGET> in their make.conf, use that,
- # and fall back on CFLAGS.
- local VAR=CFLAGS_${CTARGET//[-.]/_}
- CFLAGS=${!VAR-${CFLAGS}}
- einfo " $(printf '%15s' 'Manual CFLAGS:') ${CFLAGS}"
- fi
-
- setup_flags
-
- export ABI=${ABI:-${DEFAULT_ABI:-default}}
-
- if use headers-only ; then
- # Avoid mixing host's CC and target's CFLAGS_${ABI}:
- # At this bootstrap stage we have only binutils for
- # target but not compiler yet.
- einfo "Skip CC ABI injection. We can't use (cross-)compiler yet."
- return 0
- fi
- local VAR=CFLAGS_${ABI}
- # We need to export CFLAGS with abi information in them because glibc's
- # configure script checks CFLAGS for some targets (like mips). Keep
- # around the original clean value to avoid appending multiple ABIs on
- # top of each other.
- : ${__GLIBC_CC:=$(tc-getCC ${CTARGET_OPT:-${CTARGET}})}
- export __GLIBC_CC CC="${__GLIBC_CC} ${!VAR}"
- einfo " $(printf '%15s' 'Manual CC:') ${CC}"
-}
-
-foreach_abi() {
- setup_env
-
- local ret=0
- local abilist=""
- if use multilib ; then
- abilist=$(get_install_abis)
- else
- abilist=${DEFAULT_ABI}
- fi
- local -x ABI
- for ABI in ${abilist:-default} ; do
- setup_env
- einfo "Running $1 for ABI ${ABI}"
- $1
- : $(( ret |= $? ))
- done
- return ${ret}
-}
-
-glibc_banner() {
- local b="Gentoo ${PVR}"
- [[ -n ${PATCH_VER} ]] && ! use vanilla && b+=" p${PATCH_VER}"
- echo "${b}"
-}
-
-check_devpts() {
- # Make sure devpts is mounted correctly for use w/out setuid pt_chown.
-
- # If merely building the binary package, then there's nothing to verify.
- [[ ${MERGE_TYPE} == "buildonly" ]] && return
-
- # Only sanity check when installing the native glibc.
- [[ ${ROOT} != "/" ]] && return
-
- # If they're opting in to the old suid code, then no need to check.
- use suid && return
-
- if awk '$3 == "devpts" && $4 ~ /[, ]gid=5[, ]/ { exit 1 }' /proc/mounts ; then
- eerror "In order to use glibc with USE=-suid, you must make sure that"
- eerror "you have devpts mounted at /dev/pts with the gid=5 option."
- eerror "Openrc should do this for you, so you should check /etc/fstab"
- eerror "and make sure you do not have any invalid settings there."
- die "mount & fix your /dev/pts settings"
- fi
-}
-
-# The following Kernel version handling functions are mostly copied from portage
-# source. It's better not to use linux-info.eclass here since a) it adds too
-# much magic, see bug 326693 for some of the arguments, and b) some of the
-# functions are just not provided.
-
-g_get_running_KV() {
- uname -r
- return $?
-}
-
-g_KV_major() {
- [[ -z $1 ]] && return 1
- local KV=$@
- echo "${KV%%.*}"
-}
-
-g_KV_minor() {
- [[ -z $1 ]] && return 1
- local KV=$@
- KV=${KV#*.}
- echo "${KV%%.*}"
-}
-
-g_KV_micro() {
- [[ -z $1 ]] && return 1
- local KV=$@
- KV=${KV#*.*.}
- echo "${KV%%[^[:digit:]]*}"
-}
-
-g_KV_to_int() {
- [[ -z $1 ]] && return 1
- local KV_MAJOR=$(g_KV_major "$1")
- local KV_MINOR=$(g_KV_minor "$1")
- local KV_MICRO=$(g_KV_micro "$1")
- local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO ))
-
- # We make version 2.2.0 the minimum version we will handle as
- # a sanity check ... if its less, we fail ...
- if [[ ${KV_int} -ge 131584 ]] ; then
- echo "${KV_int}"
- return 0
- fi
- return 1
-}
-
-g_int_to_KV() {
- local version=$1 major minor micro
- major=$((version / 65536))
- minor=$(((version % 65536) / 256))
- micro=$((version % 256))
- echo ${major}.${minor}.${micro}
-}
-
-eend_KV() {
- [[ $(g_KV_to_int $1) -ge $(g_KV_to_int $2) ]]
- eend $?
-}
-
-get_kheader_version() {
- printf '#include <linux/version.h>\nLINUX_VERSION_CODE\n' | \
- $(tc-getCPP ${CTARGET}) -I "${EPREFIX}/$(alt_build_headers)" - | \
- tail -n 1
-}
-
-# We collect all sanity checks here. Consistency is not guranteed between
-# pkg_ and src_ phases, so we call this function both in pkg_pretend and in
-# src_unpack.
-sanity_prechecks() {
- # Make sure devpts is mounted correctly for use w/out setuid pt_chown
- check_devpts
-
- # Prevent native builds from downgrading
- if [[ ${MERGE_TYPE} != "buildonly" ]] && \
- [[ ${ROOT} == "/" ]] && \
- [[ ${CBUILD} == ${CHOST} ]] && \
- [[ ${CHOST} == ${CTARGET} ]] ; then
-
- # The high rev # is to allow people to downgrade between -r#
- # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2
- # should be fine. Hopefully we never actually use a r# this
- # high.
- if has_version ">${CATEGORY}/${P}-r10000" ; then
- eerror "Sanity check to keep you from breaking your system:"
- eerror " Downgrading glibc is not supported and a sure way to destruction."
- die "Aborting to save your system."
- fi
-
- if ! do_run_test '#include <unistd.h>\n#include <sys/syscall.h>\nint main(){return syscall(1000)!=-1;}\n' ; then
- eerror "Your old kernel is broken. You need to update it to a newer"
- eerror "version as syscall(<bignum>) will break. See bug 279260."
- die "Old and broken kernel."
- fi
- fi
-
- # Users have had a chance to phase themselves, time to give em the boot
- if [[ -e ${EROOT}/etc/locale.gen ]] && [[ -e ${EROOT}/etc/locales.build ]] ; then
- eerror "You still haven't deleted ${EROOT}/etc/locales.build."
- eerror "Do so now after making sure ${EROOT}/etc/locale.gen is kosher."
- die "Lazy upgrader detected"
- fi
-
- if [[ ${CTARGET} == i386-* ]] ; then
- eerror "i386 CHOSTs are no longer supported."
- eerror "Chances are you don't actually want/need i386."
- eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml"
- die "Please fix your CHOST"
- fi
-
- if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then
- ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS."
- ewarn "This will result in a 50% performance penalty when running with a 32bit"
- ewarn "hypervisor, which is probably not what you want."
- fi
-
- use hardened && ! tc-enables-pie && \
- ewarn "PIE hardening not applied, as your compiler doesn't default to PIE"
-
- # Check for sanity of /etc/nsswitch.conf
- if [[ -e ${EROOT}/etc/nsswitch.conf ]] ; then
- local entry
- for entry in passwd group shadow; do
- if ! egrep -q "^[ \t]*${entry}:.*files" "${EROOT}"/etc/nsswitch.conf; then
- eerror "Your ${EROOT}/etc/nsswitch.conf is out of date."
- eerror "Please make sure you have 'files' entries for"
- eerror "'passwd:', 'group:' and 'shadow:' databases."
- eerror "For more details see:"
- eerror " https://wiki.gentoo.org/wiki/Project:Toolchain/nsswitch.conf_in_glibc-2.26"
- die "nsswitch.conf has no 'files' provider in '${entry}'."
- fi
- done
- fi
-
- # ABI-specific checks follow here. Hey, we have a lot more specific conditions that
- # we test for...
- if ! is_crosscompile ; then
- if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then
- ebegin "Checking that IA32 emulation is enabled in the running kernel"
- echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c"
- local STAT
- if "${CC-${CHOST}-gcc}" ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then
- "${T}/check-ia32-emulation.elf32"
- STAT=$?
- else
- # Don't fail here to allow single->multi ABI switch
- # or recover from breakage like bug #646424
- ewarn "Failed to compile the ABI test. Broken host glibc?"
- STAT=0
- fi
- rm -f "${T}/check-ia32-emulation.elf32"
- eend $STAT
- [[ $STAT -eq 0 ]] || die "CONFIG_IA32_EMULATION must be enabled in the kernel to compile a multilib glibc."
- fi
-
- fi
-
- # When we actually have to compile something...
- if ! just_headers ; then
- local run_kv build_kv want_kv
-
- run_kv=$(g_get_running_KV)
- build_kv=$(g_int_to_KV $(get_kheader_version))
- want_kv=${MIN_KERN_VER}
-
- ebegin "Checking gcc for __thread support"
- if ! eend $(want__thread ; echo $?) ; then
- echo
- eerror "Could not find a gcc that supports the __thread directive!"
- eerror "Please update your binutils/gcc and try again."
- die "No __thread support in gcc!"
- fi
-
- if ! is_crosscompile && ! tc-is-cross-compiler ; then
- # Building fails on an non-supporting kernel
- ebegin "Checking running kernel version (${run_kv} >= ${want_kv})"
- if ! eend_KV ${run_kv} ${want_kv} ; then
- echo
- eerror "You need a kernel of at least ${want_kv}!"
- die "Kernel version too low!"
- fi
- fi
-
- ebegin "Checking linux-headers version (${build_kv} >= ${want_kv})"
- if ! eend_KV ${build_kv} ${want_kv} ; then
- echo
- eerror "You need linux-headers of at least ${want_kv}!"
- die "linux-headers version too low!"
- fi
- fi
-}
-
-#
-# the phases
-#
-
-# pkg_pretend
-
-pkg_pretend() {
- # All the checks...
- einfo "Checking general environment sanity."
- sanity_prechecks
-}
-
-# src_unpack
-
-src_unpack() {
- # Consistency is not guaranteed between pkg_ and src_ ...
- sanity_prechecks
-
- use multilib && unpack gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2
-
- setup_env
-
- if [[ -n ${EGIT_REPO_URI} ]] ; then
- git-r3_src_unpack
- else
- unpack ${P}.tar.xz
- fi
-
- cd "${S}" || die
- touch locale/C-translit.h || die #185476 #218003
-
- cd "${WORKDIR}" || die
- unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2
-}
-
-src_prepare() {
- if ! use vanilla ; then
- elog "Applying Gentoo Glibc Patchset ${RELEASE_VER}-${PATCH_VER}"
- eapply "${WORKDIR}"/patches
- einfo "Done."
- fi
-
- default
-
- gnuconfig_update
-
- cd "${WORKDIR}"
- find . -name configure -exec touch {} +
-
- eprefixify extra/locale/locale-gen
-
- # Fix permissions on some of the scripts.
- chmod u+x "${S}"/scripts/*.sh
-
- cd "${S}"
-
- if use hardened ; then
- # We don't enable these for non-hardened as the output is very terse --
- # it only states that a crash happened. The default upstream behavior
- # includes backtraces and symbols.
- einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler"
- cp "${FILESDIR}"/2.20/glibc-2.20-gentoo-stack_chk_fail.c debug/stack_chk_fail.c || die
- cp "${FILESDIR}"/2.25/glibc-2.25-gentoo-chk_fail.c debug/chk_fail.c || die
-
- if use debug ; then
- # Allow SIGABRT to dump core on non-hardened systems, or when debug is requested.
- sed -i \
- -e '/^CFLAGS-backtrace.c/ iCPPFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
- -e '/^CFLAGS-backtrace.c/ iCPPFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
- debug/Makefile || die
- fi
- fi
-}
-
-glibc_do_configure() {
- # Glibc does not work with gold (for various reasons) #269274.
- tc-ld-disable-gold
-
- # CXX isnt handled by the multilib system, so if we dont unset here
- # we accumulate crap across abis
- unset CXX
-
- einfo "Configuring glibc for nptl"
-
- if use doc ; then
- export MAKEINFO=makeinfo
- else
- export MAKEINFO=/dev/null
- fi
-
- local v
- for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS MAKEINFO ; do
- einfo " $(printf '%15s' ${v}:) ${!v}"
- done
-
- # The glibc configure script doesn't properly use LDFLAGS all the time.
- export CC="$(tc-getCC ${CTARGET}) ${LDFLAGS}"
- einfo " $(printf '%15s' 'Manual CC:') ${CC}"
-
- # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548
- export CXX="$(tc-getCXX ${CTARGET}) $(get_abi_CFLAGS)"
- einfo " $(printf '%15s' 'Manual CXX:') ${CXX}"
-
- echo
-
- local myconf=()
-
- case ${CTARGET} in
- powerpc-*)
- # Currently gcc on powerpc32 generates invalid code for
- # __builtin_return_address(0) calls. Normally programs
- # don't do that but malloc hooks in glibc do:
- # https://gcc.gnu.org/PR81996
- # https://bugs.gentoo.org/629054
- myconf+=( --enable-stack-protector=no )
- ;;
- *)
- myconf+=( --enable-stack-protector=all )
- ;;
- esac
- myconf+=( --enable-stackguard-randomization )
-
- # Keep a whitelist of targets supporing IFUNC. glibc's ./configure
- # is not robust enough to detect proper support:
- # https://bugs.gentoo.org/641216
- # https://sourceware.org/PR22634#c0
- case $(tc-arch ${CTARGET}) in
- # Keep whitelist of targets where autodetection mostly works.
- amd64|x86|sparc|ppc|ppc64|arm|arm64|s390) ;;
- # Blacklist everywhere else
- *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;;
- esac
-
- [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp )
-
- myconf+=( --enable-kernel=${MIN_KERN_VER} )
-
- # Since SELinux support is only required for nscd, only enable it if:
- # 1. USE selinux
- # 2. only for the primary ABI on multilib systems
- # 3. Not a crosscompile
- if ! is_crosscompile && use selinux ; then
- if use multilib ; then
- if is_final_abi ; then
- myconf+=( --with-selinux )
- else
- myconf+=( --without-selinux )
- fi
- else
- myconf+=( --with-selinux )
- fi
- else
- myconf+=( --without-selinux )
- fi
-
- # Force a few tests where we always know the answer but
- # configure is incapable of finding it.
- if is_crosscompile ; then
- export \
- libc_cv_c_cleanup=yes \
- libc_cv_forced_unwind=yes
- fi
-
- myconf+=(
- --without-cvs
- --disable-werror
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- $(use_enable profile)
- $(use_with gd)
- --with-headers=$(alt_build_headers)
- --prefix="${EPREFIX}/usr"
- --sysconfdir="${EPREFIX}/etc"
- --localstatedir="${EPREFIX}/var"
- --libdir='$(prefix)'/$(get_libdir)
- --mandir='$(prefix)'/share/man
- --infodir='$(prefix)'/share/info
- --libexecdir='$(libdir)'/misc/glibc
- --with-bugurl=https://bugs.gentoo.org/
- --with-pkgversion="$(glibc_banner)"
- $(use_multiarch || echo --disable-multi-arch)
- $(in_iuse systemtap && use_enable systemtap)
- $(in_iuse nscd && use_enable nscd)
- ${EXTRA_ECONF}
- )
-
- # We rely on sys-libs/timezone-data for timezone tools normally.
- myconf+=( $(use_enable vanilla timezone-tools) )
-
- # These libs don't have configure flags.
- ac_cv_lib_audit_audit_log_user_avc_message=$(in_iuse audit && usex audit || echo no)
- ac_cv_lib_cap_cap_init=$(in_iuse caps && usex caps || echo no)
-
- # There is no configure option for this and we need to export it
- # since the glibc build will re-run configure on itself
- export libc_cv_rootsbindir="${EPREFIX}/sbin"
- export libc_cv_slibdir="${EPREFIX}/$(get_libdir)"
-
- # We take care of patching our binutils to use both hash styles,
- # and many people like to force gnu hash style only, so disable
- # this overriding check. #347761
- export libc_cv_hashstyle=no
-
- local builddir=$(builddir nptl)
- mkdir -p "${builddir}"
- cd "${builddir}"
- set -- "${S}"/configure "${myconf[@]}"
- echo "$@"
- "$@" || die "failed to configure glibc"
-
- # ia64 static cross-compilers are a pita in so much that they
- # can't produce static ELFs (as the libgcc.a is broken). so
- # disable building of the programs for those targets if it
- # doesn't work.
- # XXX: We could turn this into a compiler test, but ia64 is
- # the only one that matters, so this should be fine for now.
- if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then
- sed -i '1i+link-static = touch $@' config.make
- fi
-
- # If we're trying to migrate between ABI sets, we need
- # to lie and use a local copy of gcc. Like if the system
- # is built with MULTILIB_ABIS="amd64 x86" but we want to
- # add x32 to it, gcc/glibc don't yet support x32.
- #
- if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib ; then
- echo 'main(){}' > "${T}"/test.c
- if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then
- sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die
- fi
- fi
-}
-
-glibc_headers_configure() {
- export ABI=default
-
- local builddir=$(builddir "headers")
- mkdir -p "${builddir}"
- cd "${builddir}"
-
- # if we don't have a compiler yet, we can't really test it now ...
- # hopefully they don't affect header generation, so let's hope for
- # the best here ...
- local v vars=(
- ac_cv_header_cpuid_h=yes
- libc_cv_{386,390,alpha,arm,hppa,ia64,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes
- libc_cv_asm_cfi_directives=yes
- libc_cv_broken_visibility_attribute=no
- libc_cv_c_cleanup=yes
- libc_cv_compiler_powerpc64le_binary128_ok=yes
- libc_cv_forced_unwind=yes
- libc_cv_gcc___thread=yes
- libc_cv_mlong_double_128=yes
- libc_cv_mlong_double_128ibm=yes
- libc_cv_ppc_machine=yes
- libc_cv_ppc_rel16=yes
- libc_cv_predef_fortify_source=no
- libc_cv_target_power8_ok=yes
- libc_cv_visibility_attribute=yes
- libc_cv_z_combreloc=yes
- libc_cv_z_execstack=yes
- libc_cv_z_initfirst=yes
- libc_cv_z_nodelete=yes
- libc_cv_z_nodlopen=yes
- libc_cv_z_relro=yes
- libc_mips_abi=${ABI}
- libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard)
- # These libs don't have configure flags.
- ac_cv_lib_audit_audit_log_user_avc_message=no
- ac_cv_lib_cap_cap_init=no
- )
-
- einfo "Forcing cached settings:"
- for v in "${vars[@]}" ; do
- einfo " ${v}"
- export ${v}
- done
-
- local headers_only_arch_CPPFLAGS=()
-
- # Blow away some random CC settings that screw things up. #550192
- if [[ -d ${S}/sysdeps/mips ]]; then
- pushd "${S}"/sysdeps/mips >/dev/null
- sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die
- sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die
-
- # Force the mips ABI to the default. This is OK because the set of
- # installed headers in this phase is the same between the 3 ABIs.
- # If this ever changes, this hack will break, but that's unlikely
- # as glibc discourages that behavior.
- # https://crbug.com/647033
- sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die
-
- popd >/dev/null
- fi
-
- case ${CTARGET} in
- riscv*)
- # RISC-V interrogates the compiler to determine which target to
- # build. If building the headers then we don't strictly need a
- # RISC-V compiler, so the built-in definitions that are provided
- # along with all RISC-V compiler might not exist. This causes
- # glibc's RISC-V preconfigure script to blow up. Since we're just
- # building the headers any value will actually work here, so just
- # pick the standard one (rv64g/lp64d) to make the build scripts
- # happy for now -- the headers are all the same anyway so it
- # doesn't matter.
- headers_only_arch_CPPFLAGS+=(
- -D__riscv_xlen=64
- -D__riscv_flen=64
- -D__riscv_float_abi_double=1
- -D__riscv_atomic=1
- ) ;;
- esac
-
- local myconf=()
- myconf+=(
- --disable-sanity-checks
- --enable-hacker-mode
- --without-cvs
- --disable-werror
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- --with-headers=$(alt_build_headers)
- --prefix="${EPREFIX}/usr"
- ${EXTRA_ECONF}
- )
-
- # Nothing is compiled here which would affect the headers for the target.
- # So forcing CC/CFLAGS is sane.
- local headers_only_CC=$(tc-getBUILD_CC)
- local headers_only_CFLAGS="-O1 -pipe"
- local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}"
- local headers_only_LDFLAGS=""
- set -- "${S}"/configure "${myconf[@]}"
- echo \
- "CC=${headers_only_CC}" \
- "CFLAGS=${headers_only_CFLAGS}" \
- "CPPFLAGS=${headers_only_CPPFLAGS}" \
- "LDFLAGS=${headers_only_LDFLAGS}" \
- "$@"
- CC=${headers_only_CC} \
- CFLAGS=${headers_only_CFLAGS} \
- CPPFLAGS=${headers_only_CPPFLAGS} \
- LDFLAGS="" \
- "$@" || die "failed to configure glibc"
-}
-
-do_src_configure() {
- if just_headers ; then
- glibc_headers_configure
- else
- glibc_do_configure nptl
- fi
-}
-
-src_configure() {
- foreach_abi do_src_configure
-}
-
-do_src_compile() {
- emake -C "$(builddir nptl)" || die "make nptl for ${ABI} failed"
-}
-
-src_compile() {
- if just_headers ; then
- return
- fi
-
- foreach_abi do_src_compile
-}
-
-glibc_src_test() {
- cd "$(builddir nptl)"
- emake check
-}
-
-do_src_test() {
- local ret=0
-
- glibc_src_test
- : $(( ret |= $? ))
-
- return ${ret}
-}
-
-src_test() {
- if just_headers ; then
- return
- fi
-
- # Give tests more time to complete.
- export TIMEOUTFACTOR=5
-
- foreach_abi do_src_test || die "tests failed"
-}
-
-run_locale_gen() {
- # if the host locales.gen contains no entries, we'll install everything
- local root="$1"
- local locale_list="${root}/etc/locale.gen"
- if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
- ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
- locale_list="${root}/usr/share/i18n/SUPPORTED"
- fi
-
- locale-gen --jobs $(makeopts_jobs) --config "${locale_list}" \
- --destdir "${root}"
-}
-
-glibc_do_src_install() {
- local builddir=$(builddir nptl)
- cd "${builddir}"
-
- emake install_root="${D}$(alt_prefix)" install || die
-
- # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support
- # which come without headers etc. Only needed for binary packages since the
- # external net-libs/libnsl has increased soversion. Keep only versioned libraries.
- find "${D}" -name "libnsl.a" -delete
- find "${D}" -name "libnsl.so" -delete
-
- # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need
- # to infer upstream version:
- # '#define VERSION "2.26.90"' -> '2.26.90'
- local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h)
-
- if [[ -e ${ED}$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then
- # Move versioned .a file out of libdir to evade portage QA checks
- # instead of using gen_usr_ldscript(). We fix ldscript as:
- # "GROUP ( /usr/lib64/libm-<pv>.a ..." -> "GROUP ( /usr/lib64/glibc-<pv>/libm-<pv>.a ..."
- sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"$(alt_usrlibdir)/libm.a || die
- dodir $(alt_usrlibdir)/${P}
- mv "${ED}"$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die
- fi
-
- # We'll take care of the cache ourselves
- rm -f "${ED}"/etc/ld.so.cache
-
- # Everything past this point just needs to be done once ...
- is_final_abi || return 0
-
- # Make sure the non-native interp can be found on multilib systems even
- # if the main library set isn't installed into the right place. Maybe
- # we should query the active gcc for info instead of hardcoding it ?
- local i ldso_abi ldso_name
- local ldso_abi_list=(
- # x86
- amd64 /lib64/ld-linux-x86-64.so.2
- x32 /libx32/ld-linux-x32.so.2
- x86 /lib/ld-linux.so.2
- # mips
- o32 /lib/ld.so.1
- n32 /lib32/ld.so.1
- n64 /lib64/ld.so.1
- # powerpc
- ppc /lib/ld.so.1
- ppc64 /lib64/ld64.so.1
- # s390
- s390 /lib/ld.so.1
- s390x /lib/ld64.so.1
- # sparc
- sparc32 /lib/ld-linux.so.2
- sparc64 /lib64/ld-linux.so.2
- )
- case $(tc-endian) in
- little)
- ldso_abi_list+=(
- # arm
- arm64 /lib/ld-linux-aarch64.so.1
- )
- ;;
- big)
- ldso_abi_list+=(
- # arm
- arm64 /lib/ld-linux-aarch64_be.so.1
- )
- ;;
- esac
- if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then
- dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib
- fi
- for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do
- ldso_abi=${ldso_abi_list[i]}
- has ${ldso_abi} $(get_install_abis) || continue
-
- ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}"
- if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then
- dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name}
- fi
- done
-
- # With devpts under Linux mounted properly, we do not need the pt_chown
- # binary to be setuid. This is because the default owners/perms will be
- # exactly what we want.
- if in_iuse suid && ! use suid ; then
- find "${ED}" -name pt_chown -exec chmod -s {} +
- fi
-
- #################################################################
- # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY #
- # Make sure we install some symlink hacks so that when we build
- # a 2nd stage cross-compiler, gcc finds the target system
- # headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- # We need to make sure that /lib and /usr/lib always exists.
- # gcc likes to use relative paths to get to its multilibs like
- # /usr/lib/../lib64/. So while we don't install any files into
- # /usr/lib/, we do need it to exist.
- cd "${ED}"$(alt_libdir)/..
- [[ -e lib ]] || mkdir lib
- cd "${ED}"$(alt_usrlibdir)/..
- [[ -e lib ]] || mkdir lib
-
- dosym usr/include $(alt_prefix)/sys-include
- return 0
- fi
-
- # Files for Debian-style locale updating
- dodir /usr/share/i18n
- sed \
- -e "/^#/d" \
- -e "/SUPPORTED-LOCALES=/d" \
- -e "s: \\\\::g" -e "s:/: :g" \
- "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \
- || die "generating /usr/share/i18n/SUPPORTED failed"
- cd "${WORKDIR}"/extra/locale
- dosbin locale-gen
- doman *.[0-8]
- insinto /etc
- doins locale.gen
-
- # Make sure all the ABI's can find the locales and so we only
- # have to generate one set
- local a
- keepdir /usr/$(get_libdir)/locale
- for a in $(get_install_abis) ; do
- if [[ ! -e ${ED}/usr/$(get_abi_LIBDIR ${a})/locale ]] ; then
- dosym ../$(get_libdir)/locale /usr/$(get_abi_LIBDIR ${a})/locale
- fi
- done
-
- cd "${S}"
-
- # Install misc network config files
- insinto /etc
- doins nscd/nscd.conf posix/gai.conf nss/nsswitch.conf
- doins "${WORKDIR}"/extra/etc/*.conf
-
- if use nscd ; then
- doinitd "$(prefixify_ro "${WORKDIR}"/extra/etc/nscd)"
-
- local nscd_args=(
- -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):"
- )
-
- sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd
-
- systemd_dounit nscd/nscd.service
- systemd_newtmpfilesd nscd/nscd.tmpfiles nscd.conf
- else
- # Do this since extra/etc/*.conf above might have nscd.conf.
- rm -f "${ED}"/etc/nscd.conf
- fi
-
- echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc
- doenvd "${T}"/00glibc
-
- for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do
- [[ -s ${d} ]] && dodoc ${d}
- done
- dodoc -r ChangeLog.old
-
- # Prevent overwriting of the /etc/localtime symlink. We'll handle the
- # creation of the "factory" symlink in pkg_postinst().
- rm -f "${ED}"/etc/localtime
-
- # Generate all locales if this is a native build as locale generation
- if use compile-locales && ! is_crosscompile ; then
- run_locale_gen "${ED}"
- fi
-}
-
-glibc_headers_install() {
- local builddir=$(builddir "headers")
- cd "${builddir}"
- emake install_root="${D}$(alt_prefix)" install-headers
-
- insinto $(alt_headers)/gnu
- doins "${S}"/include/gnu/stubs.h
-
- # Make sure we install the sys-include symlink so that when
- # we build a 2nd stage cross-compiler, gcc finds the target
- # system headers correctly. See gcc/doc/gccinstall.info
- dosym usr/include $(alt_prefix)/sys-include
-}
-
-src_strip() {
- # gdb is lame and requires some debugging information to remain in
- # libpthread, so we need to strip it by hand. libthread_db makes no
- # sense stripped as it is only used when debugging.
- local pthread=$(has splitdebug ${FEATURES} && echo "libthread_db" || echo "lib{pthread,thread_db}")
- env \
- -uRESTRICT \
- CHOST=${CTARGET} \
- STRIP_MASK="/*/{,tls/}${pthread}*" \
- prepallstrip
- # if user has stripping enabled and does not have split debug turned on,
- # then leave the debugging sections in libpthread.
- if ! has nostrip ${FEATURES} && ! has splitdebug ${FEATURES} ; then
- ${STRIP:-${CTARGET}-strip} --strip-debug "${ED}"$(alt_prefix)/*/libpthread-*.so
- fi
-}
-
-src_install() {
- if just_headers ; then
- export ABI=default
- glibc_headers_install
- return
- fi
-
- foreach_abi glibc_do_src_install
- src_strip
-}
-
-# Simple test to make sure our new glibc isn't completely broken.
-# Make sure we don't test with statically built binaries since
-# they will fail. Also, skip if this glibc is a cross compiler.
-#
-# If coreutils is built with USE=multicall, some of these files
-# will just be wrapper scripts, not actual ELFs we can test.
-glibc_sanity_check() {
- cd / #228809
-
- # We enter ${ED} so to avoid trouble if the path contains
- # special characters; for instance if the path contains the
- # colon character (:), then the linker will try to split it
- # and look for the libraries in an unexpected place. This can
- # lead to unsafe code execution if the generated prefix is
- # within a world-writable directory.
- # (e.g. /var/tmp/portage:${HOSTNAME})
- pushd "${ED}"/$(get_libdir) >/dev/null
-
- local x striptest
- for x in cal date env free ls true uname uptime ; do
- x=$(type -p ${x})
- [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue
- striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue
- case ${striptest} in
- *"statically linked"*) continue;;
- *"ASCII text"*) continue;;
- esac
- # We need to clear the locale settings as the upgrade might want
- # incompatible locale data. This test is not for verifying that.
- LC_ALL=C \
- ./ld-*.so --library-path . ${x} > /dev/null \
- || die "simple run test (${x}) failed"
- done
-
- popd >/dev/null
-}
-
-pkg_preinst() {
- # nothing to do if just installing headers
- just_headers && return
-
- # prepare /etc/ld.so.conf.d/ for files
- mkdir -p "${EROOT}"/etc/ld.so.conf.d
-
- # Default /etc/hosts.conf:multi to on for systems with small dbs.
- if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then
- sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf
- einfo "Defaulting /etc/host.conf:multi to on"
- fi
-
- [[ ${ROOT} != "/" ]] && return 0
- [[ -d ${ED}/$(get_libdir) ]] || return 0
- [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check
-}
-
-pkg_postinst() {
- # nothing to do if just installing headers
- just_headers && return
-
- if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then
- # Generate fastloading iconv module configuration file.
- "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}"
- fi
-
- if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then
- # Reload init ... if in a chroot or a diff init package, ignore
- # errors from this step #253697
- /sbin/telinit U 2>/dev/null
-
- use compile-locales || run_locale_gen "${EROOT}"
- fi
-
- # Check for sanity of /etc/nsswitch.conf, take 2
- if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then
- local entry
- for entry in passwd group shadow; do
- if egrep -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then
- ewarn ""
- ewarn "Your ${EROOT}/etc/nsswitch.conf uses NIS. Support for that has been"
- ewarn "removed from glibc and is now provided by the package"
- ewarn " sys-auth/libnss-nis"
- ewarn "Install it now to keep your NIS setup working."
- ewarn ""
- fi
- done
- fi
-}
diff --git a/sys-libs/glibc/glibc-2.27-r2.ebuild b/sys-libs/glibc/glibc-2.27-r2.ebuild
index b45dd3a49214..3d2fa2400250 100644
--- a/sys-libs/glibc/glibc-2.27-r2.ebuild
+++ b/sys-libs/glibc/glibc-2.27-r2.ebuild
@@ -894,8 +894,8 @@ glibc_do_configure() {
--with-bugurl=https://bugs.gentoo.org/
--with-pkgversion="$(glibc_banner)"
$(use_multiarch || echo --disable-multi-arch)
- $(in_iuse systemtap && use_enable systemtap)
- $(in_iuse nscd && use_enable nscd)
+ $(use_enable systemtap)
+ $(use_enable nscd)
${EXTRA_ECONF}
)
@@ -903,8 +903,8 @@ glibc_do_configure() {
myconf+=( $(use_enable vanilla timezone-tools) )
# These libs don't have configure flags.
- ac_cv_lib_audit_audit_log_user_avc_message=$(in_iuse audit && usex audit || echo no)
- ac_cv_lib_cap_cap_init=$(in_iuse caps && usex caps || echo no)
+ ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no)
+ ac_cv_lib_cap_cap_init=$(usex caps || echo no)
# There is no configure option for this and we need to export it
# since the glibc build will re-run configure on itself
@@ -1209,7 +1209,7 @@ glibc_do_src_install() {
# With devpts under Linux mounted properly, we do not need the pt_chown
# binary to be setuid. This is because the default owners/perms will be
# exactly what we want.
- if in_iuse suid && ! use suid ; then
+ if ! use suid ; then
find "${ED}" -name pt_chown -exec chmod -s {} +
fi
diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
index 7c5d09ab85ac..ee82933c6632 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -886,8 +886,8 @@ glibc_do_configure() {
--with-bugurl=https://bugs.gentoo.org/
--with-pkgversion="$(glibc_banner)"
$(use_multiarch || echo --disable-multi-arch)
- $(in_iuse systemtap && use_enable systemtap)
- $(in_iuse nscd && use_enable nscd)
+ $(use_enable systemtap)
+ $(use_enable nscd)
${EXTRA_ECONF}
)
@@ -895,8 +895,8 @@ glibc_do_configure() {
myconf+=( $(use_enable vanilla timezone-tools) )
# These libs don't have configure flags.
- ac_cv_lib_audit_audit_log_user_avc_message=$(in_iuse audit && usex audit || echo no)
- ac_cv_lib_cap_cap_init=$(in_iuse caps && usex caps || echo no)
+ ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no)
+ ac_cv_lib_cap_cap_init=$(usex caps || echo no)
# There is no configure option for this and we need to export it
# since the glibc build will re-run configure on itself
@@ -1201,7 +1201,7 @@ glibc_do_src_install() {
# With devpts under Linux mounted properly, we do not need the pt_chown
# binary to be setuid. This is because the default owners/perms will be
# exactly what we want.
- if in_iuse suid && ! use suid ; then
+ if ! use suid ; then
find "${ED}" -name pt_chown -exec chmod -s {} +
fi
diff --git a/sys-libs/libcxx/Manifest b/sys-libs/libcxx/Manifest
index 91cd302837d5..ee45c57bc06e 100644
--- a/sys-libs/libcxx/Manifest
+++ b/sys-libs/libcxx/Manifest
@@ -6,11 +6,13 @@ DIST libcxx-3.7.1.src.tar.xz 995724 BLAKE2B aab68f1b99a2c817e7154b71c04c81bd8091
DIST libcxx-3.9.1.src.tar.xz 1209020 BLAKE2B 510e77c2c1163babbba904933f441e8720b0d366b9f0cfa2cdde2401368c224e00efd66afc1403b0087c40549cda4ebbc4d0c4b2d0906178324fa6158502d5ad SHA512 a5976e4096624a7307b3e43f4a22ac2dc74572226e0f57af9f3ef537a14c3cff1601b7042aef9dc40a0ee53ca76b08d72eb9c253dcf34f115d3153c302db7070
DIST libcxx-4.0.1.src.tar.xz 1446380 BLAKE2B cd871eff4c4ca25a1fe4d27f778e913fe536a0b5863ea7dd3c8895f6b743b6f039e4df71f9ba5124c98761a8099666f68e1dfd073b5ec7b9fe0007ef09a9117d SHA512 91f3f397be606989be99865d0b279557f9afb93f7a74ed10c3a74f4440e38b5694ddf452bbf2f487cacd4391606dd5c7edfe5130f2de19e2acfd6cce619d028a
DIST libcxx-5.0.1.src.tar.xz 1527852 BLAKE2B 9454fbca8228ee456feb79b65a63ce5daa27bf2e47e457d79592f4974dceeace19fe6cdeee51cc51f94e9072d7ce3c03e5acb617507670153647b9c435feadbd SHA512 994681d3c79047fc2d618c5584b08e9b5c925dab48f8812fc0adc81a575b49a637e9481bb9a0f7ae6f7f352b2b33f40056c347c27123cd6c96c6c226febd002c
+DIST libcxx-5.0.2.src.tar.xz 1530908 BLAKE2B e0c47d6803668267a71c75df873a136a2c3bec3732a08c365107b286f6dfef883edb81f9f4d22a0f312228865528bf1f15450c41803f8d3a8c8081fe12b62c25 SHA512 c77e0ea6bb3dc03270312de4a24fdd0d027448b2e182af31489031fd52f0997377c9049769930b80b2ba0062fe21317d8ae823c5e80e12128f8ae8e6f171be22
DIST libcxx-6.0.0.src.tar.xz 1549328 BLAKE2B 93adb339b0e849fca1850d379c8e74b407b0db8220f3a05f888db70d83ad07c3200dbd2a7827f92c60a2ba91d3395e4d1b4434ba70479c29a95aceda6c213e02 SHA512 3d93910f85a778f36c5f7a4429639008acba5713a2c8ac79a9de09463af6f9a388af45d39af23423a7223660701697ba067f3391f25d5a970973691dd88635e3
EBUILD libcxx-3.7.1.ebuild 5335 BLAKE2B 6f4dbbb8dbc7f6e8b97f05ff3e638bb037bad416feffe5207a9cba166a5c0e0c92c3cac954088cc04cdf2a9be62f17cd5d7ece472e4e20d3c0be5b3c1edb2f52 SHA512 f4e04906e7205cd3d2f3180a0b897c1a9eaf5c65249bdbb62ed32a0455132009c88ae6f080b52abe6973752073ca3bc32e37e3491db9de2fc030cf77e4ed91b0
EBUILD libcxx-3.9.1.ebuild 6815 BLAKE2B d15c83602e244f8a50e0a9d15869dbd4c7be226d8b1f93249cb6658149ad2408f0feada97403a0dfa3dcd8ac25b98ae084d1d17c879f67ae24d33f8497aba569 SHA512 9c9632590b49cd01ad324641ee296f08442940ab1dda1f0c7cdc77abe6b653f70d0baa9b796ef7d77e1f4728e96fe27fcd42d79a389cfcf2b2427b087b9985af
EBUILD libcxx-4.0.1.ebuild 6453 BLAKE2B 2cab9946b4b79c4fc5310aae7ad32ae21f28a87e3e43c87731fe0542478342c4c7f5587472c39198b43f2a1f61329fc55a9e5c24804a34f70c70236e017eb964 SHA512 b656520a6bf00a73763fdf6f052869c76adb76ae9650d763c6b78a02393202c9bfeadd807ebafd6a071395aa64a0ede464fad0e4c127dfe39720e13342f82fc0
EBUILD libcxx-5.0.1.ebuild 6453 BLAKE2B 4d79da76e3c2904a443180c37b63d3486b568d1253ba716c5073df76dd72186d9700e16f49f7d4de0bde61e86538f711a77e42e3df9fcce4baf2903eaead5b5c SHA512 af3c95d85528b54f65f814c107ea5ccd5db293d22bac2856af2b11a7ce75fa41bb7169a23434b0138f5e62fe605bbbbcb050dc05c4b4c4bfa9d576a868552dde
+EBUILD libcxx-5.0.2.ebuild 6455 BLAKE2B b1f36da497529deadf2c8b8157915490b82b29da70dc5cd4f3723480913ad4702d9764d80b4aeef17694e699eb194a0adfca6cf61d5295161be806c7414c9402 SHA512 5d9e50e8013ec860a0223f53aa678f954465139bc6afb46b5a9b4258247e41f32cfb901fd598803babfde47ea3d719b83f7ae10e0731001fc7ccab1476f0892a
EBUILD libcxx-6.0.0.ebuild 6699 BLAKE2B 83e6112e8bdc5fc1f86404c2be72b0acb89d251a2f29d098ac1296ff2073a91cdbacc212dc9bbcbaef7c961b15c080cf975f33cb599aebf2e57bcd036d3101be SHA512 7c0eedefdce34ec28e8eed1cf60dd11f510ea3994efe8f01687a46692953f655da8cbc6b2b5b69a3e33e3f895a779ca8d6fadd9ec899e7afd62173549bae34c3
EBUILD libcxx-6.0.9999.ebuild 6998 BLAKE2B 643fc6c64242e24038fc2fdca37f916d475539372d9beec9692e0f9afdc0078c4221d0cb6fe35939cb94d3c83c298f56626396d5067cf8fc7157718ab0e0a98c SHA512 85ac1785d3495c7df6e080912ddedabf10c6d7ff3323d1b100172d320f081a94bef0f47502b9914f5428e6391c124c5dfb33e52319204a8084a0a1b8432acf33
EBUILD libcxx-9999.ebuild 6970 BLAKE2B 25154a733062646b8e19da4f38a2ade388140c16b36e4310cdca613d9299a655bbae07a1a476da564c1ef3d32a26f2816533bcd0683051ea104c5711f36e4818 SHA512 91565a2e05a5e48320cc7b7e49ea7722f74a0b80af145a53d9838d84603e51c666fb2a57eceae3231f86e9dde3c051c918286d291a4343c9bd728a7ab429e3f8
diff --git a/sys-libs/libcxx/libcxx-5.0.2.ebuild b/sys-libs/libcxx/libcxx-5.0.2.ebuild
new file mode 100644
index 000000000000..40c9547f3351
--- /dev/null
+++ b/sys-libs/libcxx/libcxx-5.0.2.ebuild
@@ -0,0 +1,207 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# Ninja provides better scalability and cleaner verbose output, and is used
+# throughout all LLVM projects.
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
+# (needed due to CMAKE_BUILD_TYPE != Gentoo)
+CMAKE_MIN_VERSION=3.7.0-r1
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-multilib llvm python-any-r1 toolchain-funcs
+
+DESCRIPTION="New implementation of the C++ standard library, targeting C++11"
+HOMEPAGE="https://libcxx.llvm.org/"
+SRC_URI="https://releases.llvm.org/${PV/_//}/${P/_/}.src.tar.xz"
+
+LICENSE="|| ( UoI-NCSA MIT )"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="elibc_glibc elibc_musl +libcxxabi libcxxrt +libunwind +static-libs test"
+REQUIRED_USE="libunwind? ( || ( libcxxabi libcxxrt ) )
+ ?? ( libcxxabi libcxxrt )"
+
+RDEPEND="
+ libcxxabi? ( ~sys-libs/libcxxabi-${PV}[libunwind=,static-libs?,${MULTILIB_USEDEP}] )
+ libcxxrt? ( sys-libs/libcxxrt[libunwind=,static-libs?,${MULTILIB_USEDEP}] )
+ !libcxxabi? ( !libcxxrt? ( >=sys-devel/gcc-4.7:=[cxx] ) )"
+# LLVM 4 required for llvm-config --cmakedir
+# clang-3.9.0 installs necessary target symlinks unconditionally
+# which removes the need for MULTILIB_USEDEP
+DEPEND="${RDEPEND}
+ test? ( >=sys-devel/clang-3.9.0
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )
+ app-arch/xz-utils
+ >=sys-devel/llvm-4"
+
+S=${WORKDIR}/${P/_/}.src
+
+DOCS=( CREDITS.TXT )
+
+PATCHES=(
+ # Add link flag "-Wl,-z,defs" to avoid underlinking; this is needed in a
+ # out-of-tree build.
+ "${FILESDIR}/${PN}-3.9-cmake-link-flags.patch"
+)
+
+# least intrusive of all
+CMAKE_BUILD_TYPE=RelWithDebInfo
+
+python_check_deps() {
+ has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ llvm_pkg_setup
+ use test && python-any-r1_pkg_setup
+
+ if ! use libcxxabi && ! use libcxxrt && ! tc-is-gcc ; then
+ eerror "To build ${PN} against libsupc++, you have to use gcc. Other"
+ eerror "compilers are not supported. Please set CC=gcc and CXX=g++"
+ eerror "and try again."
+ die
+ fi
+ if tc-is-gcc && [[ $(gcc-version) < 4.7 ]] ; then
+ eerror "${PN} needs to be built with gcc-4.7 or later (or other"
+ eerror "conformant compilers). Please use gcc-config to switch to"
+ eerror "gcc-4.7 or later version."
+ die
+ fi
+}
+
+multilib_src_configure() {
+ local cxxabi cxxabi_incs
+ if use libcxxabi; then
+ cxxabi=libcxxabi
+ cxxabi_incs="${EPREFIX}/usr/include/libcxxabi"
+ elif use libcxxrt; then
+ cxxabi=libcxxrt
+ cxxabi_incs="${EPREFIX}/usr/include/libcxxrt"
+ else
+ local gcc_inc="${EPREFIX}/usr/lib/gcc/${CHOST}/$(gcc-fullversion)/include/g++-v$(gcc-major-version)"
+ cxxabi=libsupc++
+ cxxabi_incs="${gcc_inc};${gcc_inc}/${CHOST}"
+ fi
+
+ # we want -lgcc_s for unwinder, and for compiler runtime when using
+ # gcc, clang with gcc runtime (or any unknown compiler)
+ local extra_libs=() want_gcc_s=ON
+ if use libunwind; then
+ # work-around missing -lunwind upstream
+ extra_libs+=( -lunwind )
+ # if we're using libunwind and clang with compiler-rt, we want
+ # to link to compiler-rt instead of -lgcc_s
+ if tc-is-clang; then
+ # get the full library list out of 'pretend mode'
+ # and grep it for libclang_rt references
+ local args=( $($(tc-getCC) -### -x c - 2>&1 | tail -n 1) )
+ local i
+ for i in "${args[@]}"; do
+ if [[ ${i} == *libclang_rt* ]]; then
+ want_gcc_s=OFF
+ extra_libs+=( "${i}" )
+ fi
+ done
+ fi
+ fi
+
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ -DLIBCXX_LIBDIR_SUFFIX=${libdir#lib}
+ -DLIBCXX_ENABLE_SHARED=ON
+ -DLIBCXX_ENABLE_STATIC=$(usex static-libs)
+ -DLIBCXX_CXX_ABI=${cxxabi}
+ -DLIBCXX_CXX_ABI_INCLUDE_PATHS=${cxxabi_incs}
+ # we're using our own mechanism for generating linker scripts
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_HAS_GCC_S_LIB=${want_gcc_s}
+ -DLIBCXX_INCLUDE_TESTS=$(usex test)
+ -DCMAKE_SHARED_LINKER_FLAGS="${extra_libs[*]} ${LDFLAGS}"
+ )
+
+ if use test; then
+ mycmakeargs+=(
+ # this can be any directory, it just needs to exist...
+ # FIXME: remove this once https://reviews.llvm.org/D25093 is merged
+ -DLLVM_MAIN_SRC_DIR="${T}"
+ )
+ if has_version '>=sys-devel/llvm-6'; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ )
+ else
+ mycmakeargs+=(
+ -DLIT_COMMAND="${EPREFIX}"/usr/bin/lit
+ )
+ fi
+ fi
+ cmake-utils_src_configure
+}
+
+multilib_src_test() {
+ local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
+
+ [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
+ sed -i -e "/cxx_under_test/s^\".*\"^\"${clang_path}\"^" test/lit.site.cfg || die
+
+ cmake-utils_src_make check-libcxx
+}
+
+# Usage: deps
+gen_ldscript() {
+ local output_format
+ output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
+ [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
+
+ cat <<-END_LDSCRIPT
+/* GNU ld script
+ Include missing dependencies
+*/
+${output_format}
+GROUP ( $@ )
+END_LDSCRIPT
+}
+
+gen_static_ldscript() {
+ local libdir=$(get_libdir)
+ local cxxabi_lib=$(usex libcxxabi "libc++abi.a" "$(usex libcxxrt "libcxxrt.a" "libsupc++.a")")
+
+ # Move it first.
+ mv "${ED}/usr/${libdir}/libc++.a" "${ED}/usr/${libdir}/libc++_static.a" || die
+ # Generate libc++.a ldscript for inclusion of its dependencies so that
+ # clang++ -stdlib=libc++ -static works out of the box.
+ local deps="libc++_static.a ${cxxabi_lib} $(usex libunwind libunwind.a libgcc_eh.a)"
+ # On Linux/glibc it does not link without libpthread or libdl. It is
+ # fine on FreeBSD.
+ use elibc_glibc && deps+=" libpthread.a libdl.a"
+
+ gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.a" || die
+}
+
+gen_shared_ldscript() {
+ local libdir=$(get_libdir)
+ # libsupc++ doesn't have a shared version
+ local cxxabi_lib=$(usex libcxxabi "libc++abi.so" "$(usex libcxxrt "libcxxrt.so" "libsupc++.a")")
+
+ mv "${ED}/usr/${libdir}/libc++.so" "${ED}/usr/${libdir}/libc++_shared.so" || die
+ local deps="libc++_shared.so ${cxxabi_lib} $(usex libunwind libunwind.so libgcc_s.so)"
+
+ gen_ldscript "${deps}" > "${ED}/usr/${libdir}/libc++.so" || die
+}
+
+multilib_src_install() {
+ cmake-utils_src_install
+ gen_shared_ldscript
+ use static-libs && gen_static_ldscript
+}
+
+pkg_postinst() {
+ elog "This package (${PN}) is mainly intended as a replacement for the C++"
+ elog "standard library when using clang."
+ elog "To use it, instead of libstdc++, use:"
+ elog " clang++ -stdlib=libc++"
+ elog "to compile your C++ programs."
+}
diff --git a/sys-libs/libcxxabi/Manifest b/sys-libs/libcxxabi/Manifest
index 773a341c179f..4c960a5fc67b 100644
--- a/sys-libs/libcxxabi/Manifest
+++ b/sys-libs/libcxxabi/Manifest
@@ -3,14 +3,17 @@ AUX libcxxabi-3.9.0-test-unwind.patch 1110 BLAKE2B 575be8dd84b6acb11e3c81f2a2079
DIST libcxx-3.9.1.src.tar.xz 1209020 BLAKE2B 510e77c2c1163babbba904933f441e8720b0d366b9f0cfa2cdde2401368c224e00efd66afc1403b0087c40549cda4ebbc4d0c4b2d0906178324fa6158502d5ad SHA512 a5976e4096624a7307b3e43f4a22ac2dc74572226e0f57af9f3ef537a14c3cff1601b7042aef9dc40a0ee53ca76b08d72eb9c253dcf34f115d3153c302db7070
DIST libcxx-4.0.1.src.tar.xz 1446380 BLAKE2B cd871eff4c4ca25a1fe4d27f778e913fe536a0b5863ea7dd3c8895f6b743b6f039e4df71f9ba5124c98761a8099666f68e1dfd073b5ec7b9fe0007ef09a9117d SHA512 91f3f397be606989be99865d0b279557f9afb93f7a74ed10c3a74f4440e38b5694ddf452bbf2f487cacd4391606dd5c7edfe5130f2de19e2acfd6cce619d028a
DIST libcxx-5.0.1.src.tar.xz 1527852 BLAKE2B 9454fbca8228ee456feb79b65a63ce5daa27bf2e47e457d79592f4974dceeace19fe6cdeee51cc51f94e9072d7ce3c03e5acb617507670153647b9c435feadbd SHA512 994681d3c79047fc2d618c5584b08e9b5c925dab48f8812fc0adc81a575b49a637e9481bb9a0f7ae6f7f352b2b33f40056c347c27123cd6c96c6c226febd002c
+DIST libcxx-5.0.2.src.tar.xz 1530908 BLAKE2B e0c47d6803668267a71c75df873a136a2c3bec3732a08c365107b286f6dfef883edb81f9f4d22a0f312228865528bf1f15450c41803f8d3a8c8081fe12b62c25 SHA512 c77e0ea6bb3dc03270312de4a24fdd0d027448b2e182af31489031fd52f0997377c9049769930b80b2ba0062fe21317d8ae823c5e80e12128f8ae8e6f171be22
DIST libcxx-6.0.0.src.tar.xz 1549328 BLAKE2B 93adb339b0e849fca1850d379c8e74b407b0db8220f3a05f888db70d83ad07c3200dbd2a7827f92c60a2ba91d3395e4d1b4434ba70479c29a95aceda6c213e02 SHA512 3d93910f85a778f36c5f7a4429639008acba5713a2c8ac79a9de09463af6f9a388af45d39af23423a7223660701697ba067f3391f25d5a970973691dd88635e3
DIST libcxxabi-3.9.1.src.tar.xz 510964 BLAKE2B a6abda1b92473781ea3029169c43547f15c1aa6e0ec6f9692ae633d109e050a6ff82ce8bceb0455375991b85c99784a4f06a568b8c77a4cf2865b9b2861e9595 SHA512 4f5603f1476b759c86d4784728fbdd212c59b30dc56d787c1834bf68a9cd83071fa22658d24e5a58beb94c0c656b0e4457d7da6e3048715dd36bd68380fc336e
DIST libcxxabi-4.0.1.src.tar.xz 515820 BLAKE2B 7d9e0dee4f6cb3eaa22647d959f8bf3d86779f8c51c0738143ba3daca83881daacc0663a1d2463507c8c4b8a1b9e1d5c111b829e5af2cb5b6f86bae8f06a0d47 SHA512 e94315ba8a507d8481d70c33e7ab2d724d51726edb8412c70a1b5f59e3f15d5825f1502dc2db138b20e5293fb90a184050be94d5ac270fd7ce78b502efb9f86a
DIST libcxxabi-5.0.1.src.tar.xz 521504 BLAKE2B e8263f458545ffb8ec27234e554427696644dcde3b46bea4fa0ee14b2b174d0c6c8dcc7905477140afaf567347e91815827aa6700c92ccfbfbea5364f591fc2a SHA512 a8d448653772690a19f68c1270f9cf18f27d7225847825f29c6ea21846c1074aa61c31b81bc2ae4007067985d389071c32e69b2560282ddb85864a99e9bdd884
+DIST libcxxabi-5.0.2.src.tar.xz 521448 BLAKE2B e7e42908845f692cdb8709955eb46cbc18ee1f4ac9f0224b6e2a6bc2af998415eca5cda03ffcac27ef6a93cde928951bc38503bae9144b634abd17ec46ad96eb SHA512 304c0ef1b2fd26d52dae66013ea0051de4c3cb1e9c8d1308833f34aec1ad288fcfe5d583f00ceb84c8d271c5cd5f868aa135a93f007138d124c01b70c13e842e
DIST libcxxabi-6.0.0.src.tar.xz 529212 BLAKE2B ae020e8831a6ae71d59d71e294bbb0aa6dbedf1b3036b2536d9456db8c51f21e57d082c5abf5e00921a14876328bdfafab3c04b4d761cb76d52e35ff97107510 SHA512 c5e4cc05105770b42b20595fdbda5e1483be4582bc94335da1a15531ba43a0ecf30e1e0a252f62d4d0e6c79cda9d44ff5fdbe69a0a295b2431fd6de158410e2e
EBUILD libcxxabi-3.9.1.ebuild 2646 BLAKE2B a1f66067e57f09aca9d2f44735f3c7b01af38b381ecab526f9bae8ffbc5c96856c5a6d8c829b2d95f0a0afffefd319670c8484c826ce81b94a63c51bb53ed114 SHA512 4849fbfe11876cb403d78852abd6df27a0dbeada69c15fd1af6e7a20d742fcca064b227592e3ac69e32546cef94c790f28d63d40c8522213a9910f0b625ea379
EBUILD libcxxabi-4.0.1.ebuild 3328 BLAKE2B 2cc64e780a60b79a5eed18840b3048256a9cd5374abaa61594085587ee120c2ac134287ece9fbc5c58ed947657cd280c32520719e6c4996c2593be20ab19894c SHA512 822b5056c1e62d1dd116349f6cb47fa023a20899a7ef18f91b80e7440ff857d55500bdf8adb9286c1f3f3ba2a45a7a95ba78430b58267e3e70296201951c66d3
EBUILD libcxxabi-5.0.1.ebuild 3193 BLAKE2B b1157a436e40da0b67d012c903b9a137f3544a404e91a414a3d451be7f1b6c5e0a79c3e424f8c0cbf58b33166332988ecc13ee84a3c5840ad54de7c033770a97 SHA512 1330ec5b22bb11f5e142eea5acf03cbe6f1282a58206de9039453100a5fb72a30d46fe3ac3be6c52ddc07eb4b71486fd1be3e83a15a7ae76fa999fb2660cd908
+EBUILD libcxxabi-5.0.2.ebuild 3195 BLAKE2B edb47e2d51e590ad9b71fa039fbea71a71231399d5b359d477d9f8a720c44811d0a28058a65889cca90a624dafbb97d33736a35a6670d9a31af6ded674343fbb SHA512 e665d6acf058a7a0dab380070ad80753c0de4207f8b3e927edcb68cf0ca535f6b17dce0116e727ed2b5e14a0ec7ab3f2a9728bc3fef7e453f970f615ed35bab1
EBUILD libcxxabi-6.0.0.ebuild 3174 BLAKE2B 15e674f92e5388b16ee1e68f4ec99ad2c05fd1e0f80652f0fa1706c8e8303ff501203197e543644223cfd003c97ca99ccc1f7ea96e58be7d8aab8bd000dfb376 SHA512 44e004150486f6d270fec0dfa7f03e2c3a14ecf21d883250044f45ee6b2ea8828c51bda3b1f23dd867cb88acdf3c529a295d7882cde04184527f6fd8531aa1a9
EBUILD libcxxabi-6.0.9999.ebuild 3288 BLAKE2B d43aa5dc53732dbc943b67625d54a4e97c2dc782722922e05f5906056c09345f5dbbeadc50af993e9b04c52218d9da9efb535aeba5e511ae8553549d2c867e1c SHA512 a75f53ab525c011fb834f24cfbe3ba5911e302cb080514146ea0f05fcb06b1cb0b3fa2342ccb3c1ca70873cc6e9fb0e1032479546f99ac85efbb6fa07aa5e3f2
EBUILD libcxxabi-9999.ebuild 3263 BLAKE2B 26e1877ef423b0f869b6033601c584599c00f6f46b7296ba213ff080bb060c81995a2be2693b16b73e94c979c46fa5632b0fcf110ba2bc86c1b8f30bb548f74d SHA512 28ee56c5c823aa82e02e7fa680455e425d2ec5c4ae4c98c82a18f7afa1d0a663d22f4a85299fb44c3c10d5367bf33637f68a70516b02c6c206293038a65e22ef
diff --git a/sys-libs/libcxxabi/libcxxabi-5.0.2.ebuild b/sys-libs/libcxxabi/libcxxabi-5.0.2.ebuild
new file mode 100644
index 000000000000..1e159ea9cfd5
--- /dev/null
+++ b/sys-libs/libcxxabi/libcxxabi-5.0.2.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
+# (needed due to CMAKE_BUILD_TYPE != Gentoo)
+CMAKE_MIN_VERSION=3.7.0-r1
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-multilib llvm python-any-r1
+
+MY_P=${P/_/}.src
+LIBCXX_P=libcxx-${PV/_/}.src
+
+DESCRIPTION="Low level support for a standard C++ library"
+HOMEPAGE="https://libcxxabi.llvm.org/"
+SRC_URI="https://releases.llvm.org/${PV/_//}/${MY_P}.tar.xz
+ https://releases.llvm.org/${PV/_//}/${LIBCXX_P}.tar.xz"
+
+LICENSE="|| ( UoI-NCSA MIT )"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="+libunwind +static-libs test elibc_musl"
+
+RDEPEND="
+ libunwind? (
+ || (
+ >=sys-libs/libunwind-1.0.1-r1[static-libs?,${MULTILIB_USEDEP}]
+ >=sys-libs/llvm-libunwind-3.9.0-r1[static-libs?,${MULTILIB_USEDEP}]
+ )
+ )"
+# LLVM 4 required for llvm-config --cmakedir
+DEPEND="${RDEPEND}
+ >=sys-devel/llvm-4
+ test? ( >=sys-devel/clang-3.9.0
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )"
+
+S=${WORKDIR}/${MY_P}
+
+# least intrusive of all
+CMAKE_BUILD_TYPE=RelWithDebInfo
+
+python_check_deps() {
+ has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ llvm_pkg_setup
+ use test && python-any-r1_pkg_setup
+}
+
+src_unpack() {
+ default
+ mv "${LIBCXX_P}" libcxx || die
+}
+
+multilib_src_configure() {
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ -DLIBCXXABI_LIBDIR_SUFFIX=${libdir#lib}
+ -DLIBCXXABI_ENABLE_SHARED=ON
+ -DLIBCXXABI_ENABLE_STATIC=$(usex static-libs)
+ -DLIBCXXABI_USE_LLVM_UNWINDER=$(usex libunwind)
+ -DLIBCXXABI_INCLUDE_TESTS=$(usex test)
+
+ -DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}"/libcxx/include
+ # upstream is omitting standard search path for this
+ # probably because gcc & clang are bundling their own unwind.h
+ -DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
+ )
+ if use test; then
+ if has_version '>=sys-devel/llvm-6'; then
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ )
+ else
+ mycmakeargs+=(
+ -DLIT_COMMAND="${EPREFIX}"/usr/bin/lit
+ )
+ fi
+ fi
+ cmake-utils_src_configure
+}
+
+build_libcxx() {
+ local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/$(get_libdir)"
+ local CMAKE_USE_DIR=${WORKDIR}/libcxx
+ local BUILD_DIR=${BUILD_DIR}/libcxx
+ local mycmakeargs=(
+ -DLIBCXX_LIBDIR_SUFFIX=
+ -DLIBCXX_ENABLE_SHARED=ON
+ -DLIBCXX_ENABLE_STATIC=OFF
+ -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF
+ -DLIBCXX_CXX_ABI=libcxxabi
+ -DLIBCXX_CXX_ABI_INCLUDE_PATHS="${S}"/include
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_HAS_GCC_S_LIB=OFF
+ -DLIBCXX_INCLUDE_TESTS=OFF
+ )
+
+ cmake-utils_src_configure
+ cmake-utils_src_compile
+}
+
+multilib_src_test() {
+ local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
+
+ [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
+ sed -i -e "/cxx_under_test/s^\".*\"^\"${clang_path}\"^" test/lit.site.cfg || die
+
+ # build a local copy of libc++ for testing to avoid circular dep
+ build_libcxx
+ mv "${BUILD_DIR}"/libcxx/lib/libc++* "${BUILD_DIR}/$(get_libdir)/" || die
+
+ cmake-utils_src_make check-libcxxabi
+}
+
+multilib_src_install_all() {
+ insinto /usr/include/libcxxabi
+ doins -r include/.
+}
diff --git a/sys-libs/libomp/Manifest b/sys-libs/libomp/Manifest
index 4e40cf38b15f..1cd7273fd794 100644
--- a/sys-libs/libomp/Manifest
+++ b/sys-libs/libomp/Manifest
@@ -1,9 +1,11 @@
AUX 4.0.1/0001-test-Try-to-link-latomic-to-provide-atomics-when-ava.patch 3456 BLAKE2B f8a1de1e63d80f8617c64a52caaae0730e11ba3559dd0cefcd12105be366c88f68c1076f78d2af0c5962eff30de0e9be8115be2c6fc29e7ed98de5176c82c777 SHA512 677d6d7e316d6df028ebed606cde1a4225ed6e06bacbe81cd527acf57c705858ab5aed2f71946c2404336033bfa985dafee2d56423204a59954a80424ca856e0
DIST openmp-4.0.1.src.tar.xz 2275240 BLAKE2B e63cf670c4cd2678afc4d7b96be85c3d157bf91a69510f980d9a0a07f61b449b22ff28d63753f32e63afedb4a7077c662a633f689a660b5047a83bcf1fb7f009 SHA512 0b737dde832c5907a0cac41fe1d594b61e85dd405eee42b39f09233db62b44543204ccc775e52e2981f9c9f0683b234526e288a3a7a04f712280fb3a575abcaf
DIST openmp-5.0.1.src.tar.xz 2075472 BLAKE2B a4da4726a17dc0fd083e11fe1bebf446978137aa4453000e8fea950021fff091a818246f0817dd60ce67353d3f7d75ab8fec2b9e955389d9c94e195945efda50 SHA512 4493b918fd83ef26e2b3f3429d1b00d722328e4c9697ac7625a390834f6e88ada8e5b02ce0ecb4771129207b1b81a9d171f4599ab9388762a3c6db0afc499ff4
+DIST openmp-5.0.2.src.tar.xz 2081560 BLAKE2B fbe41c6aaf4c8e961253609a598bec531ab4685cd8c307ab2528b9d7553eaa38122ee02a2c4d481454f9233c062b3a24bb174a182702a183907a3d15a10a9655 SHA512 511895ca6049c17de81ad86c39dcb940a7c1a793005e16d33e58d72ad47f62b8cb61003c234a7544a88e79f25d2c86e9df834f90d37ccbd4b47f71c369e90437
DIST openmp-6.0.0.src.tar.xz 2272360 BLAKE2B 2fbbdbbd0262ac3161446a4e7a3079131254f962a5397a94913abff024ba3f66affe419c58fb0f6ab602e338a277ab2befbc4386eaf6d4c11aa4a9713315d562 SHA512 9dfb070a3fae883985e3c8cd357c21a2144b433824139e288d4d3c774dd9cf3f7949978976012b08c644cd4a04be8c65a810c2f33d66eee05d3d980e61413a06
EBUILD libomp-4.0.1.ebuild 2527 BLAKE2B be262aa449e8d3c2392793b8af597c7d9a02e624f0d57ad8b24ef822bd57f6d243200ccee1022c18dcc52fc2d198d6aa2cfe83a1224f614ce0b2305f3f6bff69 SHA512 ca34a666e1aa6e767cd979866bcdcaf55da75dc8faa80d062e718ceda56576c3ebec88972787ae5dc4532bfdeb2d7f34f233b8c4983bfb1bc89bbd443ac54ac7
EBUILD libomp-5.0.1.ebuild 2385 BLAKE2B e887b48183a5e2d8f4f5476579ec88f99d0b709ea4136914978014e51b8d63451d62c5216690b908d7e853141266831a560a1802945d88fe5940d30100b6cbdd SHA512 a36ce91d70d506f9baa07f2aca394325e382b794e0797ecdb308eb98fab38079ec8b5ca10d1c7368ec06275b76c1487f581a4196f0499645edab4b34e974a594
+EBUILD libomp-5.0.2.ebuild 2387 BLAKE2B a739a4974cc3d286322ec1a22d5cfd8410a5f3f4d35aef21101ded1f3f828df07c6952228568997851078fdadbc415fb36f1ddfd85bb0fc0104f0f16963781f2 SHA512 65d47f3965a1457b98e83b074afe4185e949c2e5d9efa5150bbe18970896b9ac31441956f3a082612a2c4e36c8b4589944685e4353cab194f311d47cdf2fc79c
EBUILD libomp-6.0.0.ebuild 3253 BLAKE2B f7af36085e4b0fec9d3efe29fce1f7374b239c8265883488601d227cc1ec120f47a7634f7caad025148755775e41b48af062ad7a45ee693f7bbea4ce65a3ac05 SHA512 b059a151907c2ceef9452446fe9aa18655ba4d160995ea6f867b08c70abaea557096df808cec8a9e0d9ec3be3d3fcbcaea210488b630391b86b75ca8790d36a4
EBUILD libomp-6.0.9999.ebuild 3230 BLAKE2B 41ec1fbba984772804d57665c6a13cfb075045acb8d5d0880d165cfe6dc59a82df8c2ec1e5fe6da02c2ebc861b48b726879bf40e593ea0af046aa281021a7f7a SHA512 71ce8131d2a1108d81282bab1aa08bbe1cc2af4be751110c4e76c65d8eef06befa1070ae3876b48f4285a6c6c2ba8d041dcf9b618987ec6ac21c86353ece92b8
EBUILD libomp-9999.ebuild 3205 BLAKE2B a8bca945602ba1b5045f473a2caed666242ec3ba75440ec6ef98ebdcf1fbf146c775baf142dfc47f676946b90c0a3cea797d7fdade4565d3467ef7b5b5481001 SHA512 4021e79b4057c3a86ce3f330f8532a3cc566ee64c9894c9f3c2bb402bf37431717105a5601b11c7413e71d965657dbdd6be2d215d4bafaba916fb0b371270cac
diff --git a/sys-libs/libomp/libomp-5.0.2.ebuild b/sys-libs/libomp/libomp-5.0.2.ebuild
new file mode 100644
index 000000000000..2a0817f288fd
--- /dev/null
+++ b/sys-libs/libomp/libomp-5.0.2.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
+# (needed due to CMAKE_BUILD_TYPE != Gentoo)
+CMAKE_MIN_VERSION=3.7.0-r1
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-multilib linux-info python-any-r1
+
+DESCRIPTION="OpenMP runtime library for LLVM/clang compiler"
+HOMEPAGE="https://openmp.llvm.org"
+SRC_URI="https://releases.llvm.org/${PV/_//}/openmp-${PV/_/}.src.tar.xz"
+
+# Additional licenses:
+# - MIT-licensed Intel code,
+# - LLVM Software Grant from Intel.
+
+LICENSE="|| ( UoI-NCSA MIT ) MIT LLVM-Grant"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-linux ~x64-macos"
+IUSE="hwloc kernel_linux ompt test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="hwloc? ( sys-apps/hwloc:0=[${MULTILIB_USEDEP}] )"
+# tests:
+# - dev-python/lit provides the test runner
+# - sys-devel/llvm provide test utils (e.g. FileCheck)
+# - sys-devel/clang provides the compiler to run tests
+DEPEND="${RDEPEND}
+ dev-lang/perl
+ test? (
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ sys-devel/llvm
+ >=sys-devel/clang-3.9.0
+ )"
+
+S=${WORKDIR}/openmp-${PV/_/}.src
+
+# least intrusive of all
+CMAKE_BUILD_TYPE=RelWithDebInfo
+
+python_check_deps() {
+ has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+kernel_pds_check() {
+ if use kernel_linux && kernel_is -lt 4 15 && kernel_is -ge 4 13; then
+ local CONFIG_CHECK="~!SCHED_PDS"
+ local ERROR_SCHED_PDS="\
+PDS scheduler versions >= 0.98c < 0.98i (e.g. used in kernels >= 4.13-pf11
+< 4.14-pf9) do not implement sched_yield() call which may result in horrible
+performance problems with libomp. If you are using one of the specified
+kernel versions, you may want to disable the PDS scheduler."
+
+ check_extra_config
+ fi
+}
+
+pkg_pretend() {
+ kernel_pds_check
+}
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+multilib_src_configure() {
+ local libdir="$(get_libdir)"
+ local mycmakeargs=(
+ -DLIBOMP_LIBDIR_SUFFIX="${libdir#lib}"
+ -DLIBOMP_USE_HWLOC=$(usex hwloc)
+ -DLIBOMP_OMPT_SUPPORT=$(usex ompt)
+ # do not install libgomp.so & libiomp5.so aliases
+ -DLIBOMP_INSTALL_ALIASES=OFF
+ # disable unnecessary hack copying stuff back to srcdir
+ -DLIBOMP_COPY_EXPORTS=OFF
+ -DLIBOMP_TEST_COMPILER="$(type -P "${CHOST}-clang")"
+ )
+ cmake-utils_src_configure
+}
+
+multilib_src_test() {
+ # respect TMPDIR!
+ local -x LIT_PRESERVES_TMP=1
+
+ cmake-utils_src_make check-libomp
+}
diff --git a/sys-libs/llvm-libunwind/Manifest b/sys-libs/llvm-libunwind/Manifest
index 6691ebdc8d1b..e82f5f2b86b1 100644
--- a/sys-libs/llvm-libunwind/Manifest
+++ b/sys-libs/llvm-libunwind/Manifest
@@ -2,9 +2,11 @@ DIST libcxx-6.0.0.src.tar.xz 1549328 BLAKE2B 93adb339b0e849fca1850d379c8e74b407b
DIST libcxxabi-6.0.0.src.tar.xz 529212 BLAKE2B ae020e8831a6ae71d59d71e294bbb0aa6dbedf1b3036b2536d9456db8c51f21e57d082c5abf5e00921a14876328bdfafab3c04b4d761cb76d52e35ff97107510 SHA512 c5e4cc05105770b42b20595fdbda5e1483be4582bc94335da1a15531ba43a0ecf30e1e0a252f62d4d0e6c79cda9d44ff5fdbe69a0a295b2431fd6de158410e2e
DIST libunwind-4.0.1.src.tar.xz 63388 BLAKE2B f49772beabaa8519a5f8dbbaef9c2d6554468a66b89a5f012946d59f772fe864809a5c95b726bcb4c059ca551a4eb023a88f4fa618756b34fef2058e272467e6 SHA512 8a0552a8ab830010d81420f4b778a3b831bff85b19bcce972958fc30e1ba5a2fa26a3deba499985a43dd7a103690775f6a20e7b3edda55f4eaff3541002d6b59
DIST libunwind-5.0.1.src.tar.xz 72180 BLAKE2B da1fbb92e9953d018a3c30290ceda9a2a18c21b5c908d9ff65979158bd06b8866eb74f078d12832e2aed7d0332c996262e3b2a1341844eb933ba3de5fb41ff98 SHA512 6c0f7a286c1ffa46769685ee36604cd90ed40470e1c3d3ef03c46bcc9e5f9e36e68a0a1f67b9b300823170b48c9b8d2db4625afd885f1d024905db1dffd9fc49
+DIST libunwind-5.0.2.src.tar.xz 72340 BLAKE2B 8a62bd91f6decae1a9a51df19f708fcdf72a6fe6e57a5848c5dd0d36ff2dc64db8a0b3af469cdd5e787b9301f2718df0981f91857ecbc7a5f5d95a1a053652bc SHA512 137c4b269bff053d532a373e9f696ca68ad0bbf606a18dc98597e00fcfc6ce21d74bc2a0c03b96444654d688fa97d544c6f6b70822fcf7e190ed96f193ddc6ba
DIST libunwind-6.0.0.src.tar.xz 76600 BLAKE2B 7767f3564ef72b6049c5247881e09e6c56ccd24acc1b7a1742476c4d01b2be792afdc73c8138ca5b1549be9b83267e6a7860aa085514d86eac90545219dae835 SHA512 a35e992223f094bdac5f1565806fe485a878f9baf4502e7f3777276f5c11aeff4beee155512b1c687f4471f34acbd50c834e98120093cf2582007422cec7fb2e
EBUILD llvm-libunwind-4.0.1.ebuild 1094 BLAKE2B dec5d0847983833e461635ac5711b5d253963650aed87678277bec86d1334ae9348d26605e20acf2a8d2405e891dd10c9303abf7d243ed86e36c8f3e3f12b83b SHA512 3fb7283eea0b4282c549d7cf2cee1aea0f9d28b7689f5b83a32893c32ebfabc703eb0328593109db96a86351b639bc3e60572c7de93fbed18dd359a14b352386
EBUILD llvm-libunwind-5.0.1.ebuild 1094 BLAKE2B 3378498096da36b9cbd6e70c9f2646cf6215f6d964e0a991e389c33af1a1614bc0c0dd404b58141d64513a22709e1755c79f4466b3cf7b43515f623927f766f0 SHA512 cd9740fad0a59488d543fa2af2a2908457180840999d463071bb557d45214e0cf04069f922e90e0a3b3f8144b8966d2f3564c098561a2ae0511264d1eb2b104a
+EBUILD llvm-libunwind-5.0.2.ebuild 1096 BLAKE2B ca9e96b99ba9c89ba4670226cd1c2875551b9fc75dd912eff73104868ff09f7a0a30d74de2fb2eb03a7ec595d475c6140ea3bbbadfc6151b967ff061c82985d4 SHA512 c9973f9e6a5ec1ff94aed642d6bb8faa977e04e9c1adfd4cc94003dd10bccdef1c6dc364fabdcc2f7b338def620a3e8598b8f125330b6d9129ce32061570f01f
EBUILD llvm-libunwind-6.0.0.ebuild 3744 BLAKE2B bd6b480a65c15c7d38043a4267bf1e02435a403a87b3280716e2de1e5dcf3bde6318bf7e361e309c3382b47a690b2a6fc42fd73c5c428ab0c70bbed62ad46ac6 SHA512 3095db45a2689d0a9fa6cc5550f5a897d2de00e3cbd07417e71e52dec301850d90a8e1f9dfd202c9f6485a9941d194704cf69825ff3e6252ebd73d32635c9a17
EBUILD llvm-libunwind-6.0.9999.ebuild 3885 BLAKE2B 0a6078aeaf1af824ec3924fe5935f3710db2cc3d17bc338feb7c66ad7f478ffa9939e3c2e7c4095bb81923d6253c4806eb886f2309967e0c9f768a4777f87c37 SHA512 9424218fb904b44e796780db42471a52d3f2de7e08077054d5d8d6075ea041bf906a0ac6bc8fc0b6fffb0fcf6de3a543fb3567f4ef33f69f3b77e24ec4991004
EBUILD llvm-libunwind-9999.ebuild 3860 BLAKE2B 177f9e223b61e3bd3a6fec78ff0b3d2efa1220228d55f78eb41a200518441d8b617998f13642338e91ff3f56dd224c1e1382df5031060c1783440ad20223d069 SHA512 b0cdcbe531188ffa9f7e294136a9238a79441b0768144116784fbf3e647b3fef11eb6a4e5569f08e7e7092d4aec46843c15a1c2b3b96ec63ee64028a0fb29c83
diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-5.0.2.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-5.0.2.ebuild
new file mode 100644
index 000000000000..ddf5037d45b5
--- /dev/null
+++ b/sys-libs/llvm-libunwind/llvm-libunwind-5.0.2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
+# (needed due to CMAKE_BUILD_TYPE != Gentoo)
+CMAKE_MIN_VERSION=3.7.0-r1
+inherit cmake-multilib llvm
+
+DESCRIPTION="C++ runtime stack unwinder from LLVM"
+HOMEPAGE="https://github.com/llvm-mirror/libunwind"
+SRC_URI="https://releases.llvm.org/${PV/_//}/libunwind-${PV/_/}.src.tar.xz"
+
+LICENSE="|| ( UoI-NCSA MIT )"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="debug +static-libs"
+
+RDEPEND="!sys-libs/libunwind"
+# LLVM 4 required for llvm-config --cmakedir
+DEPEND=">=sys-devel/llvm-4"
+
+S=${WORKDIR}/libunwind-${PV/_/}.src
+
+# least intrusive of all
+CMAKE_BUILD_TYPE=RelWithDebInfo
+
+multilib_src_configure() {
+ local libdir=$(get_libdir)
+
+ local mycmakeargs=(
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+ -DLIBUNWIND_ENABLE_ASSERTIONS=$(usex debug)
+ -DLIBUNWIND_ENABLE_STATIC=$(usex static-libs)
+ )
+
+ cmake-utils_src_configure
+}
+
+multilib_src_install() {
+ cmake-utils_src_install
+
+ # install headers like sys-libs/libunwind
+ doheader "${S}"/include/*.h
+}