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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B85E815852A for ; Thu, 15 Aug 2024 21:24:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 096012BC01F; Thu, 15 Aug 2024 21:24:24 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DD4E02BC01F for ; Thu, 15 Aug 2024 21:24:23 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2876B34300D for ; Thu, 15 Aug 2024 21:24:23 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B635F1EBA for ; Thu, 15 Aug 2024 21:24:21 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1723757045.1f754863ff91dc4dca11e6a5217ffd449f39c74c.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/go-env.eclass X-VCS-Directories: eclass/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 1f754863ff91dc4dca11e6a5217ffd449f39c74c X-VCS-Branch: master Date: Thu, 15 Aug 2024 21:24:21 +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: 916c5ecc-cc39-4b08-8f91-238fa965be42 X-Archives-Hash: f9a913b6d330628939c1499a9f524a54 commit: 1f754863ff91dc4dca11e6a5217ffd449f39c74c Author: Sam James gentoo org> AuthorDate: Thu Aug 15 21:23:22 2024 +0000 Commit: Sam James gentoo org> CommitDate: Thu Aug 15 21:24:05 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f754863 go-env.eclass: improve debug workaround Use what Ionen did in x11-terms/kitty to avoid touching flags for non-Go parts of the build. Bug: https://bugs.gentoo.org/847991 Bug: https://bugs.gentoo.org/924436 Bug: https://bugs.gentoo.org/924496 Bug: https://bugs.gentoo.org/929219 Signed-off-by: Sam James gentoo.org> eclass/go-env.eclass | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/eclass/go-env.eclass b/eclass/go-env.eclass index a4394161cb0b..11fdf943e774 100644 --- a/eclass/go-env.eclass +++ b/eclass/go-env.eclass @@ -42,16 +42,20 @@ go-env_set_compile_environment() { # XXX: Hack for checking ICE (bug #912152, gcc PR113204) has_version -b "sys-devel/gcc[debug]" && filter-lto - # bug #929219 - if tc-is-gcc ; then - replace-flags -g3 -g - replace-flags -ggdb3 -ggdb - fi - export CGO_CFLAGS="${CGO_CFLAGS:-$CFLAGS}" export CGO_CPPFLAGS="${CGO_CPPFLAGS:-$CPPFLAGS}" export CGO_CXXFLAGS="${CGO_CXXFLAGS:-$CXXFLAGS}" export CGO_LDFLAGS="${CGO_LDFLAGS:-$LDFLAGS}" + + # bug #929219 + if tc-is-gcc ; then + CGO_CFLAGS=$( + CFLAGS=${CGO_CFLAGS} + replace-flags -g3 -g + replace-flags -ggdb3 -ggdb + printf %s "${CFLAGS}" + ) + fi } # @FUNCTION: go-env_goos