Thread: pgsql: Link postgres from all object files at once, to avoid the

pgsql: Link postgres from all object files at once, to avoid the

From
petere@postgresql.org (Peter Eisentraut)
Date:
Log Message:
-----------
Link postgres from all object files at once, to avoid the error-prone
SUBSYS.o step and allow for better optimization by the linker.

Instead of partial linking into SUBSYS.o, the list of object files is
assembled in objfiles.txt files that are expanded when the final
linking is done.

Because we are not yet sure how long command lines different platforms
can handle, the old way of linking is still available, by defining the
make variable PARTIAL_LINKING (e.g., make all PARTIAL_LINKING=1).  If
we determine that this is necessary for some platforms, then we will
document this in a more prominent place.

Modified Files:
--------------
    pgsql/src/backend:
        Makefile (r1.125 -> r1.126)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/Makefile?r1=1.125&r2=1.126)
        common.mk (r1.1 -> r1.2)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/common.mk?r1=1.1&r2=1.2)

Re: pgsql: Link postgres from all object files at once, to avoid the

From
Tom Lane
Date:
petere@postgresql.org (Peter Eisentraut) writes:
> Instead of partial linking into SUBSYS.o, the list of object files is
> assembled in objfiles.txt files that are expanded when the final
> linking is done.

BTW, why does this patch force objfiles.txt to be regenerated every time
any individual .o file is rebuilt?  Surely it need only depend on the
specific Makefile (and maybe Makefile.global).

I find the current behavior kind of annoying because the echo command
occupies more than a full window in some subdirectories (eg utils/adt),
making it necessary to scroll back to see whether one's recompile of a
couple of modified files generated any warnings.  If the dependencies
need to stay as they are, maybe we could avoid the annoyance by having
make not print the echo command.

            regards, tom lane

Re: pgsql: Link postgres from all object files at once, to avoid the

From
Tom Lane
Date:
Hm, just noticed another little annoyance: CVS is going to complain about
the objfiles.txt files unless we add a .cvsignore entry to every last
subdirectory of the backend.  That seems like a lot of maintenance
tedium.  I wonder if there's another way, such as using a file name that
CVS is already programmed to ignore.

            regards, tom lane