toolchain.eclass: add IUSE=systemtap to gcc-8
authorSergei Trofimovich <slyfox@gentoo.org>
Wed, 16 May 2018 21:54:38 +0000 (22:54 +0100)
committerSergei Trofimovich <slyfox@gentoo.org>
Wed, 16 May 2018 22:01:18 +0000 (23:01 +0100)
Avoid automagic dependency on systemtap installed.

Reported-by: lekto@o2.pl
Bug: https://bugs.gentoo.org/654748
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
eclass/toolchain.eclass
sys-devel/gcc/metadata.xml

index 47ee5495739cde91242208aa0e3dc9ea8259c8ab..68e4ce15b377fbc4df0659f1df94fc96a67c3101 100644 (file)
@@ -154,6 +154,8 @@ if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then
        tc_version_is_at_least 4.9 && IUSE+=" +vtv"
        tc_version_is_at_least 5.0 && IUSE+=" jit mpx"
        tc_version_is_at_least 6.0 && IUSE+=" +pie +ssp +pch"
+       # systemtap is a gentoo-specific switch: bug #654748
+       tc_version_is_at_least 8.0 && IUSE+=" systemtap"
 fi
 
 IUSE+=" ${IUSE_DEF[*]/#/+}"
@@ -220,6 +222,11 @@ if in_iuse gcj ; then
        DEPEND+=" gcj? ( awt? ( ${GCJ_GTK_DEPS} ) ${GCJ_DEPS} )"
 fi
 
+if in_iuse systemtap ; then
+       # gcc needs sys/sdt.h headers on target
+       DEPEND+=" systemtap? ( dev-util/systemtap )"
+fi
+
 PDEPEND=">=sys-devel/gcc-config-1.7"
 
 #---->> S + SRC_URI essentials <<----
@@ -1229,6 +1236,10 @@ toolchain_src_configure() {
                confgcc+=( $(use_enable mpx libmpx) )
        fi
 
+       if in_iuse systemtap ; then
+               confgcc+=( $(use_enable systemtap) )
+       fi
+
        if in_iuse vtv ; then
                confgcc+=(
                        $(use_enable vtv vtable-verify)
index 52748bc1ff6818979b27443b11242540b1116eda..51f143604eba13059a740f46094e023ba2b494fe 100644 (file)
@@ -31,6 +31,7 @@
     <flag name="regression-test">Run the testsuite and install the results (requires FEATURES=test)</flag>
     <flag name="sanitize">Build support for various sanitizer functions (ASAN/TSAN/etc...)</flag>
     <flag name="ssp">Build packages with stack smashing protector on by default</flag>
+    <flag name="systemtap">enable systemtap static probe points</flag>
     <flag name="vtv">Build support for virtual table verification (a C++ hardening feature)</flag>
   </use>
   <upstream>