forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit06843df
committed
Suppress macOS warnings about duplicate libraries in link commands.
As of Xcode 15 (macOS Sonoma), the linker complains about duplicatereferences to the same library. We see warnings about libpgport andlibpgcommon being duplicated in many client executables. This is aconsequence of the hack introduced in commit6b7ef07 to listlibpgport before libpq while not removing it from $(LIBS).(Commit8396447 later applied the same rule to libpgcommon.)The concern in6b7ef07 was to ensure that the client executablewouldn't unintentionally depend on pgport functions from libpq.That concern is obsolete on any platform for which we can do symbolexport control, because if we can then the pgport functions in libpqwon't be exposed anyway. Hence, we can fix this problem by justremoving libpgport and libpgcommon from $(libpq_pgport), and lettingclients depend on the occurrences in $(LIBS).In the back branches, do that only on macOS (which we know hassymbol export control). In HEAD, let's be more aggressive andremove the extra libraries everywhere. The only still-supportedplatforms that lack export control are MinGW/Cygwin, and itdoesn't seem worth sweating over ABI stability details for those(or if somebody does care, it'd probably be possible to performsymbol 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 havethis particular disease, though it does have some related issuesthat we'll fix separately.Discussion:https://postgr.es/m/467042.1695766998@sss.pgh.pa.us1 parent75af0f4 commit06843df
1 file changed
+17
-9
lines changedLines changed: 17 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
589 | 589 |
| |
590 | 590 |
| |
591 | 591 |
| |
592 |
| - | |
593 |
| - | |
594 |
| - | |
595 |
| - | |
596 |
| - | |
597 |
| - | |
598 |
| - | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
599 | 605 |
| |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
600 | 610 |
| |
601 |
| - | |
602 | 611 |
| |
603 | 612 |
| |
604 |
| - | |
605 | 613 |
| |
606 | 614 |
| |
607 | 615 |
| |
|
0 commit comments
Comments
(0)