Signed-off-by: David Seifert <s...@gentoo.org> --- eclass/toolchain.eclass | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 741b6dfbbcc..495a305ed83 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -7,6 +7,15 @@ # @SUPPORTED_EAPIS: 7 8 # @BLURB: Common code for sys-devel/gcc ebuilds +case ${EAPI} in + 7) inherit eutils ;; + 8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; +esac + +if [[ ! ${_TOOLCHAIN_ECLASS} ]]; then +_TOOLCHAIN_ECLASS=1 + DESCRIPTION="The GNU Compiler Collection" HOMEPAGE="https://gcc.gnu.org/" @@ -30,15 +39,6 @@ fi FEATURES=${FEATURES/multilib-strict/} -case ${EAPI} in - 7) inherit eutils ;; - 8) ;; - *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; -esac - -EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure \ - src_compile src_test src_install pkg_postinst pkg_postrm - #---->> globals <<---- export CTARGET=${CTARGET:-${CHOST}} @@ -2322,6 +2322,11 @@ toolchain_death_notice() { fi } +fi + +EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure \ + src_compile src_test src_install pkg_postinst pkg_postrm + # Note [implicitly enabled flags] # ------------------------------- # Usually configure-based packages handle explicit feature requests -- 2.35.0