If the check on line 1260 of bootstrap-prefix.sh triggers: "[[ $(gcc -print-prog-name=as),$(gcc -print-prog-name=ld) != /*,/* ]]" Then $EPREFIX/tmp/usr/bin/gcc is created, which causes the check on line 2435 "-x ${EPREFIX}/tmp/usr/bin/gcc" to succeed, and stage2 to not be built, causing a compile error with stage3 gmp. chmod 755 "${ROOT}"/tmp/usr/bin/g{cc,++}
Fixed in https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=ec639d38c508fdcc1536f358ecb63b65c7c0a510 Thanks a lot for the analysis!