git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: ce4887b) | patch
Build src/port files as a library with -fPIC, and use that in libpq.
2018年9月27日 15:23:43 +0000 (11:23 -0400)
2018年9月27日 15:23:43 +0000 (11:23 -0400)
commit ea53100d5671b5b243f77898b0b04d23c38b2820
Build src/port files as a library with -fPIC, and use that in libpq.

libpq and ecpg need shared-library-friendly versions of assorted src/port/
and src/common/ modules. Up to now, they got those by symlinking the
individual source files and compiling them locally. That's baroque, and a
pain to maintain, and it results in some amount of duplicated compile work.
It might've made sense when only a couple of files were needed, but the
list has grown and grown and grown :-(

It makes more sense to have the originating directory build a third variant
of libpgport.a/libpgcommon.a containing modules built with $(CFLAGS_SL),
and just link that into the shared library. Unused files won't get linked,
so the end result should be the same.

This patch makes a down payment on that idea by having src/port/ build
such a library and making libpq use it. If the buildfarm doesn't expose
fatal problems with the approach, I'll extend it to the other cases.

Discussion: https://postgr.es/m/13022.1538003440@sss.pgh.pa.us
src/interfaces/libpq/.gitignore diff | blob | blame | history
src/interfaces/libpq/Makefile diff | blob | blame | history
src/port/.gitignore diff | blob | blame | history
src/port/Makefile diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /