commit: a696cac905cc854b61b5c91515c48f7e1b476ed9
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 19 17:54:02 2018 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Feb 19 17:55:24 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a696cac9
sys-libs/compiler-rt-sanitizers: Stop using unsandbox in 6.0+
Stop relying on app-portage/unsandbox in the live ebuilds. Instead,
rely on sys-apps/sandbox-2.13 that supports stopping to clobber
LD_PRELOAD on its own!
.../compiler-rt-sanitizers-6.0.0_rc2.ebuild | 13 ++++++-------
.../compiler-rt-sanitizers-6.0.9999.ebuild | 13 ++++++-------
.../compiler-rt-sanitizers-9999.ebuild | 13 ++++++-------
3 files changed, 18 insertions(+), 21 deletions(-)
diff --git
a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-6.0.0_rc2.ebuild
b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-6.0.0_rc2.ebuild
index 19492d445c2..8a7c7cce683 100644
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-6.0.0_rc2.ebuild
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-6.0.0_rc2.ebuild
@@ -30,7 +30,7 @@ DEPEND="
>=sys-devel/llvm-6
clang? ( sys-devel/clang )
test? (
- app-portage/unsandbox
+ !<sys-apps/sandbox-2.13
$(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
=sys-devel/clang-${PV%_*}*:${LLVM_SLOT}
sys-libs/compiler-rt:${SLOT} )
@@ -95,14 +95,9 @@ src_configure() {
-DCOMPILER_RT_BUILD_XRAY=ON
)
if use test; then
- cat > "${T}"/unsandbox-lit.py <<-EOF || die
- import os, sys
- os.execlp("unsandbox", sys.argv[0], "lit",
*sys.argv[1:])
- EOF
-
mycmakeargs+=(
-DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
- -DLLVM_EXTERNAL_LIT="${T}/unsandbox-lit.py"
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-DLLVM_LIT_ARGS="-vv"
# they are created during src_test()
@@ -151,6 +146,10 @@ src_configure() {
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-sanitizers/compiler-rt-sanitizers-6.0.9999.ebuild
b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-6.0.9999.ebuild
index b3850e773be..b263b10f2f7 100644
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-6.0.9999.ebuild
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-6.0.9999.ebuild
@@ -30,7 +30,7 @@ DEPEND="
>=sys-devel/llvm-6
clang? ( sys-devel/clang )
test? (
- app-portage/unsandbox
+ !<sys-apps/sandbox-2.13
$(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
=sys-devel/clang-${PV%_*}*:${LLVM_SLOT}
sys-libs/compiler-rt:${SLOT} )
@@ -96,14 +96,9 @@ src_configure() {
-DCOMPILER_RT_BUILD_XRAY=ON
)
if use test; then
- cat > "${T}"/unsandbox-lit.py <<-EOF || die
- import os, sys
- os.execlp("unsandbox", sys.argv[0], "lit",
*sys.argv[1:])
- EOF
-
mycmakeargs+=(
-DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
- -DLLVM_EXTERNAL_LIT="${T}/unsandbox-lit.py"
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-DLLVM_LIT_ARGS="-vv"
# they are created during src_test()
@@ -152,6 +147,10 @@ src_configure() {
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-sanitizers/compiler-rt-sanitizers-9999.ebuild
b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild
index 2b85804e799..f83cb210e4e 100644
--- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild
+++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild
@@ -29,7 +29,7 @@ DEPEND="
>=sys-devel/llvm-6
clang? ( sys-devel/clang )
test? (
- app-portage/unsandbox
+ !<sys-apps/sandbox-2.13
$(python_gen_any_dep "~dev-python/lit-${PV}[\${PYTHON_USEDEP}]")
=sys-devel/clang-${PV%_*}*:${LLVM_SLOT}
sys-libs/compiler-rt:${SLOT} )
@@ -95,14 +95,9 @@ src_configure() {
-DCOMPILER_RT_BUILD_XRAY=ON
)
if use test; then
- cat > "${T}"/unsandbox-lit.py <<-EOF || die
- import os, sys
- os.execlp("unsandbox", sys.argv[0], "lit",
*sys.argv[1:])
- EOF
-
mycmakeargs+=(
-DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
- -DLLVM_EXTERNAL_LIT="${T}/unsandbox-lit.py"
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-DLLVM_LIT_ARGS="-vv"
# they are created during src_test()
@@ -151,6 +146,10 @@ src_configure() {
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
}