summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-03-16 04:43:53 +0000
committerSam James <sam@gentoo.org>2024-03-16 04:43:53 +0000
commit486f9fc090b28ad5cc09b39c734ebbfadb81be08 (patch)
tree94a3ef3079e55a69e20820fa18374201e505ed87 /eclass
parentgo-env.eclass: Export PKG_CONFIG (diff)
downloadgentoo-486f9fc090b28ad5cc09b39c734ebbfadb81be08.tar.gz
gentoo-486f9fc090b28ad5cc09b39c734ebbfadb81be08.tar.bz2
gentoo-486f9fc090b28ad5cc09b39c734ebbfadb81be08.zip
go-env.eclass: filter LTO temporarily for gcc 14.0.1
14.0.1 won't ever be a released version, just do this as a hack because gcc has a checking ICE w/ go LTO atm and this prohibits more testing. Bug: https://bugs.gentoo.org/912152 Bug: https://gcc.gnu.org/PR113204 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/go-env.eclass7
1 files changed, 5 insertions, 2 deletions
diff --git a/eclass/go-env.eclass b/eclass/go-env.eclass
index 08cb6380e48a..baba0d3ee8b3 100644
--- a/eclass/go-env.eclass
+++ b/eclass/go-env.eclass
@@ -1,4 +1,4 @@
-# Copyright 2023 Gentoo Authors
+# Copyright 2023-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: go-env.eclass
@@ -14,7 +14,7 @@
if [[ -z ${_GO_ENV_ECLASS} ]]; then
_GO_ENV_ECLASS=1
-inherit toolchain-funcs
+inherit flag-o-matic toolchain-funcs
# @FUNCTION: go-env_set_compile_environment
# @DESCRIPTION:
@@ -33,6 +33,9 @@ go-env_set_compile_environment() {
use arm && export GOARM=$(go-env_goarm)
use x86 && export GO386=$(go-env_go386)
+ # XXX: Hack for checking ICE (bug #912152, gcc PR113204)
+ [[ $(gcc-fullversion) == 14.0.1 ]] && filter-lto
+
export CGO_CFLAGS="${CGO_CFLAGS:-$CFLAGS}"
export CGO_CPPFLAGS="${CGO_CPPFLAGS:-$CPPFLAGS}"
export CGO_CXXFLAGS="${CGO_CXXFLAGS:-$CXXFLAGS}"