commit: 41d623234817c221bacab5dff211a696d202af8f Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Sun Mar 1 17:30:07 2026 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun Mar 1 17:30:31 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41d62323
toolchain.eclass: add a proxy check for stage1 for accel build Bug: https://bugs.gentoo.org/970714 Fixes: 977b73a1cb736846add244dbd55726ebec0f50f6 Signed-off-by: Sam James <sam <AT> gentoo.org> eclass/toolchain.eclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 2dd2ed59b22d..d051ef4dc2ec 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -2846,7 +2846,10 @@ gcc_movelibs() { # Without this, we end up either unable to find the libgomp spec/archive, or # we underlink and can't find gomp_nvptx_main (presumably because we can't find the plugin) # https://src.fedoraproject.org/rpms/gcc/blob/02c34dfa3627ef05d676d30e152a66e77b58529b/f/gcc.spec#_1445 - if [[ ${CATEGORY} == cross-accel-nvptx* ]] ; then + # + # openmp/fortran check is needed here to know if we're in the stage1 + # build or not. + if [[ ${CATEGORY} == cross-accel-nvptx* ]] && { _tc_use_if_iuse openmp || is_fortran ; } ; then rm -rf "${ED}"/usr/libexec/gcc/nvptx-none/${GCCMAJOR}/install-tools rm -rf "${ED}"/usr/libexec/gcc/${CHOST}/${GCCMAJOR}/accel/nvptx-none/{install-tools,plugin,cc1,cc1plus} is_fortran && rm -rf "${ED}"/usr/libexec/gcc/${CHOST}/${GCCMAJOR}/accel/nvptx-none/f951
