pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Use -fvisibility=hidden for shared libraries
Date: Thu, 24 Mar 2022 16:13:31 +0100
Message-ID: <5b8d48a4-2fee-6764-7eda-a076f544ea33@enterprisedb.com> (raw)
In-Reply-To: <20220111025328.iq5g6uck53j5qtin@alap3.anarazel.de>
References: <20211101020311.av6hphdl6xbjbuif@alap3.anarazel.de>
	<b8103d16bf26cff7a393d1de690474dbd9afaa19.camel@cybertec.at>
	<20211101054700.z3jzmc5lnxlad4y7@alap3.anarazel.de>
	<2499085.1641859296@sss.pgh.pa.us>
	<20220111025328.iq5g6uck53j5qtin@alap3.anarazel.de>

On 11.01.22 03:53, Andres Freund wrote:
> Ugh. In the case of worker_spi it's because -fvisibility=hidden isn't applied
> to worker_spi.c at all. Which in turn is because Makefile.shlib isn't used at
> all for MODULES= style modules just for MODULE_big= ones :(.
> 
> Once that's "fixed" it fails as expected...
> 
> I'm not sure what the best way to deal with this is. Just now I copied the
> logic from Makefile.shlib to pgxs.mk (by the existing CFLAGS_SL use), but that
> doesn't scale - there's other direct uses of CFLAGS_SL.
> 
> Perhaps the best way would be to add the -fvisibility=hidden to CFLAGS_SL, and
> work around the explicit exports issue in Makefile.shlib by adding an explicit
> -fvisibility=default? Or perhaps CFLAGS_SL

The easiest solution would be to change worker_spi's Makefile to use 
MODULE_big.

There are already many cases where MODULE_big is used instead of MODULES 
for seemingly random reasons, so I wouldn't worry too much about it here 
if it helps you move forward.





view thread (23+ messages)  latest in thread

Message-ID: <5b8d48a4-2fee-6764-7eda-a076f544ea33@enterprisedb.com>
Permalink:  ../5b8d48a4-2fee-6764-7eda-a076f544ea33@enterprisedb.com/
Also on:    postgresql.org/message-id/5b8d48a4-2fee-6764-7eda-a076f544ea33@enterprisedb.com

 · 

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-hackers@postgresql.org
  Cc: peter.eisentraut@enterprisedb.com, andres@anarazel.de, tgl@sss.pgh.pa.us, laurenz.albe@cybertec.at
  Subject: Re: Use -fvisibility=hidden for shared libraries
  In-Reply-To: <5b8d48a4-2fee-6764-7eda-a076f544ea33@enterprisedb.com>

* 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