sys-libs/compiler-rt-sanitizers: Backport sandbox-2.13 use to 4/5
authorMichał Górny <mgorny@gentoo.org>
Tue, 3 Apr 2018 19:08:43 +0000 (21:08 +0200)
committerMichał Górny <mgorny@gentoo.org>
Tue, 3 Apr 2018 19:39:17 +0000 (21:39 +0200)
Update the 4.0.1 and 5.0.1 versions to rely on sandbox-2.13 unloading
support instead of using unsandbox.

sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-4.0.1.ebuild
sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-5.0.1.ebuild

index 2dc0d7cb40bd335c292d114808d58376041cb795..78b0975433f4a9559c1344dc8d19ba40f62f170d 100644 (file)
@@ -28,7 +28,7 @@ DEPEND="
        >=sys-devel/llvm-4
        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%_*}*:${CLANG_SLOT}
                sys-libs/compiler-rt:${SLOT} )
@@ -108,7 +108,7 @@ src_configure() {
        if use test; then
                mycmakeargs+=(
                        -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
-                       -DLIT_COMMAND="${EPREFIX}/usr/bin/unsandbox;${EPREFIX}/usr/bin/lit"
+                       -DLIT_COMMAND="${EPREFIX}/usr/bin/lit"
 
                        # they are created during src_test()
                        -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang"
@@ -149,6 +149,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
 }
index b09a0573d92a225f90874e87495f1f0774c58afa..ccfea7940925152d13a98911fb7e8cf3eff01f3b 100644 (file)
@@ -29,7 +29,7 @@ DEPEND="
        >=sys-devel/llvm-4
        clang? ( sys-devel/clang )
        test? (
-               app-portage/unsandbox
+               !<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} )
@@ -112,7 +112,7 @@ src_configure() {
        if use test; then
                mycmakeargs+=(
                        -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
-                       -DLIT_COMMAND="${EPREFIX}/usr/bin/unsandbox;${EPREFIX}/usr/bin/lit"
+                       -DLIT_COMMAND="${EPREFIX}/usr/bin/lit"
 
                        # they are created during src_test()
                        -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${CLANG_SLOT}/bin/clang"
@@ -160,6 +160,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
 }