]> gcc.gnu.org Git - gcc.git/commit
configure, make: Fix up --enable-link-serialization
authorJakub Jelinek <jakub@redhat.com>
Tue, 12 Jan 2021 10:02:16 +0000 (11:02 +0100)
committerJakub Jelinek <jakub@redhat.com>
Tue, 12 Jan 2021 10:02:16 +0000 (11:02 +0100)
commitff99d05f40fc573ee405f1278f2bc5ac55019bdb
tree399eb04cf68767a35130ec414a1ddc82e24e301e
parentab96073df00159aa02860b4d128e54909cb75068
configure, make: Fix up --enable-link-serialization

As reported by Matthias, --enable-link-serialization=1 can currently start
two concurrent links first (e.g. gnat1 and cc1).
The problem is that make var = value values seem to work differently between
dependencies and actual rules (where it was tested).
As the language make fragments can be in different order, we can have:
ada.prev = ... magic that will become $(c.serial) under --enable-link-serialization=1
gnat1$(exe): ..... $(ada.prev)
...
c.serial = cc1$(exe)
and while if I add echo $(ada.prev) in the gnat1 rule's command, it prints
cc1, the dependencies are actually evaluated during reading of the goal or
when.
The configure creates (and puts into Makefile) some serialization order of
the languages and in that order c always comes first, and the rest is
actually sorted the way the all_lang_makefrags are already sorted,
so just by forcing c/Make-lang.in first we achieve that X.serial variable
is always defined before some other Y.prev will use it in its goal
dependencies.

2021-01-12  Jakub Jelinek  <jakub@redhat.com>

* configure.ac: Ensure c/Make-lang.in comes first in @all_lang_makefrags@.
* configure: Regenerated.
gcc/configure
gcc/configure.ac
This page took 0.055312 seconds and 5 git commands to generate.