]> granicus.if.org Git - postgresql/commit
Eliminate parallel-make hazard in ecpg/preproc.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 1 Dec 2018 22:19:51 +0000 (17:19 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 1 Dec 2018 22:19:51 +0000 (17:19 -0500)
commit29180e5d78e545472b1665b8d415e6917a5bf333
treead23ff16679c6a5a9ddca5a99dcde348c55a8707
parent3295f82022ff0da95c96d8ca763e1d8902345466
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
src/interfaces/ecpg/preproc/.gitignore
src/interfaces/ecpg/preproc/Makefile
src/tools/msvc/Mkvcbuild.pm