Re: Use -fvisibility=hidden for shared libraries

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Use -fvisibility=hidden for shared libraries
Date: 2022-07-17 20:06:28
Message-ID: 234827.1658088388@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)anarazel(dot)de> writes:
> That's also the reason -fvisibility=hidden isn't added to libpq and the ecpg
> libs - their symbol visility is done via exports.txt. Depending on the
> platform that'd not work if symbols were already hidden via
> -fvisibility=hidden (unless explicitly exported via PGDLLEXPORT, of
> course).

Got it. Yeah, let's not break those cases. (I don't think we dare put
PGDLLEXPORT into libpq-fe.h, for example, so it might be hard to solve
it any other way anyhow.)

>> 2. I'm not really thrilled with the symbol names C[XX]FLAGS_SL_MOD;
>> it's not apparent what the MOD means, nor is that documented anywhere.

> It's for module, which I got from pgxs' MODULES/MODULE_big (and incidentally
> that's also what meson calls it). Definitely should be explained, and perhaps
> be expanded to MODULE.

I guessed as much, but +1 for spelling it out as MODULE.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Mason Sharp 2022-07-17 21:07:59 Re: PATCH: Add Table Access Method option to pgbench
Previous Message Andres Freund 2022-07-17 20:00:41 Re: Use -fvisibility=hidden for shared libraries