Created attachment 838585 [details] gcc build log, emerge info I'm following this guide: /wiki/Cross_build_environment and the build fails with the default make.conf which contains ~{ARCH} in the ACCEPT_KEYWORDS field. Additionally, the following use change was needed to build @system: sys-apps/util-linux -su. The attached emerge info was from after I made the changes, so it may not be totally relevant, but the build log is from the failed build.
/usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/gcc-12-20221008/libgcc/libgcc2.c: In function '__divsc3': /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/gcc-12-20221008/libgcc/libgcc2.c:1874:18: error: '__LIBGCC_SF_MAX__' undeclared (first use in this function) 1874 | # define RBIG (__LIBGCC_SF_MAX__ / 2) | ^~~~~~~~~~~~~~~~~ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/gcc-12-20221008/libgcc/libgcc2.c:2063:23: note: in expansion of macro 'RBIG' 2063 | if (FABS (d) >= RBIG) | ^~~~ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/gcc-12-20221008/libgcc/libgcc2.c:1874:18: note: each undeclared identifier is reported only once for each function it appears in 1874 | # define RBIG (__LIBGCC_SF_MAX__ / 2) | ^~~~~~~~~~~~~~~~~ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/gcc-12-20221008/libgcc/libgcc2.c:2063:23: note: in expansion of macro 'RBIG' 2063 | if (FABS (d) >= RBIG) | ^~~~ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/gcc-12-20221008/libgcc/libgcc2.c:1876:18: error: '__LIBGCC_SF_EPSILON__' undeclared (first use in this function) 1876 | # define RMIN2 (__LIBGCC_SF_EPSILON__) | ^~~~~~~~~~~~~~~~~~~~~ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/gcc-12-20221008/libgcc/libgcc2.c:2073:22: note: in expansion of macro 'RMIN2' 2073 | if (FABS (d) < RMIN2) | ^~~~~ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/gcc-12-20221008/libgcc/libgcc2.c:1875:18: error: '__LIBGCC_SF_MIN__' undeclared (first use in this function) 1875 | # define RMIN (__LIBGCC_SF_MIN__) | ^~~~~~~~~~~~~~~~~ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-12.2.1_p20221008/work/gcc-12-20221008/libgcc/libgcc2.c:2082:28: note: in expansion of macro 'RMIN' 2082 | if (((FABS (a) < RMIN) && (FABS (b) < RMAX2) && (FABS (d) < RMAX2)) | ^~~~ make[2]: *** [Makefile:501: _divsc3.o] Error 1