public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Sam James <sam@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: Flatcar Linux Maintainers <infra@flatcar-linux.org>,
	Sam James <sam@gentoo.org>
Subject: [gentoo-dev] [COMMITTED PATCH] go-env.eclass: workaround debug info issues
Date: Thu, 15 Aug 2024 22:19:28 +0100	[thread overview]
Message-ID: <116f54058abd4fa4a5b3c16ee49a99df11883a45.1723756768.git.sam@gentoo.org> (raw)

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 <sam@gentoo.org>
---
 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



                 reply	other threads:[~2024-08-15 21:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=116f54058abd4fa4a5b3c16ee49a99df11883a45.1723756768.git.sam@gentoo.org \
    --to=sam@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=infra@flatcar-linux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox