On Thu, Nov 19, 2020 at 03:50:27PM +0100, Jakub Jelinek via Gcc-patches wrote:
> So, I think the problem is that for make .PHONY targets are just
> "rebuilt" always, so it is very much undesirable for the cc1plus$(exeext)
> etc. dependencies to include .PHONY targets, but I was using
> them - cc1plus.prev which would depend on some *.serial and
> e.g. cc1.serial depending on c and c depending on cc1$(exeext).
> 
> The following so far only very lightly tested patch rewrites this
> so that *.serial and *.prev aren't .PHONY targets, but instead just
> make variables.
> 
> I was worried that the order in which the language makefile fragments are
> included (which is quite random, what order we get from the filesystem
> matching */config-lang.in) would be a problem but it seems to work fine.

Successfully bootstrapped/regtested on x86_64-linux and i686-linux,
including make install which looked problematic in PR97911.

Ok for trunk?

> 2020-11-19  Jakub Jelinek  <ja...@redhat.com>
> 
> gcc/
>       * configure.ac: In SERIAL_LIST use lang words without .serial
>       suffix.  Change $lang.prev from a target to variable and instead
>       of depending on *.serial expand to the *.serial variable if
>       the word is in the SERIAL_LIST at all, otherwise to nothing.
>       * configure: Regenerated.
> gcc/c/
>       * Make-lang.in (c.serial): Change from goal to a variable.
>       (.PHONY): Drop c.serial.
> gcc/ada/
>       * gcc-interface/Make-lang.in (ada.serial): Change from goal to a
>       variable.
>       (.PHONY): Drop ada.serial and ada.prev.
>       (gnat1$(exeext)): Depend on $(ada.serial) rather than ada.serial.
> gcc/brig/
>       * Make-lang.in (brig.serial): Change from goal to a variable.
>       (.PHONY): Drop brig.serial and brig.prev.
>       (brig1$(exeext)): Depend on $(brig.serial) rather than brig.serial.
> gcc/cp/
>       * Make-lang.in (c++.serial): Change from goal to a variable.
>       (.PHONY): Drop c++.serial and c++.prev.
>       (cc1plus$(exeext)): Depend on $(c++.serial) rather than c++.serial.
> gcc/d/
>       * Make-lang.in (d.serial): Change from goal to a variable.
>       (.PHONY): Drop d.serial and d.prev.
>       (d21$(exeext)): Depend on $(d.serial) rather than d.serial.
> gcc/fortran/
>       * Make-lang.in (fortran.serial): Change from goal to a variable.
>       (.PHONY): Drop fortran.serial and fortran.prev.
>       (f951$(exeext)): Depend on $(fortran.serial) rather than
>       fortran.serial.
> gcc/go/
>       * Make-lang.in (go.serial): Change from goal to a variable.
>       (.PHONY): Drop go.serial and go.prev.
>       (go1$(exeext)): Depend on $(go.serial) rather than go.serial.
> gcc/jit/
>       * Make-lang.in (jit.serial): Change from goal to a
>       variable.
>       (.PHONY): Drop jit.serial and jit.prev.
>       ($(LIBGCCJIT_FILENAME)): Depend on $(jit.serial) rather than
>       jit.serial.
> gcc/lto/
>       * Make-lang.in (lto1.serial, lto2.serial): Change from goals to
>       variables.
>       (.PHONY): Drop lto1.serial, lto2.serial, lto1.prev and lto2.prev.
>       ($(LTO_EXE)): Depend on $(lto1.serial) rather than lto1.serial.
>       ($(LTO_DUMP_EXE)): Depend on $(lto2.serial) rather than lto2.serial.
> gcc/objc/
>       * Make-lang.in (objc.serial): Change from goal to a variable.
>       (.PHONY): Drop objc.serial and objc.prev.
>       (cc1obj$(exeext)): Depend on $(objc.serial) rather than objc.serial.
> gcc/objcp/
>       * Make-lang.in (obj-c++.serial): Change from goal to a variable.
>       (.PHONY): Drop obj-c++.serial and obj-c++.prev.
>       (cc1objplus$(exeext)): Depend on $(obj-c++.serial) rather than
>       obj-c++.serial.

        Jakub

Reply via email to