Created attachment 52497 [details] Patch of src/Makefile.in Hello, The generated file Makefile.in has embedded dependencies on libatomic and libbacktrace preventing them to be built before libgo: The dependency of libffi: all-target-libgo: maybe-all-target-libffi is outside any conditionals but libbacktrace and libatomic is not: @unless gcc-bootstrap ... all-target-libgo: maybe-all-target-libbacktrace all-target-libgo: maybe-all-target-libatomic ... @endunless gcc-bootstrap Due to this condition the generated build/Makefile does not contain the dependencies on libatomic and libbacktrace, causing the build to fail on GNU/Hurd. Generating a new version of Makefile.in by: (cd source; autogen Makefile.def) does not solve the problem: the same buggy build/Makefile is created. Attached is a patch to move the dependencies outside of the conditional. However, since Makefile.in is generated the problem lies in Makefile.def/Makefile.tpl. Unfortunately not much is documented on this conditional pair: @unless, @endunless Thanks!
Well, that's because of dependencies = { module=all-target-libgo; on=all-target-libbacktrace; }; dependencies = { module=all-target-libgo; on=all-target-libffi; }; dependencies = { module=all-target-libgo; on=all-target-libatomic; }; the reason the dependency is conditional is that libgo is not bootstrapped (and so is libffi) but libbacktrace and libatomic are. There might be an error in Makefile.tpl but maybe you can elaborate on the exact issue that prevents you to build on GNU/Hurd? How do you configure there? When I configure with --disable-bootstrap I do have all required dependencies in the toplevel Makefile. When I configure with bootstrapping the the toplevel Makefile will not build libgo during stage1 but indeed the all-target-libgo target seems to miss a dependency on maybe-all-stage3-target-libbacktrace. IIRC the "usual" workaround is to build a non-bootstrapped target library as well here. I guess I've never run into this because when I'm building go I'm also building other bootstrapped target libs that build libbacktrace and libatomic.