pgsql: Make building with LTO work on macOS
Make building with LTO work on macOS
When building with -flto, the backend binary must keep many otherwise
unused symbols to make them available to dynamically loaded modules /
extensions. This has been done via -Wl,--export-dynamic on many
platforms for years. This flag is not supported by the macOS linker,
though. Here it's called -Wl,-export_dynamic instead.
Thus, make configure pick up on this variant of the flag as well.
Meson has the logic upstream as of version 1.5.0.
Without this fix, building with -flto fails with errors similar to [1]/messages/by-id/1581936537572-0.post@n3.nabble.com
and [2]/messages/by-id/21800.1499270547@sss.pgh.pa.us.
[1]: /messages/by-id/1581936537572-0.post@n3.nabble.com
[2]: /messages/by-id/21800.1499270547@sss.pgh.pa.us
Author: Wolfgang Walther <walther@technowledgy.de>
Discussion: /messages/by-id/427c7c25-e8e1-4fc5-a1fb-01ceff185e5b@technowledgy.de
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/73275f093f8969f4d2353fcc803377350aa650f6
Modified Files
--------------
configure | 43 +++++++++++++++++++++++++++++++++++++++++++
configure.ac | 6 ++++++
2 files changed, 49 insertions(+)