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 AA83D15852A for ; Thu, 15 Aug 2024 21:19:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 692AEE2A24; Thu, 15 Aug 2024 21:19:40 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 EFCBAE29F0 for ; Thu, 15 Aug 2024 21:19:39 +0000 (UTC) From: Sam James To: gentoo-dev@lists.gentoo.org Cc: Flatcar Linux Maintainers , Sam James Subject: [gentoo-dev] [COMMITTED PATCH] go-env.eclass: workaround debug info issues Date: Thu, 15 Aug 2024 22:19:28 +0100 Message-ID: <116f54058abd4fa4a5b3c16ee49a99df11883a45.1723756768.git.sam@gentoo.org> X-Mailer: git-send-email 2.46.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: d446c2c2-515a-4edf-ba99-5c587bddfaeb X-Archives-Hash: 4a527d79e2237f9fb536aaacb5f81a52 Go can't handle some DWARF produced by GCC but nobody's been able to produce a simple testcase for it, so add a workaround where we replace -g3 with -g and -ggdb3 with -ggdb for GCC, like Ionen did in Kitty. Bug: https://bugs.gentoo.org/847991 Bug: https://bugs.gentoo.org/924436 Bug: https://bugs.gentoo.org/924496 Closes: https://bugs.gentoo.org/929219 Signed-off-by: Sam James --- eclass/go-env.eclass | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eclass/go-env.eclass b/eclass/go-env.eclass index be131133113be..a4394161cb0bc 100644 --- a/eclass/go-env.eclass +++ b/eclass/go-env.eclass @@ -42,6 +42,12 @@ 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}" -- 2.46.0