pgsql: Eliminate parallel-make hazard in ecpg/preproc. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Eliminate parallel-make hazard in ecpg/preproc.
Date
Msg-id E1gTDcC-0002Qc-Gp@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Eliminate parallel-make hazard in ecpg/preproc.

Re-making ecpglib's typename.o is dangerous because another make thread
could be doing that at the same time.  While we've not heard field
complaints traceable to this, it seems inevitable that it'd bite someone
eventually.  Instead, symlink typename.c into the preproc directory and
recompile it there.  That file is small enough that compiling it twice
isn't much of a penalty.  Furthermore, this way we get a .o file that's
made without shlib CFLAGS, which seems cleaner.

This requires adding more stuff to the module's -I list.  The MSVC
aspect of that is untested, but I'm sure the buildfarm will tell me
if I got it wrong.

Per a suggestion from Peter Eisentraut.  Although this is theoretically
a bug fix, the lack of field reports makes me feel we needn't back-patch.

Discussion: https://postgr.es/m/31364.1543511708@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/29180e5d78e545472b1665b8d415e6917a5bf333

Modified Files
--------------
src/interfaces/ecpg/preproc/.gitignore |  2 +-
src/interfaces/ecpg/preproc/Makefile   | 15 ++++++++++-----
src/tools/msvc/Mkvcbuild.pm            |  1 +
3 files changed, 12 insertions(+), 6 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Rename ecpg's various "extern.h" files to have distinct names.
Next
From: Michael Paquier
Date:
Subject: pgsql: Add PGXS options to control TAP and isolation tests, take two