My host is host is ~amd64 with glibc, crossdev is latest snapshot (20210718). how to reproduce: crossdev -t aarch64-unknown-linux-glibc or crossdev -t riscv64-unknown-linux-glibc error: /bin/bash: line 2: 31988 Segmentation fault (core dumped) build/genmatch --gimple /tmp/portage/cross-aarch64-unknown-linux-gnu/gcc-11.2.0/work/gcc-11.2.0/gcc/match.pd > tmp-gimple-match.c The stable version does not have this problem: crossdev -S -t aarch64-unknown-linux-glibc crossdev -S -t riscv64-unknown-linux-glibc My gcc/binutils/glibc version : emerge -avp sys-devel/gcc sys-devel/binutils sys-libs/glibc [ebuild R ] sys-devel/binutils-2.37_p1:2.37::gentoo USE="doc gold nls plugins (-cet) -default-gold -multitarget -static-libs -test -vanilla" 0 KiB [ebuild R ] sys-devel/gcc-11.2.0:11::gentoo USE="(cxx) doc fortran lto (multilib) nls nptl openmp pch (pie) sanitize ssp (-ada) -custom-cflags -d -debug (-fixed-point) -go -graphite (-hardened) -jit (-libssp) -objc -objc++ -objc-gc -pgo -systemtap -test -valgrind -vanilla -vtv -zstd" 0 KiB [ebuild R ] sys-libs/glibc-2.33-r7:2.2::gentoo USE="doc multiarch (multilib) ssp (static-libs) systemd -audit -caps (-cet) -compile-locales (-crypt) -custom-cflags -gd -headers-only -multilib-bootstrap -nscd -profile (-selinux) -static-pie -suid -systemtap -test (-vanilla)" 0 KiB Reproducible: Always
Created attachment 739051 [details] cross-aarch64-unknown-linux-gnu-gcc-stage1.log
Created attachment 739054 [details] emerge --info
Turn off the "lto" use of gcc and it will work.
For cross-riscv64-unknow-linux-gnu, I made a stupid mistake. After closing CCACHE, everything is OK, including lto.