From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AEC60138359 for ; Mon, 6 Jul 2020 16:39:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B42CBE0921; Mon, 6 Jul 2020 16:39:26 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 98BE2E0921 for ; Mon, 6 Jul 2020 16:39:26 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1705134EF3B for ; Mon, 6 Jul 2020 16:39:25 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4E5EF9C for ; Mon, 6 Jul 2020 16:39:19 +0000 (UTC) From: "Sergei Trofimovich" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sergei Trofimovich" Message-ID: <1594053547.96d5303a2e1daee48a79e8cbb5a24be652535b95.slyfox@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/gcc/, eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/toolchain.eclass sys-devel/gcc/metadata.xml X-VCS-Directories: eclass/ sys-devel/gcc/ X-VCS-Committer: slyfox X-VCS-Committer-Name: Sergei Trofimovich X-VCS-Revision: 96d5303a2e1daee48a79e8cbb5a24be652535b95 X-VCS-Branch: master Date: Mon, 6 Jul 2020 16:39:19 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 23f53c18-3a9c-4624-904b-4a6559b4e091 X-Archives-Hash: d1a0c4114d36df5fade27c7a55282123 commit: 96d5303a2e1daee48a79e8cbb5a24be652535b95 Author: Sergei Trofimovich gentoo org> AuthorDate: Mon Jul 6 16:35:52 2020 +0000 Commit: Sergei Trofimovich gentoo org> CommitDate: Mon Jul 6 16:39:07 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=96d5303a toolchain.eclass: add USE=valgrind for annotations for valgrind This adds annotation hints to memory handling code into gcc to ease debugging it under valgrind. Signed-off-by: Sergei Trofimovich gentoo.org> eclass/toolchain.eclass | 9 +++++++++ sys-devel/gcc/metadata.xml | 1 + 2 files changed, 10 insertions(+) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 8384e565d86..5bd4e18eb0d 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -200,6 +200,7 @@ if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then tc_version_is_at_least 9.0 && IUSE+=" d" tc_version_is_at_least 9.1 && IUSE+=" lto" tc_version_is_at_least 10 && IUSE+=" zstd" TC_FEATURES+=(zstd) + tc_version_is_at_least 11 && IUSE+=" valgrind" TC_FEATURES+=(valgrind) fi if tc_version_is_at_least 10; then @@ -272,6 +273,10 @@ if tc_has_feature zstd ; then DEPEND+=" zstd? ( app-arch/zstd )" fi +if tc_has_feature valgrind; then + BDEPEND+=" valgrind? ( dev-util/valgrind )" +fi + case ${EAPI:-0} in 5*|6) DEPEND+=" ${BDEPEND}" ;; esac @@ -1278,6 +1283,10 @@ toolchain_src_configure() { confgcc+=( $(use_enable systemtap) ) fi + if in_iuse valgrind ; then + confgcc+=( $(use_enable valgrind valgrind-annotations) ) + fi + if in_iuse vtv ; then confgcc+=( $(use_enable vtv vtable-verify) diff --git a/sys-devel/gcc/metadata.xml b/sys-devel/gcc/metadata.xml index a6c76c3bd10..feeacd30317 100644 --- a/sys-devel/gcc/metadata.xml +++ b/sys-devel/gcc/metadata.xml @@ -34,6 +34,7 @@ Build support for various sanitizer functions (ASAN/TSAN/etc...) Build packages with stack smashing protector on by default enable systemtap static probe points + Enable valgrind annotations for gcc internals (useful for gcc debugging). Build support for virtual table verification (a C++ hardening feature)