pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: aix: when building with gcc, tell gcc we're building a shared li
Date: Thu, 01 Sep 2022 18:54:36 +0000
Message-ID: <E1oTpKl-000yXs-Ru@gemulon.postgresql.org> (raw)

aix: when building with gcc, tell gcc we're building a shared library

Not passing -shared to gcc when building a shared library triggers linking to
the wrong libgcc (libgcc.a instead of libgcc_s.a) and prevents emitting
correct unwind information. It's somewhat surprising that this hasn't caused
known problems so far.

Doing so requires adding path to libgcc to libpath, or linking statically to
libgcc - as the latter increases .so size substantially (for not entirely
obvious reasons), shared linking seems preferrable.  It likely is worth
building executables with -shared-libgcc too, but I've not done that here.

Discussion: https://postgr.es/m/20220820174213.d574qde4ptwdzoqz@awork3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e5484554ba90536aaff42db588a6397633713c43

Modified Files
--------------
src/makefiles/Makefile.aix | 11 +++++++++++
1 file changed, 11 insertions(+)



Message-ID: <E1oTpKl-000yXs-Ru@gemulon.postgresql.org>
Permalink:  ../E1oTpKl-000yXs-Ru@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1oTpKl-000yXs-Ru@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de
  Subject: Re: pgsql: aix: when building with gcc, tell gcc we're building a shared li
  In-Reply-To: <E1oTpKl-000yXs-Ru@gemulon.postgresql.org>
  References: <E1oTpKl-000yXs-Ru@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