Re: Use -fvisibility=hidden for shared libraries

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>, Laurenz Albe <laurenz.albe@cybertec.at>, pgsql-hackers@postgresql.org
Date: 2022-10-16T05:25:22Z
Lists: pgsql-hackers
Hi,

On 2022-10-15 22:50:07 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > I guess we should report the CFLAGS_SL_MODULE etc via pg_config?
>
> Dunno ... where do you stop?  I'm not really convinced that extensions
> that don't want to use PGXS have any claim on our buildsystem to provide
> platform-specific configuration details for them.

That works for me. I just didn't want to decide on that "by fiat" after I
noticed it...

Greetings,

Andres Freund



Commits

  1. Mark all symbols exported from extension libraries PGDLLEXPORT.

  2. Default to hidden visibility for extension libraries where possible

  3. Remove now superfluous declarations of dlsym()ed symbols.

  4. Add central declarations for dlsym()ed symbols