$ nix build --no-link -f. pkgsCross.s390.stdenv -L
...
s390-unknown-linux-gnu-stage-static-gcc> /build/build/./gcc/xgcc -B/build/build/./gcc/ -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -mlong-double-128 -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc -fPIC -mlong-double-128 -I. -I. -I../.././gcc -I../../../gcc-12.3.0/libgcc -I../../../gcc-12.3.0/libgcc/. -I../../../gcc-12.3.0/libgcc/../gcc -I../../../gcc-12.3.0/libgcc/../include -DHAVE_CC_TLS -o morestack_s.o -MT morestack_s.o -MD -MP -MF morestack_s.dep -DSHARED -c -xassembler-with-cpp ../../../gcc-12.3.0/libgcc/config/s390/morestack.S
s390-unknown-linux-gnu-stage-static-gcc> make[1]: *** No rule to make target '../../../gcc-12.3.0/libgcc/config/s390/crti.S', needed by 'crti.o'. Stop.
s390-unknown-linux-gnu-stage-static-gcc> make[1]: *** Waiting for unfinished jobs....
s390-unknown-linux-gnu-stage-static-gcc> /nix/store/51sszqz1d9kpx480scb1vllc00kxlx79-bash-5.2-p15/bin/bash ../../../gcc-12.3.0/libgcc/../move-if-change tmp-libgcc_tm.h libgcc_tm.h
s390-unknown-linux-gnu-stage-static-gcc> echo timestamp > libgcc_tm.stamp
s390-unknown-linux-gnu-stage-static-gcc> ../../../gcc-12.3.0/libgcc/config/s390/morestack.S: Assembler messages:
s390-unknown-linux-gnu-stage-static-gcc> ../../../gcc-12.3.0/libgcc/config/s390/morestack.S:600: Warning: ignoring incorrect section type for .init_array.00000
s390-unknown-linux-gnu-stage-static-gcc> make[1]: Leaving directory '/build/build/s390-unknown-linux-gnu/libgcc'
s390-unknown-linux-gnu-stage-static-gcc> make: *** [Makefile:12947: all-target-libgcc] Error 2
error: builder for '/nix/store/lffjd90i8pa7mbwjcxpwf8cxaa2xqljp-s390-unknown-linux-gnu-stage-static-gcc-12.3.0.drv' failed with exit code 2;
Reported here:
Similar issue: #252590