pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Make building with LTO work on macOS
Date: Wed, 31 Jul 2024 04:32:02 +0000
Message-ID: <E1sZ10M-001yuN-A6@gemulon.postgresql.org> (raw)

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]
and [2].

[1]: https://postgr.es/m/1581936537572-0.post%40n3.nabble.com
[2]: https://postgr.es/m/21800.1499270547%40sss.pgh.pa.us

Author: Wolfgang Walther <walther@technowledgy.de>
Discussion: https://www.postgresql.org/message-id/flat/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(+)



Message-ID: <E1sZ10M-001yuN-A6@gemulon.postgresql.org>
Permalink:  ../E1sZ10M-001yuN-A6@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1sZ10M-001yuN-A6@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Make building with LTO work on macOS
  In-Reply-To: <E1sZ10M-001yuN-A6@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox