From 00ee3e15c6846e81651ce7b25db4ae0f692d02ce Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 19 Aug 2024 07:17:02 +0000 Subject: [PATCH] eclass/go-env: Sync with Gentoo It's from Gentoo commit 1f754863ff91dc4dca11e6a5217ffd449f39c74c. --- .../third_party/portage-stable/eclass/go-env.eclass | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sdk_container/src/third_party/portage-stable/eclass/go-env.eclass b/sdk_container/src/third_party/portage-stable/eclass/go-env.eclass index be13113311..11fdf943e7 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/go-env.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/go-env.eclass @@ -46,6 +46,16 @@ go-env_set_compile_environment() { 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