Non-parallel build can fail, depending on the ./configure parameters - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106472 .

The change below does fix the problem.

I do not understand the build system to say, that this is the best approach, so if there are questions I might or might not be able to answer them.

I tried different things, this worked on the releases/gcc-13 branch. On the master branch last weekend the problem was that stage2 and stage3 results are not equal, so I have not verified this change there. depend= in Makefile.def seem to have only effect if bootstrapping is involved and gcc/go/config-lang.in does not have boot_language=yes . The lines below are present in the Makefile.in:@unless gcc-bootstrap snippet. Actually I think ./configure --enable-languages=all and then serial build work, because this implied D and it does imply bootstrapping for libbacktrace and libatomic. I also do not want to invest much more time on this.

I do not know, if 2×`maybe-`  is necessary.


diff --git a/Makefile.in b/Makefile.in
index 06a9398e172..236e5cda942 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -66481,6 +66481,7 @@ configure-target-libgfortran: maybe-all-target-libquadmath


 @if gcc-bootstrap
+all-target-libgo: maybe-all-target-libbacktrace maybe-all-target-libatomic
 configure-gnattools: stage_last
 configure-libcc1: stage_last
 configure-c++tools: stage_last
diff --git a/Makefile.tpl b/Makefile.tpl
index dfbd74b68f8..98160c7626b 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -1952,7 +1952,7 @@ configure-target-[+module+]: maybe-all-gcc[+
    (define dep-maybe (lambda ()
       (if (exist? "hard") "" "maybe-")))

-   ;; dep-kind returns returns "prebootstrap" for configure or build
+   ;; dep-kind returns "prebootstrap" for configure or build
    ;; dependencies of bootstrapped modules on a build module
    ;; (e.g. all-gcc on all-build-bison); "normal" if the dependency is
    ;; on an "install" target, or if the dependence module is not
@@ -2017,6 +2017,7 @@ configure-target-[+module+]: maybe-all-gcc[+
 [+ ESAC +][+ ENDFOR dependencies +]

 @if gcc-bootstrap
+all-target-libgo: maybe-all-target-libbacktrace maybe-all-target-libatomic
 [+ FOR dependencies +][+ CASE (dep-kind) +]
 [+ == "postbootstrap" +][+ (make-postboot-dep) +][+ ESAC +][+
 ENDFOR dependencies +]@endif gcc-bootstrap


Reply via email to