https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105507
--- Comment #8 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- > We currently link: > > shared: gmp, winpthread, zlib, zstd > static: mpc, mpfr, isl > > Not for any particular gcc related reason I think, some dependent packages > have static/shared builds, some don't. Why didn't I think of that for PR ada/100486? So the fix should have been to add -shared-libgcc to GCC_LINKERFLAGS in gcc/ada/gcc-interface/Make-lang.in: # Strip -Werror during linking for the LTO bootstrap GCC_LINKERFLAGS = $(filter-out -Werror, $(ALL_LINKERFLAGS)) -shared-libgcc in your setup since you link gnat1 with shared libraries. This should override the -static-libgcc in ALL_LINKERFLAGS inherited from toplevel. So you need to to it 1) for GCC 11: rebuild it and reinstall it 2) for GCC 12: build it with the patched GCC 11. Note that this means that GCC 11 is currently not fully functional anyway.