From: Michał Górny Date: Mon, 19 Feb 2018 17:54:02 +0000 (+0100) Subject: sys-libs/compiler-rt-sanitizers: Stop using unsandbox in 6.0+ X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=a696cac905cc854b61b5c91515c48f7e1b476ed9;p=gentoo.git 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! --- 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 19492d445c29..8a7c7cce6834 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 + ! "${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 b3850e773bed..b263b10f2f76 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 + ! "${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 2b85804e799d..f83cb210e4e7 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 + ! "${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 }