summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2024-07-09 21:26:03 +0100
committerJames Le Cuirot <chewi@gentoo.org>2024-07-16 10:13:37 +0100
commitcc012d4940f97e9262753e8f041c2cf8012a272d (patch)
tree5affe60aef2f9ea8ed0233b67b0e08d772837cb7 /eclass
parentgolang-base.eclass: Drop support for EAPI 5 and 6 (diff)
downloadgentoo-cc012d4940f97e9262753e8f041c2cf8012a272d.tar.gz
gentoo-cc012d4940f97e9262753e8f041c2cf8012a272d.tar.bz2
gentoo-cc012d4940f97e9262753e8f041c2cf8012a272d.zip
go-env.eclass: Establish EAPI 7 and 8 as supported
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/go-env.eclass15
1 files changed, 7 insertions, 8 deletions
diff --git a/eclass/go-env.eclass b/eclass/go-env.eclass
index 1a2c9787a146..c34c634bb600 100644
--- a/eclass/go-env.eclass
+++ b/eclass/go-env.eclass
@@ -6,11 +6,17 @@
# Flatcar Linux Maintainers <infra@flatcar-linux.org>
# @AUTHOR:
# Flatcar Linux Maintainers <infra@flatcar-linux.org>
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: Helper eclass for setting the Go compile environment. Required for cross-compiling.
# @DESCRIPTION:
# This eclass includes helper functions for setting the compile environment for Go ebuilds.
# Intended to be called by other Go eclasses in an early build stage, e.g. src_unpack.
+case ${EAPI} in
+ 7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
if [[ -z ${_GO_ENV_ECLASS} ]]; then
_GO_ENV_ECLASS=1
@@ -34,14 +40,7 @@ go-env_set_compile_environment() {
use x86 && export GO386=$(go-env_go386)
# XXX: Hack for checking ICE (bug #912152, gcc PR113204)
- case ${EAPI} in
- 6)
- has_version "sys-devel/gcc[debug]" && filter-lto
- ;;
- *)
- has_version -b "sys-devel/gcc[debug]" && filter-lto
- ;;
- esac
+ has_version -b "sys-devel/gcc[debug]" && filter-lto
export CGO_CFLAGS="${CGO_CFLAGS:-$CFLAGS}"
export CGO_CPPFLAGS="${CGO_CPPFLAGS:-$CPPFLAGS}"