Re: Use -fvisibility=hidden for shared libraries

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>, Laurenz Albe <laurenz.albe@cybertec.at>, pgsql-hackers@postgresql.org
Date: 2022-10-16T02:50:07Z
Lists: pgsql-hackers
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.

			regards, tom lane



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