pgsql: Suppress macOS warnings about duplicate libraries in link comman

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Suppress macOS warnings about duplicate libraries in link comman
Дата
Msg-id E1qmHtz-006fW5-7f@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Suppress macOS warnings about duplicate libraries in link commands.

As of Xcode 15 (macOS Sonoma), the linker complains about duplicate
references to the same library.  We see warnings about libpgport and
libpgcommon being duplicated in many client executables.  This is a
consequence of the hack introduced in commit 6b7ef076b to list
libpgport before libpq while not removing it from $(LIBS).
(Commit 8396447cd later applied the same rule to libpgcommon.)

The concern in 6b7ef076b was to ensure that the client executable
wouldn't unintentionally depend on pgport functions from libpq.
That concern is obsolete on any platform for which we can do symbol
export control, because if we can then the pgport functions in libpq
won't be exposed anyway.  Hence, we can fix this problem by just
removing libpgport and libpgcommon from $(libpq_pgport), and letting
clients depend on the occurrences in $(LIBS).

In the back branches, do that only on macOS (which we know has
symbol export control).  In HEAD, let's be more aggressive and
remove the extra libraries everywhere.  The only still-supported
platforms that lack export control are MinGW/Cygwin, and it
doesn't seem worth sweating over ABI stability details for those
(or if somebody does care, it'd probably be possible to perform
symbol export control for those too).  As well as being simpler,
this might give some microscopic improvement in build time.

The meson build system is not changed here, as it doesn't have
this particular disease, though it does have some related issues
that we'll fix separately.

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/06843df4abc5a0c24e4bd154a8a1327e074fa3ae

Modified Files
--------------
src/Makefile.global.in | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Doc: improve description of dump/restore's --clean and --if-exis
Следующее
От: Bruce Momjian
Дата:
Сообщение: pgsql: doc: PG 16 relnotes: change GRANT GROUP item to ALTER GROUP